CN110059231A - A kind of generation method and device of reply content - Google Patents
A kind of generation method and device of reply content Download PDFInfo
- Publication number
- CN110059231A CN110059231A CN201910322333.9A CN201910322333A CN110059231A CN 110059231 A CN110059231 A CN 110059231A CN 201910322333 A CN201910322333 A CN 201910322333A CN 110059231 A CN110059231 A CN 110059231A
- Authority
- CN
- China
- Prior art keywords
- content
- reply
- telling
- data
- characterize data
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9032—Query formulation
- G06F16/90332—Natural language query formulation or dialogue systems
Abstract
The present invention relates to data analysis technique fields, disclose the generation method and device of a kind of reply content, comprising: obtain the person of telling tells content;The content of telling is analyzed, several is obtained and tells characterize data;Characterize data is told as foundation using several, the generation of mould group is generated by replying and tells reply content, is told reply content and is told characterize data with any one and matches.Implement the embodiment of the present invention, several told in content can be got and tell characterize data, and characterize data is told according to several and generates reply content, so that reply content is more bonded with the content of telling that user inputs, not only it had improved to the efficiency for telling content reply, and but also had improved the usage experience of user.
Description
Technical field
The present invention relates to data analysis technique fields, and in particular to a kind of generation method and device of reply content.
Background technique
With the development of internet, more and more people's selection, which pours out platform using emotion, will be unwilling to say to household or friend
The thing of friend is told to stranger, and in order to which the content of telling to the person of telling is made and targetedly being replied, it is usual that emotion pours out platform
The artificial mode of meeting replys the content of telling for telling people.However, it has been found in practice that by artificial mode to telling
The efficiency that content is replied is lower.
Summary of the invention
The embodiment of the present invention discloses the generation method and device of a kind of reply content, is able to ascend and returns to telling content
Multiple efficiency improves user experience.
First aspect of the embodiment of the present invention discloses a kind of generation method of reply content, which comprises
Obtain the person of telling tells content;
The content of telling is analyzed, several is obtained and tells characterize data, the characterize data of telling at least is wrapped
Containing telling text data;
Tell characterize data as foundation using described several, by reply generate mould group generate described in tell content corresponding
Reply content, the reply content are matched with any one of characterize data of telling.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described to it is described tell content into
Row analysis, obtains several and tells characterize data, comprising:
Tell the current data type of content described in determination, the data type include at least text type, audio types,
Any one in picture type and video type;
When the current data type is the text type, by several text content analysis models to institute's statement
It states content to be analyzed, obtains that each text content analysis model is corresponding to tell characterize data;
When the current data type is any in the audio types, the picture type and the video type
When a kind of, the content of telling is analyzed by several content analysis models, obtains each content analysis model
Corresponding text tells characterize data, and tells characterize data to the text by several text content analysis models and carry out
Analysis, obtains that each text content analysis model is corresponding to tell characterize data.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described to be told with described several
Characterize data is foundation, tells the corresponding reply content of content described in the generation of mould group by replying to generate, comprising:
Determine each data type for telling characterize data;
The determining and described matched reply generation model of data type for telling characterize data in mould group is generated from replying,
In, the data type that characterize data is told described in one matches the reply and generates model;
Characterize data input and the matched reply generation of the data type for telling characterize data are told by described
In model;
It is generated from reply described in several and tells the corresponding reply content of content described in obtaining in model.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described to tell characterization number for described
It is generated in model according to input and the matched reply of the data type for telling characterize data, comprising:
By it is each it is described tell characterize data input respectively it is matched described with the data type for telling characterize data
It replys and generates in model;Alternatively,
It tells characterize data by described and is combined according to preset data built-up pattern, obtain several targets and tell characterization number
According to, and obtain the target data type that each target tells characterize data;
It is matched that the target is told into the target data type that characterize data input tells characterize data with the target
It replys and generates in model.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described from reply described in several
It generates and tells the corresponding reply content of content described in obtaining in model, comprising:
Several revertant contents are obtained from several described described reply models, wherein in a revertant
Hold from a reply model;
Several described revertant contents are integrated, obtain described telling the corresponding reply content of content.
As an alternative embodiment, in first aspect of the embodiment of the present invention, it is described by several replies
Sub- content is integrated, and obtains described telling the corresponding reply content of content, comprising:
The quantity of the corresponding revertant content of content is told described in detection;
When the quantity for detecting the revertant content is multiple, according to default reply built-up pattern by each described time
Multiple sub- content is combined, and obtains described telling the corresponding reply content of content;
When the quantity for detecting the revertant content is one, the revertant content is determined as in described tell
Hold corresponding reply content.
As an alternative embodiment, the basis is default to reply combination in first aspect of the embodiment of the present invention
Each revertant content is combined by model, obtains described telling the corresponding reply content of content, comprising:
Each revertant content is combined according to default reply built-up pattern, obtains initial reply content;
Operation is optimized to the initial reply content, obtain it is final it is described tell the corresponding reply content of content,
Wherein, the optimization operation includes at least grammatically wrong sentence amendment operation and/or replacement/deletion sensitive word operation.
Second aspect of the embodiment of the present invention discloses a kind of generating means of reply content, comprising:
Acquiring unit, obtain the person of telling tells content;
Analytical unit obtains several and tells characterize data for analyzing the content of telling, described to tell table
Sign data, which include at least, tells text data;
Generation unit is generated described in the generation of mould group for telling characterize data as foundation using described several by replying
The corresponding reply content of content is told, the reply content is matched with any one of characterize data of telling.
As an alternative embodiment, in second aspect of the embodiment of the present invention, the analytical unit includes:
First determines subelement, and for telling the current data type of content described in determination, the data type is at least wrapped
Include any one in text type, audio types, picture type and video type;
First analysis subelement, for passing through several texts when the current data type is the text type
Content analysis model analyzes the content of telling, and obtains that each text content analysis model is corresponding to tell characterization
Data;
Second analysis subelement, for when the current data type be the audio types, the picture type and
When any one in the video type, the content of telling is analyzed by several content analysis models, is obtained
The corresponding text of each content analysis model tells characterize data, and by several text content analysis models to described
Text is told characterize data and is analyzed, and obtains that each text content analysis model is corresponding to tell characterize data.
As an alternative embodiment, in second aspect of the embodiment of the present invention, the generation unit includes:
Second determines subelement, for determining each data type for telling characterize data;
Third determines subelement, for generating the determining and data type for telling characterize data in mould group from reply
The reply matched generates model, wherein the data type that characterize data is told described in one matches the reply and generates model;
Subelement is inputted, for telling characterize data input by described and matching with the data type for telling characterize data
The reply generate model in;
Subelement is obtained, obtains described tell in the corresponding reply of content in model for generating from reply described in several
Hold.
As an alternative embodiment, in second aspect of the embodiment of the present invention, the input subelement includes:
First input module, for inputting and the number for telling characterize data each characterize data of telling respectively
It is generated in model according to the reply of type matching;Alternatively,
Composite module obtains several for telling characterize data by described and being combined according to preset data built-up pattern
Target tells characterize data, and obtains the target data type that each target tells characterize data;
Second input module tells the mesh of characterize data with the target for the target to be told characterize data input
The matched reply of data type is marked to generate in model.
As an alternative embodiment, in second aspect of the embodiment of the present invention, the acquisition subelement includes:
Module is obtained, for obtaining several revertant contents from several described described reply models, wherein one
The revertant content is from a reply model;
Module is integrated, for integrating several described revertant contents, obtains described tell content corresponding time
Multiple content.
As an alternative embodiment, in second aspect of the embodiment of the present invention, the module of integrating includes:
Detection sub-module, for detecting the quantity for telling the corresponding revertant content of content;
Submodule is combined, for being combined according to default reply when the quantity for detecting the revertant content is multiple
Each revertant content is combined by model, obtains described telling the corresponding reply content of content;
Determine submodule, for when detect the revertant content quantity be one when, by the revertant content
The corresponding reply content of content is told described in being determined as.
As an alternative embodiment, in second aspect of the embodiment of the present invention, the combination submodule includes:
Combine component, for when detect the revertant content quantity be it is multiple when, according to default reply combination die
Each revertant content is combined by type, obtains initial reply content;
Optimization component obtains final described telling content pair for optimizing operation to the initial reply content
The reply content answered, wherein the optimization operation includes at least grammatically wrong sentence amendment operation and/or replacement/deletion sensitive word operation.
The third aspect of the embodiment of the present invention discloses a kind of electronic equipment, comprising:
It is stored with the memory of executable program code;
The processor coupled with the memory;
The processor calls the executable program code stored in the memory, executes any of first aspect
A kind of some or all of method step.
Fourth aspect of the embodiment of the present invention discloses a kind of computer readable storage medium, the computer readable storage medium
Store program code, wherein said program code includes the part or complete for executing any one method of first aspect
The instruction of portion's step.
The 5th aspect of the embodiment of the present invention discloses a kind of computer program product, when the computer program product is calculating
When being run on machine, so that the computer executes some or all of any one method of first aspect step.
The aspect of the embodiment of the present invention the 6th disclose a kind of using distribution platform, and the application distribution platform is for publication calculating
Machine program product, wherein when the computer program product is run on computers, so that the computer executes first party
Some or all of any one method in face step.
Compared with prior art, the embodiment of the present invention has the advantages that
In the embodiment of the present invention, the content for the person of telling is obtained;The content of telling is analyzed, several are obtained
Tell characterize data;Characterize data is told as foundation using several, is told reply content by replying generation mould group generation, is told
Reply content is told characterize data with any one and is matched.As it can be seen that implementing the embodiment of the present invention, it can get and tell in content
Several tell characterize data, and tell characterize data according to several and generate reply content, so that reply content and user
The content of telling of input is more bonded, and has not only been improved to the efficiency for telling content reply, but also has been improved the usage experience of user.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to needed in the embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ability
For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 is a kind of flow diagram of the generation method of reply content disclosed by the embodiments of the present invention;
Fig. 2 is the flow diagram of the generation method of another reply content disclosed by the embodiments of the present invention;
Fig. 3 is the flow diagram of the generation method of another reply content disclosed by the embodiments of the present invention;
Fig. 4 is a kind of structural schematic diagram of the generating means of reply content disclosed by the embodiments of the present invention;
Fig. 5 is the structural schematic diagram of the generating means of another reply content disclosed by the embodiments of the present invention;
Fig. 6 is the structural schematic diagram of the generating means of another reply content disclosed by the embodiments of the present invention;
Fig. 7 is the structural schematic diagram of a kind of electronic equipment disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that the described embodiment is only a part of the embodiment of the present invention, instead of all the embodiments.Based on this
Embodiment in invention, every other reality obtained by those of ordinary skill in the art without making creative efforts
Example is applied, shall fall within the protection scope of the present invention.
It should be noted that term " includes " and " having " and their any changes in the embodiment of the present invention and attached drawing
Shape, it is intended that cover and non-exclusive include.Such as contain the process, method of a series of steps or units, system, product or
Equipment is not limited to listed step or unit, but optionally further comprising the step of not listing or unit or optional
Ground further includes the other step or units intrinsic for these process, methods, product or equipment.
The embodiment of the present invention discloses the generation method and device of a kind of reply content, and reply content and user can be made to input
Content of telling more be bonded, not only improved to the efficiency for telling content reply, but also improved the usage experience of user.Divide below
It is not described in detail.
Embodiment one
Referring to Fig. 1, Fig. 1 is a kind of flow diagram of the generation method of reply content disclosed by the embodiments of the present invention.
As shown in Figure 1, the generation method of the reply content may comprise steps of:
101, electronic equipment obtains the person of telling and tells content.
102, electronic equipment is analyzed content is told, and is obtained several and is told characterize data, tells characterize data extremely
Few includes to tell text data.
In the embodiment of the present invention, electronic equipment can be the generating means of reply content.The type for telling content can be
The types such as text, picture, audio and video, the person of telling can by electronic equipment export page input text type and/
Or picture type tells content, can also pass through sound collection equipment (such as microphone) input audio type of electronic equipment
Tell content (such as user input tell voice), the image capture device (such as camera) of electronic equipment can also be passed through
The video type of user's input is acquired simultaneously with sound collection equipment and audio types tell content.Telling content can only wrap
It can also simultaneously include a plurality of types of contents containing a type of content.
In the embodiment of the present invention, telling content includes telling content body and/or telling content title, tells content body
It can be and tell content body text, be also possible to tell content voice and tell (voice for such as not telling person is told), be also possible to
Image content expression (such as the personal story drawn a picture with a group picture), is also possible to telling (as camera is shot for video capture
The person's of telling tells audio-video), tell the one or more that content body may include above content;Telling content can be with can
Selection of land includes the person's of telling personal information, and the person's of telling personal information pre-saves in the electronic device, as telling when use
Content protion.
In the embodiment of the present invention, electronic equipment can be analyzed collected content of telling, and obtain one or more
Tell characterize data;Electronic equipment can tell content and analyzed in different ways according to different types of, to obtain
Final tells characterize data, since the reply content that electronic equipment is subsequently generated needs to be analyzed according to content of text, because
It will include at least text data that this electronic equipment obtained, which tells in characterize data, so that the reply content that electronic equipment generates is more
It is accurate to add.
In the embodiment of the present invention, telling characterize data may include the text for telling content, title, theme, abstract, label
(such as tag along sort, topic label) tells intention, context events, disease information, people information and character relation information, tells
The person's of stating personal information (such as age, gender, Social Identity, educational background, race, nationality, location, marital status), the person of telling
Psychological analysis result tells style information, metaphor information, story fable information, religion information, social information (such as work letter
Breath, learning information, life information etc.), scientific information (such as mathematical material, philosophy content, physics content, chemical content) with
And semantic analysis result (such as statement entity, syntactic information, syntactic information, grammatical information);Wherein, the quantity of text can have
Multiple, the quantity of label can have multiple, and the quantity for telling the context events that content includes can have multiple, and the quantity of theme can
Multiple to have, disease information can have multiple, and people information and character relation information can have multiple, and metaphor information can have more
A, story fable information can have multiple, and religion information can have multiple, and social information can have multiple, and scientific information can be with
Have multiple, the psychological analysis result for the person of telling can include at least cognitive analysis result, personality analysis result, character analysis knot
It is any one in fruit, mood analysis result, subconsciousness analysis result, imagery analysis result and mental-psychological assessment result
It is a.
In the embodiment of the present invention, each characterize data of telling is obtained by corresponding content analysis model, including, tell table
Telling content text and can be directly obtained by telling content in sign data, or by identification model from telling content sound
Frequently, tell content picture, tell audio content acquisition;Telling content title can be directly obtained by telling content (in telling
Holding includes title);The theme for telling content can generate model by theme and obtain;The abstract for telling content can pass through abstract
Model is generated to obtain;The label for telling content can generate model by label and obtain;The person's of telling input is told in content
Telling intention can be intended to generate model acquisition by telling;Telling the context events that content includes can be divided by context events
Model is analysed to obtain;Model acquisition can be obtained by disease content by telling the disease information that content includes;Tell what content included
People information and character relation information can be obtained by personage and character relation analysis model;The psychological analysis knot for the person of telling
Fruit can be obtained by psychological analysis model;Telling content and telling style information can be obtained by telling style analysis model
?;Telling the metaphor information that content includes can be obtained by metaphor analysis model;Tell the story fable information that content includes
It can be obtained by story fable analysis model;Telling the religion information that content includes can be obtained by Religion content analysis model
?;Telling the social information that content includes can be obtained by social information's analysis model;Tell the scientific information that content includes
It can be obtained by scientific contents analysis model;Telling contents semantic analysis result can be obtained by semantic module;It tells
The person's of stating personal information can be obtained by telling content, can also be obtained by personal information analysis module.In addition, theme generates
Model, summarization generation model, label generate model, tell intention generation model, context events analysis model, the acquisition of disease content
Model, personage and character relation analysis model tell style analysis model, metaphor analysis model, story fable analysis model, ancestor
Religion content analysis model, social information's analysis model, scientific contents analysis model and psychological analysis model can pass through
Nerual network technique building based on machine learning;Semantic module can be constructed by traditional semantic analysis technology, or
It is constructed by the neural network model based on machine learning.In addition, in recent years, the neural network mould based on machine learning
Type has in the field natural language processing (Natural Language Processing, NLP) to be widely applied, and is plucked in text
Generate, machine read understand, mood analysis, content generate etc. have research achievement abundant, these research achievements are
The response answering system of building automation provides theory and technology basis.
Wherein, content text, title, theme, abstract, label, intention, context events, disease information, people information are told
It can be content of text with character relation information, the person's of telling personal information, metaphor information, story fable information, scientific information;
Above-mentioned religion information, psychological analysis result, tells style information, semantic analysis result at social information, can be textual data
According to being also possible to numeric data.
Wherein, characterize data or a text content analysis mould are poured out for available one, a content analysis model
Type is also available multiple to pour out characterize data.
As an alternative embodiment, electronic equipment analyzes the content of telling for getting the person of telling, obtain
Several modes for telling characterize data may include following steps:
Electronic equipment analyzes the content of telling for getting the person of telling, and determines the data type for telling content;
When detecting the data type for telling content is text type, electronic equipment passes through the corresponding content of text type
Analysis model analyzes the content of telling of text type, obtains several and tells characterize data;
When detecting the data type for telling content is picture type, electronic equipment passes through graph image identification model pair
The content of telling of picture type carries out discriminance analysis, the available text information told in content picture, and passes through text class
The corresponding content analysis model of type analyzes text information, obtains several and tells characterize data, can also identify
When telling in content comprising facial image of picture type, the identification based on human facial expression recognition model to facial image obtains
The psychology characterize data for the person of telling, and can will tell text data and psychology characterize data is determined as identifying jointly
To several tell characterize data;
When detecting the data type for telling content is audio types, electronic equipment is by being based on speech recognition technology
The speech recognition module of (Automatic Speech Recognition, ASR) is identified to content is told, and obtains telling interior
Hold the corresponding text information of voice, and then text information is analyzed by text type corresponding content analysis model, obtains
Characterize data is told to several, is also based on sound Emotion identification model and identification point is carried out to the person's of telling sound of speaking feature
Analysis, obtains the psychology characterize data for the person of telling;
When detecting the data type for telling content is video type, electronic equipment is by speech recognition module to telling
Audio-frequency information in content is identified, the text information for telling content is obtained, can also be by based on limbs Activity recognition point
It analyses model and the analysis of subconsciousness Activity recognition is carried out to the limbs behavior of personage, obtain the psychology characterize data for the person of telling, and
All text informations are analyzed by the corresponding content analysis model of text type, several is obtained and tells characterization number
According to.
Wherein, implement this embodiment, can according to different types of data tell content using different modes into
Row analysis, the corresponding difference of content of telling for obtaining different types of data tell characterize data, improve analysis and obtain telling table
Levy the accuracy of data.
Optionally, when detecting the data type for telling content is picture type, electronic equipment can be by image
Hold analysis model and discriminance analysis is carried out to the content of telling of picture type, can analyze to obtain telling in content for picture type
People event's content, and can be analyzed from people event's content and obtain the content description for telling content to image type,
And then it generates and describes corresponding body text information with the content, and pass through the corresponding text content analysis model pair of text type
Text information is analyzed, obtain several and tell characterize data, to improve electronic equipment for the content of image type
The diversity of analysis mode.
103, electronic equipment tells characterize data as foundation using several, tells content pair by replying generation mould group generation
The reply content answered, reply content are told characterize data with any one and are matched.
In the embodiment of the present invention, replying generation mould group can be constructed by neural network model, can also optionally include
Traditional NLP semantic analysis technology module, electronic equipment can generate mould group and generate and each to tell characterize data equal by replying
Matched reply content, to obtain telling the matched content of characterize data with any one in the reply content of generation.
For example, the text for telling content of user's input can be with are as follows: " I makes great efforts always very much, and the time after school all exists
Study, achievement or fluctuated, current examination is again not have good mark.Why others is playing the time after school, but total marks of the examination
But better than me.I does not understand in face of those outstanding persons what existing meaning the people of my this mediocrity has.It is top in face of society
Elite, what the people of numerous mediocrities living in this purpose is in the world? ", electronic equipment can analyze by plurality of kinds of contents
Model analyzes the text for telling content, can when being analyzed by theme generation model the text for telling content
With from tell theme that content is told obtained in the text of content it is corresponding tell characterize data be " in face of elite, I this such as
What receives the mediocrity of oneself? ", can be from telling when being analyzed by context events analysis model the text for telling content
The corresponding characterize data of telling of situation that content is told obtained in the text of content is stated as " I makes great efforts always very much, when extracurriliar
Between all learning, achievement or fluctuated, current examination is again not have good mark " and " why others is playing the time after school, but
Total marks of the examination are but better than me ".Further, electronic equipment can generation mould group generation is corresponding with situation to tell table by replying
" this scene that you say: ' why others is playing the time after school first revertant content of sign data, but total marks of the examination
It is better than me ', this is too common situation, and effort, which is settled, does not obtain best result ";Electronic equipment can also be generated by replying
Mould group generates the second revertant content for telling characterize data corresponding with theme, and " asking first is the attitude of life, rather than people
Raw meaning.Big tree has the scene set greatly, and small grass has the excellent of small grass, this is only the phychology of health ".Electronic equipment can pass through
It replys generation model to be combined the first revertant content and the second revertant content, obtaining final reply content, " you say
This scene: ' why others is playing the time after school, but total marks of the examination are better than me ', this is too common situation, is exerted
Power, which is settled, does not obtain best result.My answer is: asking first is the attitude of life, rather than the meaning of life.Big tree has
The scene set greatly, small grass have the excellent of small grass, this is only the phychology of health ".The final reply that electronic equipment can will obtain
Content is exported, so that the person of telling views electronic equipment and is directed to the reply for telling content, so that electronic equipment exports
Reply content more there is specific aim.
In the method depicted in fig. 1, reply content can be made more to be bonded with the content of telling that user inputs, both promoted
To telling the efficiency of content reply, and improve the usage experience of user.In addition, implementing method described in Fig. 1, improve
Analysis obtains telling the accuracy of characterize data.In addition, implementing method described in Fig. 1, electronic equipment is improved for image class
The diversity of the analysis mode of the content of type.In addition, implementing method described in Fig. 1, so that in the reply of electronic equipment output
Holding more has specific aim.
Embodiment two
Referring to Fig. 2, Fig. 2 is the process signal of the generation method of another reply content disclosed by the embodiments of the present invention
Figure.As shown in Fig. 2, the generation method of the reply content may comprise steps of:
201, electronic equipment obtains the person of telling and tells content.
202, electronic equipment determines the current data type for telling content, and data type includes at least text type, audio
Any one in type, picture type and video type.
203, when current data type is text type, electronic equipment is by several text content analysis models to telling
It states content to be analyzed, obtains that each text content analysis model is corresponding to tell characterize data.
In the embodiment of the present invention, text content analysis model can be the neural network model based on machine learning, can be with
The content of telling of one or more text types of user's input is analyzed, to obtain each text content analysis model pair
That answers tells characterize data, and the characterize data of telling that a text content analysis model analysis obtains can be one or more
It is a.
204, when current data type is any one in audio types, picture type and video type, electronics
Equipment is analyzed by several content analysis models content is told, and is obtained the corresponding text of each content analysis model and is told
Characterize data is stated, and characterize data is told to text by several text content analysis models and is analyzed, obtains each text
This content analysis model is corresponding to tell characterize data.
In the embodiment of the present invention, content analysis model can be the neural network model based on machine learning, can be to text
This type, audio types, the content of telling of picture type and video type are analyzed, and tell content point to text type
The model of analysis can be text content analysis model, and content analysis model is to audio types, picture type and video type
Characterize data can be told for text type by telling the result that content analysis obtains, and then can pass through text content analysis mould
Type analyzes the characterize data of pouring out of obtained text type, obtains final pouring out characterize data.
For example, when content analysis model is any neural network model, it is defeated that electronic equipment can will tell content
Enter into neural network model, obtains corresponding text using the neural network model and tell characterize data.
Optionally, it can be marked in advance to pouring out characterize data, it such as can be to the content mark poured out in characterize data
Topic text tells content body text, tells content tab text, telling content user essential information and be marked, by interior
Hold analysis model to pour out characterize data analyze can directly obtain tell content the inside be marked in advance tell table
Levy data.
In the embodiment of the present invention, the quantity of content analysis model can wrap for one or more, content analysis model
Theme containing the nerual network technique building based on machine learning generates model, summarization generation model, label and generates model, tells
It is intended to generate model, context events analysis model, the acquisition of disease content acquisition model, personage and character relation analysis model, tells
State style analysis model, metaphor analysis model, story fable analysis model, Religion content analysis model, social information's analysis, section
Content analysis model and psychological analysis model etc. are learned, without limitation to this embodiment of the present invention.In addition, content analysis model
It can also be analyzed by traditional NLP semantic analysis technology content is told.
Wherein, content analysis model can be the neural network model based on machine learning, will tell content and is input to mind
Through telling characterize data using model acquisition is corresponding in network model.Alternatively, content analysis model can also directly obtain
Tell be marked inside content in advance tell characterize data, wherein the characterize data of telling being marked in advance includes telling
State content title text, tell content body text, tell content tab text, tell it is any in content user essential information
It is a kind of.
For example, the nerual network technique for constructing summarization generation model can be with are as follows: (1) supervised learning (Supervised
Learning) training pattern: available several body text samples for telling content and corresponding abstract sample, input
More round interative computations are carried out into the neural network model constructed in advance, training obtains an optimal models, abstract as
Generate model.(2) semi-supervised learning (Semi-supervised Learning) training pattern: available several to tell content
Body text sample and corresponding abstract sample (flag data marked each other to), and the abstract without corresponding relationship
Sample or the body text sample (data untagged) for telling content without corresponding relationship, are input to the neural network constructed in advance
Carry out more round interative computations in model, which can use the body text sample for telling content and right therewith
The learner that the abstract sample interative computation answered obtains is that data untagged generates corresponding pseudo-text text mark or pseudo- abstract
Then flag data is obtained one most to successive ignition operation, training is carried out after mixing to pseudo- flag data by text mark
Excellent model, summarization generation model as.(3) Active Learning (Active Learning): available several unmarked samples
Data (such as body text sample for telling content without corresponding relationship, or the summary texts sample without corresponding relationship), learner
Some unmarked samples can voluntarily be picked out and inquire the label that external knowledge system obtains these samples, then again by these
There is label example as training example to carry out conventional supervised learning.(4) unsupervised learning (Unsupervised Learning)
Training pattern: available several unmarked sample data (are such as told body text sample without corresponding relationship, or are closed without corresponding
The summary texts sample of system or the samples of text of other knowledge contents), sample data is input to pre-established neural network mould
Type carries out more wheel iteration operations, trains an optimal example rule model, when the text input of content will be told to model,
The model can be automatically according to example law generation summary texts.(5) model based on pre-training model: it is being based on large-scale corpus
Or the pre-training model that ultra-large corpus training obtains, the mould being finely adjusted on the basis of the model according to abstract task
Type.For example, can be in Google BERT (Bidirectional Encoder Representations from
Transformers secondary model building) is carried out on the basis of pre-training model, and successive ignition operation, training are carried out to training corpus
Obtain an optimal models, summarization generation model as.(6) what other neural network models based on machine learning constructed plucks
Generate model.As it can be seen that the embodiment of the present invention can construct summarization generation model by a variety of nerual network techniques, to guarantee
The accuracy of summarization generation model construction.These building modes based on neural network model are also applied for building other content
Analysis model.
In the embodiment of the present invention, step 202~step 204 is executed, it can be by each content analysis model to getting
The content of telling of the person of telling analyzed, so that obtaining this tells that content is corresponding to tell characterize data, so that according to telling
It is more accurate that content analysis obtained tells characterize data.
205, electronic equipment determines each data type for telling characterize data.
In the embodiment of the present invention, tell characterize data data type can be the theme type, tag types, tell intention
Type, psychological analysis type and essential information type etc., in this regard, the embodiment of the present invention is without limitation.
206, electronic equipment is given birth to from the matched reply of data type for determining and telling characterize data in generation mould group is replied
At model, wherein a data type for telling characterize data matches a reply and generates model.
In the embodiment of the present invention, replys and may include one or more reply generation models in generation mould group, and is any one
A reply, which generates model, can correspond to the data type for telling characterize data, i.e., one is told the data type of characterize data
It can only match and generate model with a reply.
207, electronic equipment will be told characterize data input and be generated with the matched reply of data type for telling characterize data
In model.
208, electronic equipment, which replys to generate to obtain in model from several, tells the corresponding reply content of content, reply content
Characterize data is told with any one to match.
In the embodiment of the present invention, step 205~step 208 is executed, can determine each data class for telling characterize data
Type, and model is generated according to the corresponding reply of data type and generates reply content so that the reply content generated and any one
Tell characterize data matching, i.e., any one tells characterize data can find matching content in reply content,
To improve the comprehensive of reply content.
In the method depicted in fig. 2, reply content can be made more to be bonded with the content of telling that user inputs, both promoted
To telling the efficiency of content reply, and improve the usage experience of user.In addition, implementing method described in Fig. 2, ensure that
The accuracy of summarization generation model construction.In addition, implementing method described in Fig. 2, basis can be made to tell content analysis and obtained
To tell characterize data more accurate.In addition, implementing method described in Fig. 2, the comprehensive of reply content is improved.
Embodiment three
Referring to Fig. 3, Fig. 3 is the process signal of the generation method of another reply content disclosed by the embodiments of the present invention
Figure.As shown in figure 3, the generation method of the reply content may comprise steps of:
Step 301~step 306 is identical as step 201~step 206, and the following contents repeats no more.
307, electronic equipment will be told characterize data input and be generated with the matched reply of data type for telling characterize data
In model.
As an alternative embodiment, the data that electronic equipment will tell characterize data input with tell characterize data
The mode that the reply of type matching generates in model may include following steps:
Electronic equipment is by each matched reply of data type told characterize data and input and tell respectively characterize data
It generates in model.
Wherein, implement this embodiment, each that can be will acquire tell characterize data be input to it is corresponding
Reply generate model in, with obtain it is each tell the corresponding reply content of characterize data so that obtained reply content with tell
The content that the person of stating tells more matches.
As an alternative embodiment, the data that electronic equipment will tell characterize data input with tell characterize data
The mode that the reply of type matching generates in model can also comprise the steps of:
Electronic equipment will tell characterize data and will be combined according to preset data built-up pattern, obtain several targets and tell table
Data are levied, and obtain the target data type that each target tells characterize data;
It is matched that target is told the target data type that characterize data input tells characterize data with target by electronic equipment
It replys and generates in model.
Wherein, implement this embodiment, the matched characterize data of telling of data type can be combined, if obtaining
A dry target tells characterize data, and then several are told characterize data and is inputted in corresponding reply generation model respectively, with
It obtains each target and tells the corresponding reply content of characterize data, simplify the mistake replied and generate the reply content that model generates
Journey improves the efficiency of reply content generation.
In the embodiment of the present invention, preset data built-up pattern be may include: (1) enhanced combination: one or more to tell
Characterize data can be enhanced another or it is a variety of tell characterize data characterization expression (such as: tell context events for one
The preference for increasing age-sex tells characterize data, and the common sense sex determination of context events can be enhanced, beat in an adult
In the event of party, the characterize data for being 10 years old into party's age is combined, so that it may obtain the event and be likely to be cruel child
Furthermore the information representation of event is also possible to a plurality of characterize data and is mutually reinforcing expression);(2) supplement improves type combination: individually telling
The information for stating characterize data is imperfect, need it is multiple tell characterize data and combine could express complete characterization information.
(3) similar combination: allowing certain same type to tell characterize data simple combination together, is disposably input to generation model.(4) it closes
And repeat: judging whether two characterization contents for telling characterize data are identical, if identical, characterization number can be told by two
Characterize data is told according to merging into one.
It is carried out as an alternative embodiment, electronic equipment will tell characterize data according to preset data built-up pattern
Combination, obtains several targets and tells characterize data, and obtain the mode that each target tells the target data type of characterize data
It may comprise steps of:
Electronic equipment is told each characterize data and is grouped according to data type, and it is different to obtain several groups data type
Tell characterize data group;
The identical characterize data of telling of content that same group is told in characterize data group is marked electronic equipment, inside
Hold identical tell in characterize data only to retain one and tell characterize data, and the characterize data of telling not retained is deleted, with
It is all unique for so that any one is told the content for telling characterize data in characterize data group;
Each characterize data of telling told in characterize data group is combined by electronic equipment respectively, is obtained, will be told
Characterize data is combined according to preset data built-up pattern, is obtained several targets and is told characterize data;
Electronic equipment determines that each target tells the target data type of characterize data.
Wherein, implement this embodiment, obtained several targets are told into characterize data group and are compared two-by-two, eliminate
Duplicate target tells characterize data group, so that guaranteeing that obtained target is told in characterize data is not in duplicate content,
The resource utilization of electronic equipment can also be improved.
308, electronic equipment replys in model from several and obtains several revertant contents, wherein in a revertant
Hold from a reply model.
309, electronic equipment integrates several revertant contents, obtains telling the corresponding reply content of content, returns
Multiple content is told characterize data with any one and is matched.
In the embodiment of the present invention, step 308~step 309 is executed, the content that each reply model generates can be determined
For revertant content, and then revertant content is integrated, final reply content is obtained, to ensure that reply content packet
Containing the revertant content that each reply model generates, so ensure that reply content with tell content and more match.
As an alternative embodiment, electronic equipment integrates several revertant contents, obtain telling interior
The mode for holding corresponding reply content may include following steps:
Electronic equipment detects the quantity for telling the corresponding revertant content of content;
When the quantity for detecting revertant content is multiple, electronic equipment is according to default composite module of replying by each time
Multiple sub- content is combined, and obtains telling the corresponding reply content of content;
When the quantity for detecting revertant content is one, electronic equipment is determined as revertant content to tell content pair
The reply content answered.
Wherein, implement this embodiment, can be determined according to the quantity for replying the revertant content that model generates final
Reply content generating mode, if the quantity of revertant content only one when, can directly by the revertant content make
For reply content output, if when the quantity more than one of revertant content, it can be directly by all revertant contents into group
It closes, the final reply content after being combined, and exports final reply content, to improve the effect for generating reply content
Rate.
Wherein, presetting reply composite module may include revertant content comparison submodule, to same time when combining
Two revertant contents that multiple model generates carry out content similarity comparison and only retain if two revertant contents are similar
One revertant content, because the revertant content is similar to another revertant content given up, the revertant content
Can also characterize data of telling corresponding with another revertant content match.Default composite module of replying can also include group
Optimization module is closed, to multiple revertant content carry out sequence sequences when combining, increases sentence paragraph between multiple revertant contents
Connection, the transition of sentence paragraph, modification word or sentence, for improving the fluency and readability of reply content.
As an alternative embodiment, electronic equipment according to it is default reply composite module by each revertant content into
Row combination, the mode for obtaining telling the corresponding reply content of content may include following steps:
Electronic equipment replys composite module and is combined each revertant content according to default, initially replied in
Hold;
Electronic equipment optimizes operation to initial reply content, obtain it is final tell the corresponding reply content of content,
Wherein, optimization operation includes at least grammatically wrong sentence amendment operation and/or replacement/deletion sensitive word operation.
It wherein, can also include placeholder processing (such as UNK placeholder is replaced), language to the optimization operation of initial reply content
Adopted entity replaces (the general pronoun " she " in initial reply content is such as replaced with to the title " small beautiful " told in content), implements
This embodiment can optimize the reply content of output, with reduce grammatically wrong sentence present in reply content, sensitive word with
And the problems such as wrong word, and the readability of reply content can also be optimized, to improve the usage experience for the person of telling.
In the method depicted in fig. 3, reply content can be made more to be bonded with the content of telling that user inputs, both promoted
To telling the efficiency of content reply, and improve the usage experience of user.In addition, method described in implementing Fig. 3, can make
Obtained reply content is more matched with the content that the person of telling tells.In addition, method described in implementing Fig. 3, improves reply
The efficiency that content generates.In addition, method described in implementing Fig. 3, can be improved the memory headroom of electronic equipment.In addition, implementing
Method described in Fig. 3, ensure that reply content with tell content and more match.In addition, method described in implementing Fig. 3, mentions
The high efficiency for generating reply content.In addition, method described in implementing Fig. 3, improves the usage experience for the person of telling.
Example IV
The reply being related in one~embodiment of the embodiment of the present invention three, which generates model, can be the mind based on machine learning
Through network model, and different types of data tells characterize data and can generate model by different replies and generate corresponding time
Multiple sub- content.For example, body type tells characterize data and can be replied by the corresponding text of body type and generate model and obtain
Obtain revertant content;The characterize data of telling of topic Types can be by the corresponding title reply generation model acquisition of topic Types
Revertant content;Writing abstract tells characterize data and can be replied by the corresponding abstract of writing abstract and generate model and be returned
Multiple sub- content;Tell intention type tell characterize data can by tell intention type it is corresponding tell intention reply generate
Model obtains revertant content;The characterize data of telling of disease information type can be by the corresponding disease letter of disease information type
Breath, which is replied, generates model acquisition revertant content;People information and character relation information type are told characterize data and can be passed through
People information and the corresponding people information of character relation information type and character relation information-reply generate model and obtain revertant
Content;The characterize data of telling of psychological analysis type can be by the corresponding psychological analysis reply life of psychological analysis type
Revertant content is obtained at model;The characterize data of telling for telling style information type can be by telling style information type pair
The style information of telling answered replys generation model acquisition revertant content;Metaphor information type is told characterize data and can be passed through
The corresponding metaphor information-reply of metaphor information type generates model and obtains revertant content;Story fable information type tells table
Model acquisition revertant content can be generated by the corresponding story fable information-reply of story fable information type by levying data;Ancestor
Religion information type tells characterize data and can generate model by the corresponding religion information-reply of religion information type and be returned
Multiple sub- content;The characterize data of telling of social information's type can be by the corresponding social information's reply generation of social information's type
Model obtains revertant content;The characterize data of telling of scientific information type can be by the corresponding science letter of scientific information type
Breath, which is replied, generates model acquisition revertant content;The characterize data of telling of semantic analysis type can be by semantic analysis type pair
The semantic analysis answered, which is replied, generates model acquisition revertant content;Personal information type tells characterize data and can pass through individual
The corresponding personal information of information type, which is replied, generates model acquisition revertant content.Wherein, text, which is replied, generates model, makes a summary back
Repetitive generation model can be the same reply and generate model.
Wherein, implement this embodiment, the characterize data of telling of part only can be generated into revertant content, and do not have to
All obtained characterize datas of telling all are generated revertant content.
As an alternative embodiment, telling characterize data by described and carrying out group according to preset data built-up pattern
It closes, obtains several targets and tell characterize data, and obtain the target data type that each target tells characterize data;By the mesh
Mark is told the matched reply of target data type that characterize data input tells characterize data with the target and is generated in model, no
Target with target data type tells characterize data and can generate model by different replies and generates in corresponding revertant
Hold.
Optionally, construct it is above-mentioned it is various reply generate the nerual network techniques of models can be with are as follows: (1) supervised learning training mould
Type: available several samples for telling characterize data and corresponding revertant content sample are input to and construct in advance
More round interative computations are carried out in neural network model, training obtains an optimal models, and reply as generates model.(2)
Semi-supervised learning training pattern: available several samples for telling characterize data and corresponding revertant content sample
(flag data marked each other to), and the revertant content sample without corresponding relationship or characterization number is told without corresponding relationship
According to sample (data untagged), be input in the neural network model constructed in advance and carry out more round interative computations, the nerve
Network model can use the sample for telling characterize data and corresponding revertant content sample interative computation obtain
Practising device is that data untagged generates corresponding pseudo- characterize data or pseudo- revertant content, then by flag data to pseudo- data pair
Successive ignition operation is carried out after mixing, training obtains an optimal models, and reply as generates model.(3) Active Learning: can
To obtain several unmarked sample data (such as sample for telling characterize data without corresponding relationship, or the reply without corresponding relationship
Sub- content sample), learner, which can voluntarily pick out some unmarked samples and inquire external knowledge system, obtains these samples
Label, these are then had into label example as trained example to carry out conventional supervised learning again.(4) unsupervised learning training
Model: available several unmarked sample data (such as telling in sample, or the revertant without corresponding relationship without corresponding relationship
Hold sample or the samples of text of other knowledge contents), sample data is input to pre-established neural network model and carries out more wheels
Iteration operation, trains an optimal example rule model, when will tell the text input of characterize data to model, the model
It can be automatically according to example law generation revertant content.(5) it the model based on pre-training model: is being based on large-scale corpus or is surpassing
The pre-training model that large-scale corpus training obtains, the model being finely adjusted on the basis of the model according to abstract task.
For example, secondary model building can be carried out on the basis of Google BERT pre-training model, successive ignition is carried out to training corpus
Operation, training obtain an optimal models, and reply as generates model.(6) other neural network moulds based on machine learning
The reply of type building generates model.As it can be seen that the embodiment of the present invention, which can construct to reply by a variety of nerual network techniques, generates mould
Type, to ensure that the accuracy replied and generate model construction.
For example, the context events type that electronic equipment is analyzed tell characterize data can for " I this time
Graduation examination does not pass through, and university does not finish industry, I feels life no future, I am a little desperate ", it can be by the situation
The characterize data of telling of event type is input in the corresponding context events reply generation model of context events type, available
Revertant content " if whether there are also make-up examination chances? diploma is not got really, that is also not the life end, the master of school
Syllabus is learning knowledge, can also be with learning knowledge and technical ability outside school.Life is very long, inevitably meets with setback, everybody one
Sample, your life just starts soon, to refuel ".As it can be seen that electronic equipment can pass through the data class for different data types
The corresponding reply of type generates model generation and the matched reply content of current data type, so that in the reply that electronic equipment generates
Hold and is more matched with the content of telling of the person's of telling input.
Embodiment five
Referring to Fig. 4, Fig. 4 is a kind of structural schematic diagram of the generating means of reply content disclosed by the embodiments of the present invention.
Wherein, as shown in figure 4, the generating means of the reply content may include:
Acquiring unit 401, for obtaining the content for the person of telling.
Analytical unit 402 obtains several and tells characterize data, this tells characterization for analyzing to telling content
Data include at least and tell text data.
As an alternative embodiment, analytical unit 402 analyzes the content of telling for getting the person of telling, obtain
The mode that characterize data is told to several is specifically as follows:
The content of telling for getting the person of telling is analyzed, determines the data type for telling content;
When detecting the data type for telling content is text type, pass through the corresponding content analysis model of text type
The content of telling of text type is analyzed, several is obtained and tells characterize data;
When detecting the data type for telling content is picture type, by graph image identification model to picture type
Tell content carry out discriminance analysis, the available text information told in content picture, and by text type it is corresponding
Content analysis model analyzes text information, obtains several and tells characterize data, can also identify picture type
When telling in content comprising facial image, the identification based on human facial expression recognition model to facial image obtains the person's of telling
Psychology characterize data, and can will tell text data and psychology characterize data be determined as jointly identification obtain it is several
It is a to tell characterize data;
When detecting the data type for telling content is audio types, by the speech recognition module based on ASR to telling
It states content to be identified, obtains telling the corresponding text information of content voice, and then pass through the corresponding content analysis of text type
Model analyzes text information, obtains several and tells characterize data, is also based on sound Emotion identification model to telling
The person's of stating sound of speaking feature carries out discriminance analysis, obtains the psychology characterize data for the person of telling;
When detecting the data type for telling content is video type, by the speech recognition module based on ASR to telling
The audio-frequency information stated in content is identified, the text information for telling content is obtained, can also be by being based on limbs Activity recognition
Analysis model carries out the analysis of subconsciousness Activity recognition to the limbs behavior of personage, obtains the psychology characterize data for the person of telling, with
And all text informations are analyzed by the corresponding content analysis model of text type, it obtains several and tells characterization number
According to.
Wherein, implement this embodiment, can according to different types of data tell content using different modes into
Row analysis, the corresponding difference of content of telling for obtaining different types of data tell characterize data, improve analysis and obtain telling table
Levy the accuracy of data.
Optionally, when detecting the data type for telling content is picture type, electronic equipment can be by image
Hold analysis model and discriminance analysis is carried out to the content of telling of picture type, can analyze to obtain telling in content for picture type
People event's content, and can be analyzed from people event's content and obtain the content description for telling content to image type,
And then it generates and describes corresponding body text information with the content, and pass through the corresponding text content analysis model pair of text type
Text information is analyzed, obtain several and tell characterize data, to improve electronic equipment for the content of image type
The diversity of analysis mode.
Generation unit 403, several for being obtained using analytical unit 402 are told characterize data as foundation, pass through reply
It generates the generation of mould group and tells the corresponding reply content of content, which tells characterize data with any one and match.
As it can be seen that implementing the generating means of reply content described in Fig. 4, reply content can be made to tell with what user inputted
Content is more bonded, and has not only been improved to the efficiency for telling content reply, but also has been improved the usage experience of user.In addition, implementing Fig. 4
Described device improves the accuracy that analysis obtains telling characterize data.In addition, implementing device described in Fig. 4, improve
Diversity of the electronic equipment for the analysis mode of the content of image type.
Embodiment six
Referring to Fig. 5, Fig. 5 is the structural representation of the generating means of another reply content disclosed by the embodiments of the present invention
Figure.Wherein, the generating means of reply content shown in fig. 5 are that the generating means of reply content as shown in Figure 4 optimize
It arrives.The analytical unit 402 of the generating means of reply content shown in fig. 5 may include:
First determines subelement 4021, and for determining the current data type for telling content, data type includes at least text
Any one in this type, audio types, picture type and video type.
First analysis subelement 4022, the current data type for determining when the first determining subelement 4021 is text class
It when type, is analyzed by several text content analysis models content is told, obtains each text content analysis model pair
That answers tells characterize data.
Second analysis subelement 4023, the current data type for determining when the first determining subelement 4021 is audio class
When any one in type, picture type and video type, divided by several content analysis models content is told
Analysis obtains the corresponding text of each content analysis model and tells characterize data, and passes through several text content analysis models pair
Text is told characterize data and is analyzed, and obtains that each text content analysis model is corresponding to tell characterize data.
In the embodiment of the present invention, it can be carried out by tell content of each content analysis model to the person of telling got
Analysis, so that obtaining this tells that content is corresponding to tell characterize data, so as to tell characterization according to tell that content analysis obtains
Data are more accurate.
As an alternative embodiment, the generation unit 403 of the generating means of reply content shown in fig. 5 can wrap
It includes:
Second determines subelement 4031, for determining each data type for telling characterize data;
Third determines subelement 4032, for from replying, determining in generation mould group and second to determine what subelement 4031 determined
The matched reply of data type for telling characterize data generates model, wherein one is told the data type matching of characterize data
One reply generates model;
Input subelement 4033, for will tell characterize data input with third determine subelement 4032 determine tell table
The matched reply of data type for levying data generates in model;
Subelement 4034 is obtained, for inputting several reply generation moulds for telling characterize data from input subelement 4033
It is obtained in type and tells the corresponding reply content of content.
Wherein, implement this embodiment, can determine each data type for telling characterize data, and according to data class
The corresponding reply of type generates model and generates reply content, so that the reply content generated tells characterize data with any one
Match, i.e., any one tells characterize data can find matching content in reply content, to improve reply
Content it is comprehensive.
As it can be seen that implementing the generating means of reply content described in Fig. 5, reply content can be made to tell with what user inputted
Content is more bonded, and has not only been improved to the efficiency for telling content reply, but also has been improved the usage experience of user.In addition, implementing Fig. 5
Described device ensure that the accuracy replied and generate model construction.In addition, implementing device described in Fig. 5, root can be made
According to tell that content analysis obtains to tell characterize data more accurate.In addition, implementing device described in Fig. 5, reply is improved
Content it is comprehensive.
Embodiment seven
Referring to Fig. 6, Fig. 6 is the structural representation of the generating means of another reply content disclosed by the embodiments of the present invention
Figure.Wherein, the generating means of reply content shown in fig. 6 are that the generating means of reply content as shown in Figure 5 optimize
It arrives.The input subelement 4033 of the generating means of reply content shown in fig. 6 may include:
First input module 40331, for by each data told characterize data and input and tell respectively characterize data
The reply of type matching generates in model.Alternatively,
Composite module 40332 is combined according to preset data built-up pattern for that will tell characterize data, obtains several
Target tells characterize data, and obtains the target data type that each target tells characterize data.
Second input module 40333, the target for obtaining composite module 40332 tell characterize data input and target
The matched reply of target data type for telling characterize data generates in model.
In the embodiment of the present invention, each that can be will acquire tells characterize data and is input to corresponding reply life
At in model, with obtain it is each tell the corresponding reply content of characterize data so that obtained reply content is told with the person of telling
Content more match.Further, it is also possible to which the matched characterize data of telling of data type is combined, several targets are obtained
Characterize data is told, and then several are told into characterize data and is inputted in corresponding reply generation model respectively, it is each to obtain
Target tells the corresponding reply content of characterize data, simplifies the process replied and generate the reply content that model generates, improves
The efficiency that reply content generates.
As an alternative embodiment, composite module 40332 will tell characterize data according to preset data combination die
Type is combined, and is obtained several targets and is told characterize data, and obtains the target data type that each target tells characterize data
Mode be specifically as follows:
Tell characterize data by each and be grouped according to data type, obtain several groups data type it is different tell table
Levy data group;
The identical characterize data of telling of content that same group is told in characterize data group is marked, it is identical in content
It tells a reservation one in characterize data and tells characterize data, and the characterize data of telling not retained is deleted, so that any one
A content for telling characterize data told in characterize data group is all unique;
Each characterize data of telling told in characterize data group is combined respectively, obtains, characterize data will be told
It is combined according to preset data built-up pattern, obtains several targets and tell characterize data;
Determine that each target tells the target data type of characterize data.
Wherein, implement this embodiment, can data type is identical and content also identical characterize data of telling is deleted
It removes, so that each tell telling characterize data and will not all repeat in characterize data group, to guarantee to tell characterization according to each
It is not in duplicate content that the target that data groups obtain, which is told in characterize data, can also improve the memory of electronic equipment
Space.
As an alternative embodiment, the acquisition subelement 4034 of the generating means of reply content shown in fig. 6 can
To include:
Module 40341 is obtained, obtains several revertant contents for replying in model from several, wherein one is returned
Multiple sub- content is from a reply model;
Module 40342 is integrated, integrates, obtains for several revertant contents that module 40341 obtains will to be obtained
Tell the corresponding reply content of content.
Wherein, implement this embodiment, the content that each reply model generates can be determined as revertant content, into
And integrate revertant content, final reply content is obtained, to ensure that reply content includes each reply model
The revertant content of generation, so ensure that reply content with tell content and more match.
As an alternative embodiment, the integration module 40342 of the generating means of reply content shown in fig. 6 can be with
Include:
Detection sub-module 403421, for detecting the quantity for telling the corresponding revertant content of content;
Submodule 403422 is combined, for detecting that the quantity of revertant content is multiple when detection sub-module 403421
When, each revertant content is combined according to default reply composite module, obtains telling the corresponding reply content of content;
Submodule 403423 is determined, for detecting that the quantity of revertant content is one when detection sub-module 403421
When, revertant content is determined as to tell the corresponding reply content of content.
Wherein, implement this embodiment, can be determined according to the quantity for replying the revertant content that model generates final
Reply content generating mode, if the quantity of revertant content only one when, can directly by the revertant content make
For reply content output, if when the quantity more than one of revertant content, it can be directly by all revertant contents into group
It closes, the final reply content after being combined, and exports final reply content, to improve the effect for generating reply content
Rate.
As an alternative embodiment, the combination submodule 403422 of the generating means of reply content shown in fig. 6
May include:
Combine component 4034221, when for detecting that the quantity of revertant content is multiple when detection sub-module 403421,
Each revertant content is combined according to default reply composite module, obtains initial reply content;
Optimization component 4034222, for optimizing operation to the initial reply content that combine component 4034221 obtains,
Obtain final telling the corresponding reply content of content, wherein optimization operation include at least grammatically wrong sentence amendment operation and/or replacement/
Delete sensitive word operation.
It wherein, can also include placeholder processing (such as UNK placeholder is replaced), language to the optimization operation of initial reply content
Adopted entity replaces (the general pronoun " she " in initial reply content is such as replaced with to the title " small beautiful " told in content), implements
This embodiment can optimize the reply content of output, with reduce grammatically wrong sentence present in reply content, sensitive word with
And the problems such as wrong word, and the readability of reply content can also be optimized, to improve the usage experience for the person of telling.
As it can be seen that implementing the generating means of reply content described in Fig. 6, reply content can be made to tell with what user inputted
Content is more bonded, and has not only been improved to the efficiency for telling content reply, but also has been improved the usage experience of user.In addition, implementing Fig. 6
Described device, the reply content that can make more are matched with the content that the person of telling tells.It is retouched in addition, implementing Fig. 6
The device stated improves the efficiency of reply content generation.In addition, implementing device described in Fig. 6, electronic equipment can be improved
Memory headroom.In addition, implement device described in Fig. 6, ensure that reply content with tell content and more match.In addition, implementing
Device described in Fig. 6 improves the efficiency for generating reply content.In addition, implementing device described in Fig. 6, the person of telling is improved
Usage experience.
Embodiment eight
Referring to Fig. 7, Fig. 7 is the structural schematic diagram of a kind of electronic equipment disclosed by the embodiments of the present invention.As shown in fig. 7,
The electronic equipment may include:
It is stored with the memory 701 of executable program code;
The processor 702 coupled with memory 701;
Wherein, processor 702 calls the executable program code stored in memory 701, executes the above each method and implements
Some or all of method in example step.
A kind of computer readable storage medium is also disclosed in the embodiment of the present invention, wherein computer-readable recording medium storage
Program code, wherein program code includes for executing some or all of the method in above each method embodiment step
Instruction.
A kind of computer program product is also disclosed in the embodiment of the present invention, wherein when computer program product on computers
When operation, so that computer executes some or all of the method in such as above each method embodiment step.
The embodiment of the present invention is also disclosed a kind of using distribution platform, wherein using distribution platform for issuing computer journey
Sequence product, wherein when computer program product is run on computers, so that computer executes such as the above each method embodiment
In some or all of method step.
It should be understood that " embodiment of the present invention " that specification is mentioned in the whole text mean special characteristic related with embodiment,
Structure or characteristic is included at least one embodiment of the present invention.Therefore, the whole instruction occur everywhere " in the present invention
In embodiment " not necessarily refer to identical embodiment.In addition, these a particular feature, structure, or characteristics can be with any suitable
Mode combines in one or more embodiments.Those skilled in the art should also know that embodiment described in this description
Alternative embodiment is belonged to, related actions and modules are not necessarily necessary for the present invention.
In various embodiments of the present invention, it should be appreciated that magnitude of the sequence numbers of the above procedures are not meant to execute suitable
Successively, the execution sequence of each process should be determined by its function and internal logic the certainty of sequence, without coping with the embodiment of the present invention
Implementation process constitutes any restriction.
In addition, the terms " system " and " network " are often used interchangeably herein.It should be understood that the terms
"and/or", only a kind of incidence relation for describing affiliated partner, indicates may exist three kinds of relationships, such as A and/or B, can
To indicate: individualism A exists simultaneously A and B, these three situations of individualism B.In addition, character "/" herein, typicallys represent
Forward-backward correlation object is a kind of relationship of "or".
In embodiment provided by the present invention, it should be appreciated that " B corresponding with A " indicates that B is associated with A, can be with according to A
Determine B.It is also to be understood that determine that B is not meant to determine B only according to A according to A, it can also be according to A and/or other information
Determine B.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage
Medium include read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory,
RAM), programmable read only memory (Programmable Read-only Memory, PROM), erasable programmable is read-only deposits
Reservoir (Erasable Programmable Read Only Memory, EPROM), disposable programmable read-only memory (One-
Time Programmable Read-Only Memory, OTPROM), the electronics formula of erasing can make carbon copies read-only memory
(Electrically-Erasable Programmable Read-Only Memory, EEPROM), CD-ROM (Compact
Disc Read-Only Memory, CD-ROM) or other disc memories, magnetic disk storage, magnetic tape storage or can
For carrying or any other computer-readable medium of storing data.
Above-mentioned unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, can be in one place, or may be distributed over multiple nets
On network unit.Some or all of units can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
In addition, each functional unit in various embodiments of the present invention can integrate in one processing unit, it is also possible to
Each unit physically exists alone, and can also be integrated in one unit with two or more units.Above-mentioned integrated unit
Both it can take the form of hardware realization, can also realize in the form of software functional units.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product,
It can store in a retrievable memory of computer.Based on this understanding, technical solution of the present invention substantially or
Person says all or part of of the part that contributes to existing technology or the technical solution, can be in the form of software products
It embodies, which is stored in a memory, including several requests are with so that a computer is set
Standby (can be personal computer, server or network equipment etc., specifically can be the processor in computer equipment) executes
Some or all of each embodiment above method of the invention step.
The generation method and device of a kind of reply content disclosed by the embodiments of the present invention are described in detail above, this
Apply that a specific example illustrates the principle and implementation of the invention in text, the explanation of above example is only intended to
It facilitates the understanding of the method and its core concept of the invention;At the same time, for those skilled in the art, think of according to the present invention
Think, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as pair
Limitation of the invention.
Claims (14)
1. a kind of generation method of reply content, which is characterized in that the described method includes:
Obtain the person of telling tells content;
The content of telling is analyzed, several is obtained and tells characterize data, it is described tell characterize data and include at least tell
State text data;
Characterize data is told as foundation using described several, tells the corresponding reply of content described in the generation of mould group by replying to generate
Content, the reply content are matched with any one of characterize data of telling.
2. being obtained several the method according to claim 1, wherein described analyze the content of telling
It is a to tell characterize data, comprising:
The current data type of content is told described in determination, the data type includes at least text type, audio types, picture
Any one in type and video type;
When the current data type is the text type, by several text content analysis models in described tell
Appearance is analyzed, and obtains that each text content analysis model is corresponding to tell characterize data;
When the current data type is any one in the audio types, the picture type and the video type
When, the content of telling is analyzed by several content analysis models, it is corresponding to obtain each content analysis model
Text tell characterize data, and characterize data is told to the text by several text content analysis models and is divided
Analysis, obtains that each text content analysis model is corresponding to tell characterize data.
3. method according to claim 1 or 2, which is characterized in that it is described with described several tell characterize data be according to
According to by telling the corresponding reply content of content described in reply generation mould group generation, comprising:
Determine each data type for telling characterize data;
The determining and described matched reply generation model of data type for telling characterize data in mould group is generated from replying, wherein
The data type that characterize data is told described in one matches the reply and generates model;
Characterize data input and the matched reply generation model of the data type for telling characterize data are told by described
In;
It is generated from reply described in several and tells the corresponding reply content of content described in obtaining in model.
4. according to the method described in claim 3, it is characterized in that, described tell described characterize data input and tell with described
The matched reply of the data type of characterize data generates in model, comprising:
Each characterize data of telling is inputted and the matched reply of data type for telling characterize data respectively
It generates in model;Alternatively,
It tells characterize data by described and is combined according to preset data built-up pattern, obtain several targets and tell characterize data,
And obtain the target data type that each target tells characterize data;
The target is told into characterize data input and the target tells the matched reply of target data type of characterize data
It generates in model.
5. according to the method described in claim 4, it is characterized in that, described generate in model from reply described in several obtains institute
Statement states the corresponding reply content of content, comprising:
Several revertant contents are obtained from several described described reply models, wherein a revertant content is come
From in a reply model;
Several described revertant contents are integrated, obtain described telling the corresponding reply content of content.
6. according to the method described in claim 5, it is characterized in that, described integrate several described revertant contents,
The corresponding reply content of content is told described in obtaining, comprising:
The quantity of the corresponding revertant content of content is told described in detection;
When the quantity for detecting the revertant content is multiple, according to default reply built-up pattern by each revertant
Content is combined, and obtains described telling the corresponding reply content of content;
When the quantity for detecting the revertant content is one, the revertant content is determined as described to tell content pair
The reply content answered.
7. according to the method described in claim 6, it is characterized in that, the default built-up pattern of replying of the basis is by each described time
Multiple sub- content is combined, and obtains described telling the corresponding reply content of content, comprising:
Each revertant content is combined according to default reply built-up pattern, obtains initial reply content;
Operation is optimized to the initial reply content, obtains final described telling the corresponding reply content of content, wherein
The optimization operation includes at least grammatically wrong sentence amendment operation and/or replacement/deletion sensitive word operation.
8. a kind of generating means of reply content characterized by comprising
Acquiring unit tells content for obtain the person of telling;
Analytical unit obtains several and tells characterize data for analyzing the content of telling, described to tell characterization number
Text data is told according to including at least;
Generation unit is told described in the generation of mould group for telling characterize data as foundation using described several by replying to generate
The corresponding reply content of content, the reply content are matched with any one of characterize data of telling.
9. the generating means of reply content according to claim 8, which is characterized in that the analytical unit includes:
First determines subelement, and for telling the current data type of content described in determination, the data type includes at least text
Any one in this type, audio types, picture type and video type;
First analysis subelement, for passing through several content of text when the current data type is the text type
Analysis model analyzes the content of telling, and obtains that each text content analysis model is corresponding to tell characterization number
According to;
Second analysis subelement, for being the audio types, the picture type and described when the current data type
When any one in video type, the content of telling is analyzed by several content analysis models, is obtained each
The corresponding text of the content analysis model tells characterize data, and by several text content analysis models to the text
It tells characterize data to be analyzed, obtains that each text content analysis model is corresponding to tell characterize data.
10. the generating means of reply content according to claim 8 or claim 9, which is characterized in that the generation unit includes:
Second determines subelement, for determining each data type for telling characterize data;
Third determines subelement, for matched with the data type for telling characterize data from determination in generation mould group is replied
It replys and generates model, wherein the data type for telling characterize data described in one matches the reply and generates model;
Subelement is inputted, for telling characterize data input and the matched institute of data type for telling characterize data for described
Reply is stated to generate in model;
Subelement is obtained, described tells the corresponding reply content of content for generating to obtain in model from reply described in several.
11. the generating means of reply content according to claim 10, which is characterized in that the input subelement includes:
First input module, for inputting and the data class for telling characterize data each characterize data of telling respectively
The matched reply of type generates in model;Alternatively,
Composite module obtains several targets for telling characterize data by described and being combined according to preset data built-up pattern
Characterize data is told, and obtains the target data type that each target tells characterize data;
Second input module tells the number of targets of characterize data with the target for the target to be told characterize data input
It is generated in model according to the reply of type matching.
12. the generating means of reply content according to claim 11, which is characterized in that the acquisition subelement includes:
Module is obtained, for obtaining several revertant contents from several described described reply models, wherein described in one
Revertant content is from a reply model;
Module is integrated, for integrating several described revertant contents, obtains described tell in the corresponding reply of content
Hold.
13. the generating means of reply content according to claim 12, which is characterized in that the module of integrating includes:
Detection sub-module, for detecting the quantity for telling the corresponding revertant content of content;
Combine submodule, for when detect the revertant content quantity be it is multiple when, according to default reply built-up pattern
Each revertant content is combined, obtains described telling the corresponding reply content of content;
Submodule is determined, for when the quantity for detecting the revertant content is one, the revertant content to be determined
The corresponding reply content of content is told to be described.
14. the generating means of reply content according to claim 13, which is characterized in that the combination submodule includes:
Combine component, for being incited somebody to action according to default reply built-up pattern when the quantity for detecting the revertant content is multiple
Each revertant content is combined, and obtains initial reply content;
Optimization component obtains that final described to tell content corresponding for optimizing operation to the initial reply content
Reply content, wherein the optimization operation includes at least grammatically wrong sentence amendment operation and/or replacement/deletion sensitive word operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910322333.9A CN110059231B (en) | 2019-04-19 | 2019-04-19 | Reply content generation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910322333.9A CN110059231B (en) | 2019-04-19 | 2019-04-19 | Reply content generation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110059231A true CN110059231A (en) | 2019-07-26 |
CN110059231B CN110059231B (en) | 2021-10-19 |
Family
ID=67319871
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910322333.9A Active CN110059231B (en) | 2019-04-19 | 2019-04-19 | Reply content generation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110059231B (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105574133A (en) * | 2015-12-15 | 2016-05-11 | 苏州贝多环保技术有限公司 | Multi-mode intelligent question answering system and method |
CN105630917A (en) * | 2015-12-22 | 2016-06-01 | 成都小多科技有限公司 | Intelligent answering method and intelligent answering device |
CN105893523A (en) * | 2016-03-31 | 2016-08-24 | 华东师范大学 | Method for calculating problem similarity with answer relevance ranking evaluation measurement |
CN105913039A (en) * | 2016-04-26 | 2016-08-31 | 北京光年无限科技有限公司 | Visual-and-vocal sense based dialogue data interactive processing method and apparatus |
US20160259846A1 (en) * | 2015-03-02 | 2016-09-08 | International Business Machines Corporation | Query disambiguation in a question-answering environment |
US20170177715A1 (en) * | 2015-12-21 | 2017-06-22 | Adobe Systems Incorporated | Natural Language System Question Classifier, Semantic Representations, and Logical Form Templates |
CN107992543A (en) * | 2017-11-27 | 2018-05-04 | 上海智臻智能网络科技股份有限公司 | Question and answer exchange method and device, computer equipment and computer-readable recording medium |
CN109284363A (en) * | 2018-12-03 | 2019-01-29 | 北京羽扇智信息科技有限公司 | A kind of answering method, device, electronic equipment and storage medium |
CN109299247A (en) * | 2018-06-05 | 2019-02-01 | 安徽省泰岳祥升软件有限公司 | Intent classifier method, apparatus and intelligent answer method based on business corpus |
CN109446302A (en) * | 2018-09-25 | 2019-03-08 | 中国平安人寿保险股份有限公司 | Question and answer data processing method, device and computer equipment based on machine learning |
CN109522393A (en) * | 2018-10-11 | 2019-03-26 | 平安科技(深圳)有限公司 | Intelligent answer method, apparatus, computer equipment and storage medium |
-
2019
- 2019-04-19 CN CN201910322333.9A patent/CN110059231B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160259846A1 (en) * | 2015-03-02 | 2016-09-08 | International Business Machines Corporation | Query disambiguation in a question-answering environment |
CN105574133A (en) * | 2015-12-15 | 2016-05-11 | 苏州贝多环保技术有限公司 | Multi-mode intelligent question answering system and method |
US20170177715A1 (en) * | 2015-12-21 | 2017-06-22 | Adobe Systems Incorporated | Natural Language System Question Classifier, Semantic Representations, and Logical Form Templates |
CN105630917A (en) * | 2015-12-22 | 2016-06-01 | 成都小多科技有限公司 | Intelligent answering method and intelligent answering device |
CN105893523A (en) * | 2016-03-31 | 2016-08-24 | 华东师范大学 | Method for calculating problem similarity with answer relevance ranking evaluation measurement |
CN105913039A (en) * | 2016-04-26 | 2016-08-31 | 北京光年无限科技有限公司 | Visual-and-vocal sense based dialogue data interactive processing method and apparatus |
CN107992543A (en) * | 2017-11-27 | 2018-05-04 | 上海智臻智能网络科技股份有限公司 | Question and answer exchange method and device, computer equipment and computer-readable recording medium |
CN109299247A (en) * | 2018-06-05 | 2019-02-01 | 安徽省泰岳祥升软件有限公司 | Intent classifier method, apparatus and intelligent answer method based on business corpus |
CN109446302A (en) * | 2018-09-25 | 2019-03-08 | 中国平安人寿保险股份有限公司 | Question and answer data processing method, device and computer equipment based on machine learning |
CN109522393A (en) * | 2018-10-11 | 2019-03-26 | 平安科技(深圳)有限公司 | Intelligent answer method, apparatus, computer equipment and storage medium |
CN109284363A (en) * | 2018-12-03 | 2019-01-29 | 北京羽扇智信息科技有限公司 | A kind of answering method, device, electronic equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
YEHONG PENG等: "Topic-enhanced emotional conversation generation with attention mechanism", 《KNOWLEDGE-BASED SYSTEMS》 * |
宋皓宇等: "基于DQN的开放域多轮对话策略学习", 《中文信息学报》 * |
Also Published As
Publication number | Publication date |
---|---|
CN110059231B (en) | 2021-10-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Byrne | Kant on god | |
De Waal | Peirce: A guide for the perplexed | |
Gibbs | The poetics of mind: Figurative thought, language, and understanding | |
Fodor | Precis of the modularity of mind | |
CN110148318B (en) | Digital teaching assistant system, information interaction method and information processing method | |
Taylor et al. | The construction of identities in narratives about serious leisure occupations | |
Sluga | Ludwig Wittgenstein: life and work. An introduction | |
CN101799849A (en) | Method for realizing non-barrier automatic psychological consult by adopting computer | |
De Warren et al. | New Approaches to Neo-Kantianism | |
Pereplyotchik | Psychosyntax: the nature of grammar and its place in the mind | |
CN114676259B (en) | Conversation emotion recognition method based on causal perception interactive network | |
Chen et al. | Construction of affective education in mobile learning: The study based on learner’s interest and emotion recognition | |
WO2022174161A1 (en) | Systems and methods for psychotherapy using artificial intelligence | |
Kinsbourne | Parallel processing explains modular informational encapsulation | |
Fodor | Reply module | |
Popp | Naturalizing philosophy of education: John Dewey in the postanalytic period | |
CN110059231A (en) | A kind of generation method and device of reply content | |
Sternberg | Controlled versus automatic processing | |
Seidenberg | Lexicon as module | |
Burbidge | Ideas, Concepts, and Reality | |
Gardner | The centrality of modules | |
Jusczyk et al. | What constitutes a module? | |
Mattingly et al. | Vertically unparalleled | |
Bird | Faith, feminism, and the forum of Scripture: Essays on biblical theology and hermeneutics | |
Metcalf | Lessons on the Road to Emmaus: Intertextual Connections between Luke-Acts and Israel’s Scriptures |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210922 Address after: 423300 group 1, yancuiping, Langshi village, Santang Township, Yongxing County, Chenzhou City, Hunan Province Applicant after: Kang Zhonghua Address before: 510663 office card booth A127 of Greenland international maker center on the first, second and third floors, building C2, No. 72, science Avenue, high tech Industrial Development Zone, Guangzhou, Guangdong Applicant before: Media (Guangzhou) Technology Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |