CN109697229A - Reply content generation method and device - Google Patents

Reply content generation method and device Download PDF

Info

Publication number
CN109697229A
CN109697229A CN201811569727.6A CN201811569727A CN109697229A CN 109697229 A CN109697229 A CN 109697229A CN 201811569727 A CN201811569727 A CN 201811569727A CN 109697229 A CN109697229 A CN 109697229A
Authority
CN
China
Prior art keywords
event
sentence
event sentence
dimension
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811569727.6A
Other languages
Chinese (zh)
Inventor
冯诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201811569727.6A priority Critical patent/CN109697229A/en
Publication of CN109697229A publication Critical patent/CN109697229A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a reply content generation method and a reply content generation device, wherein the method comprises the following steps: the method comprises the steps of obtaining received content and extracting a target event type of the received content; acquiring at least one dimensional event sentence matched with the target event type from an event sentence knowledge base; taking the event sentence of at least one dimension matched with the target event type as candidate reply content; and displaying the candidate reply content. Therefore, the candidate reply contents with different dimensions according to the event type are automatically returned according to the event type of the received content, and the candidate reply contents with different dimensions are provided for the user, so that the selection of the user is enriched, the quick reply is realized, and the communication efficiency is improved.

Description

Reply content generation method and device
Technical field
The present invention relates to natural language processing technique field more particularly to a kind of reply content generation method and devices.
Background technique
With the development of artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) technology, artificial intelligence has been penetrated into more Come in more application fields, for example, robot, language identification, image recognition, natural language processing and expert system etc. are applied Field.It in the conversational interactive scene of natural language processing field, may be implemented to automatically reply by artificial intelligence technology, come User is helped to promote communication efficiency.
In the related technology, the mode automatically replied is specific as follows;Keyword is extracted from the conversation content of input, based on searching Index, which is held up, to be scanned for, and search is obtained search result corresponding with keyword as system replies and is automatically fed to user.
However, being only to search for a plurality of search result relevant to keyword, nothing based on the mode that keyword automatically replies Method provides the search result of the different dimensions of the event type of the conversation content based on input.Obviously, it is returned automatically based on keyword Multiple mode can not be automatically replied from the different dimensions of event type, and communication efficiency has to be hoisted.
Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.
For this purpose, the first purpose of this invention is to propose a kind of reply content generation method.
Second object of the present invention is to propose a kind of reply content generating means.
Third object of the present invention is to propose another reply content generating means.
Fourth object of the present invention is to propose a kind of non-transitorycomputer readable storage medium.
5th purpose of the invention is to propose a kind of computer program product.
In order to achieve the above object, first aspect present invention embodiment proposes a kind of reply content generation method, comprising:
Obtain the content received, and the object event type of the content received described in extraction;
The event sentence of at least one dimension to match with the object event type is obtained in event sentence knowledge base, In, the event sentence knowledge base includes at least one event type, and belong at least one dimension of each event type Event sentence set, each event sentence critical event element having the same in the event sentence set of each dimension;
Using the event sentence of at least one dimension to match with the object event type as candidate reply content;
Show the candidate reply content.
Further, described that at least one dimension to match with the object event type is obtained in event sentence knowledge base The event sentence of degree, comprising:
It is obtained at random or in the event sentence knowledge base according to default screening rule and the object event type matching Predetermined number event sentence set;
It is obtained from each event sentence set of the event sentence set of predetermined number respectively at random or according to default selection rule An event sentence is taken, the event sentence of predetermined number is obtained;
Using the event sentence of obtained predetermined number as at least one dimension with the object event type matching Event sentence.
Further, described to be selected in the event sentence knowledge base according to default screening rule and the object event class The event sentence set of the matched predetermined number of type includes:
Determine history keyword Event element corresponding with the content that historical reception arrives;
It is filtered out from event sentence knowledge base and the object event type matching according to the history keyword Event element Predetermined number event sentence set, wherein the critical event of each event sentence set in the event sentence set of predetermined number Element is different from history keyword Event element.
Further, described regular respectively from each event sentence collection of the event sentence set of predetermined number according to default selection An event sentence is obtained in conjunction, comprising:
Count the selection number that each event sentence is selected as reply content;
A selection number is selected to meet from each event sentence set of the event sentence set of predetermined number respectively default The event sentence of condition.
Further, the method also includes:
Establish the event sentence knowledge base.
Further, the event sentence knowledge base of establishing includes:
It determines at least one event type, and belongs to each event sentence of each event type;
For each event type, the critical event element of each event sentence is determined according to preset rules;
Clustering is carried out to each event sentence according to each critical event element, by each event Sentence is divided into the event sentence set of at least one dimension, wherein each event sentence in the event sentence set of each dimension has Identical critical event element.
Further, the critical event element that each event sentence is determined according to preset rules, comprising:
Determine the trigger word of each Event element and each event sentence that form each event sentence;
According to the trigger word from each Event element, the critical event element of each event sentence is determined.
Reply content generation method provided in an embodiment of the present invention by obtaining the content received, and is extracted and is received Content object event type;At least one dimension to match with object event type is obtained in event sentence knowledge base Event sentence;Using the event sentence of at least one dimension to match with the object event type as candidate reply content;It shows Candidate's reply content.To realize that basis receives the event type auto-returned of content according to the different dimensional of event type The candidate reply content of degree, the candidate reply content due to having provided a user different dimensions enrich user's selection to user, Quick-return is realized, communication efficiency is improved.
In order to achieve the above object, second aspect of the present invention embodiment proposes a kind of reply content generating means, comprising:
Abstraction module, for obtaining the content received, and the object event type of the content received described in extraction;
Module is obtained, for obtaining at least one dimension to match with the object event type in event sentence knowledge base The event sentence of degree, wherein the event sentence knowledge base includes at least one event type, and belongs to each event type extremely Lack the event sentence set of a dimension, the critical event member having the same of each event sentence in the event sentence set of each dimension Element;
Determining module, the event sentence of at least one dimension for will match with the object event type is as candidate Reply content;
Display module, for showing the candidate reply content.
Further, the acquisition module includes first unit, second unit, third unit:
The first unit, for it is random or obtained in the event sentence knowledge base according to default screening rule with it is described The event sentence set of the predetermined number of object event type matching;
The second unit, at random or according to default selection rule respectively from the every of the event sentence set of predetermined number An event sentence is obtained in a event sentence set, obtains the event sentence of predetermined number;
The third unit, for using the event sentence of obtained predetermined number as with the object event type matching At least one dimension event sentence.
Further, the first unit is specifically used for:
Determine history keyword Event element corresponding with the content that historical reception arrives;
It is filtered out from event sentence knowledge base and the object event type matching according to the history keyword Event element Predetermined number event sentence set, wherein the critical event of each event sentence set in the event sentence set of predetermined number Element is different from history keyword Event element.
Further, the second unit is specifically used for:
Count the selection number that each event sentence is selected as reply content;
A selection number is selected to meet from each event sentence set of the event sentence set of predetermined number respectively default The event sentence of condition.
Further, described device further include:
Module is established, for establishing the event sentence knowledge base.
Further, the module of establishing includes the first determination unit, the second determination unit, division unit:
First determination unit for determining at least one event type, and belongs to each of each event type Event sentence;
Second determination unit determines each event sentence according to preset rules for being directed to each event type Critical event element;
The division unit, for carrying out cluster point to each event sentence according to each critical event element Each event sentence, is divided into the event sentence set of at least one dimension, wherein the event sentence set of each dimension by analysis In each event sentence critical event element having the same.
Further, second determination unit is specifically used for:
Determine the trigger word of each Event element and each event sentence that form each event sentence;
According to the trigger word from each Event element, the critical event element of each event sentence is determined.
Reply content generating means provided in an embodiment of the present invention by obtaining the content received, and are extracted and are received Content object event type;At least one dimension to match with object event type is obtained in event sentence knowledge base Event sentence;Using the event sentence of at least one dimension to match with the object event type as candidate reply content;It shows Candidate's reply content.To realize that basis receives the event type auto-returned of content according to the different dimensional of event type The candidate reply content of degree, the candidate reply content due to having provided a user different dimensions enrich user's selection to user, Quick-return is realized, communication efficiency is improved.
In order to achieve the above object, third aspect present invention embodiment proposes another reply content generating means, including deposit Reservoir, processor and storage on a memory and the computer program that can run on a processor, described in the processor execution Reply content generation method as described above is realized when program.
To achieve the goals above, fourth aspect present invention embodiment proposes a kind of computer-readable storage of non-transitory Medium realizes reply content generation method as described above when the instruction in the storage medium is executed by processor.
In order to achieve the above object, fifth aspect present invention embodiment proposes a kind of computer program product, when the calculating When instruction processing unit in machine program product executes, reply content generation method as described above is realized.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partially become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is a kind of flow diagram of reply content generation method provided in an embodiment of the present invention;
Fig. 2 is the chat interactive interface of illustrative instant message applications;
Fig. 3 is the flow diagram of another reply content generation method provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of reply content generating means provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of another reply content generating means provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of another reply content generating means provided in an embodiment of the present invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings the reply content generation method and device of the embodiment of the present invention are described.
Fig. 1 is a kind of flow diagram of reply content generation method provided in an embodiment of the present invention.As shown in Figure 1, should Reply content generation method, comprising the following steps:
The content that S101, acquisition receive, and extract the object event type of the content received.
The executing subject of reply content generation method provided in an embodiment of the present invention is reply content generating means, the execution Main body is made of hardware and/or software, and reply content generating means are specifically as follows hardware device, such as terminal device, backstage The software etc. installed on server etc. or hardware device.Wherein, which can be individual software, or insertion Software tool into application program.Wherein, the instant message applications such as application program such as wechat, QQ.
In the present embodiment, the content received can be text information, audio-frequency information etc., and but it is not limited to this.For example, with Family A and user B is passing through instant message applications and is chatting, the use that user A sees in the chat interface of instant message applications The transmission content of family B, the transmission content for the user B that user A is seen can be understood as the content that user A is received, Ke Yili Solution, user A are the recipient of " content received ", and user B is the sender of " content received ".
In the present embodiment, after obtaining the content received, the content received is carried out using Event Extraction Event extraction extracts the object event type of the content received.When the content received is text information, thing is utilized Part extraction technique carries out event extraction to the text information, to extract the object event type of the content received.When this connects When the content received is audio-frequency information, which is analyzed, the corresponding text information of the audio-frequency information is obtained.It utilizes Event Extraction carries out event extraction to the corresponding text information of the audio-frequency information, to extract the target of the content received Event type.The relevant technologies are detailed in about the more introductions for extracting event type from information using Event Extraction.
S102, the event sentence that at least one dimension to match with object event type is obtained in event sentence knowledge base.
Specifically, to different application fields, the extraction of event sentence is all the core link in event extraction.Event sentence can be with It is construed to relate to the sentence of time, place or personage of event etc., includes the interested event information of user in event sentence.
In the present embodiment, event sentence knowledge base includes at least one event type, and belongs to each event type extremely The event sentence set of a few dimension.It is understood that event sentence knowledge base stores whole things of multiple event types Part sentence, meanwhile, each event type is subdivided into multiple dimensions again, according to dimension to whole event sentences of each event type into Row storage, specifically, the event sentence of identical dimensional is clustered into same event sentence set.
For example, the sum of the event type in event sentence knowledge base be it is N number of, N is integer greater than 1;Nth event type Event sentence set including M dimension, n are 1 any integer into N, and M is the integer greater than 1.
It should be pointed out that each event sentence critical event member having the same in the event sentence set of each dimension Element.It is understood that dimension and critical event element correspond, there is the critical event element of several types just there are several dimensions Degree.
It should be pointed out that critical event element is to be obtained by analysis group at each Event element of event sentence, it can To be interpreted as the interested event information of user's most probable in the event sentence.For example, " we go to climb the mountain OK at weekend " this thing " place " is determined as the critical event element of the event sentence by part sentence, i.e., in this event sentence, " place " may be user user The interested event information of most probable.
In one possible implementation, the specific implementation of step S102 are as follows:
It is S1021, random or is obtained in event sentence knowledge base according to default screening rule and object event type matching The event sentence set of predetermined number.
In the present embodiment, randomly selecting event sentence set can guarantee that the selected probability of each event sentence set is identical , diversified event sentence set is selected in realization, in this way, subsequent be capable of providing diversified candidate reply content to use Family selection, enriches the selection of user.
In the present embodiment, it can guarantee precisely to select in a directional manner according to default screening rule selection event sentence set Event sentence set.Wherein, it presets screening rule to be set according to practical situation, it is not limited here.
In one possible implementation, it " is selected in event sentence knowledge base according to default screening rule and target thing The event sentence set of the predetermined number of part type matching " the following steps are included:
S11, determination history keyword Event element corresponding with the content that historical reception arrives.
S12, filtered out from event sentence knowledge base according to history keyword Event element it is pre- with object event type matching If the event sentence set of number, wherein the critical event element of each event sentence set in the event sentence set of predetermined number It is different from history keyword Event element.
It is no longer heavy in candidate reply content in order to make since dimension and critical event element correspond in the present embodiment The content that multiplexing family historical reception arrives controls the critical event member of the event sentence set filtered out in filter events sentence set Element is not identical as the critical event element for the content that user's history receives, it will be able to control the dimension of the event sentence set filtered out The dimension for spending the content received with user's history is not identical.Specifically, first determine with historical reception to content corresponding go through History critical event element recycles history keyword Event element to screen the event sentence set in event sentence knowledge base, selects The critical event element for selecting out each event sentence set is different from history keyword Event element.
For example, showing candidate reply content " intends where to climb the mountain when the content received is " weekend, which is wanted to go to, climbs the mountain " ? " premise be, historical reception to content there is not " where climbing the mountain ", then in screening, the event sentence that filters out The critical event element of set is different from the critical event element of " where climbing the mountain ";Similarly, candidate reply content " Saturday is shown Or the premise on Sunday " is, historical reception to content there is not " weekend information ", then in screening, the thing that filters out The critical event element of part sentence set is different from the critical event element of " weekend information ";Similarly, show candidate reply content " with Who " premise be, historical reception to content there is not " people information ", then in screening, the event sentence that filters out The critical event element of set and the critical event element of " people information " are different.It is S1022, random or regular according to default selection An event sentence is obtained from each event sentence set of the event sentence set of predetermined number respectively, obtains the event of predetermined number Sentence.
In the present embodiment, the event sentence of randomly selecting can guarantee that the selected probability of each event sentence is identical, realization Diversified event sentence is selected, and then is capable of providing diversified candidate reply content and is selected to user, enriches user Selection.
In the present embodiment, it can guarantee the thing precisely selected in a directional manner according to the regular selection event sentence of default selection Part sentence.Wherein, it presets selection rule to be set according to practical situation, it is not limited here.
In one possible implementation, " according to default selection rule respectively from the event sentence set of predetermined number The specific implementation of one event sentence of acquisition in each event sentence set " are as follows:
S21, each event sentence of statistics are selected as the selection number of reply content.
In the present embodiment, in order to which the selection number for making each event sentence be selected as reply content can reflect the event sentence Temperature, can be based on big data digging technology, obtain and count the selection number that magnanimity event sentence is selected as reply content. Wherein, event sentence be selected as reply content selection number it is more, illustrate that the temperature of the event sentence is bigger, recommend user's meeting A possibility that being easily selected by a user is bigger
S22, a selection number is selected to meet from each event sentence set of the event sentence set of predetermined number respectively The event sentence of preset condition.
In the present embodiment, preset condition is set according to practical situation, and preset condition is, for example, 10 times.In each event Selection selection number is more than or equal to 10 event sentence in sentence set.
S1023, using the event sentence of obtained predetermined number as at least one dimension with object event type matching Event sentence.
In the present embodiment, after the content for being drawn into receiving corresponding object event type, in event sentence knowledge base Middle inquiry object event type, obtains the event sentence set of whole dimensions of the object event type, from the thing of whole dimensions The event sentence set that predetermined number is selected in part sentence set, then from each event sentence collection in the event sentence set of predetermined number An event sentence is selected in conjunction respectively, using each event sentence selected in the event sentence set from predetermined number as with target The event sentence of at least one matched dimension of event type.
It should be noted that predetermined number is arranged according to practical situation.When predetermined number is greater than the number of event sentence set When, then an event sentence is selected respectively from each event sentence set in whole event sentence set, it will be from whole events Event sentence of each event sentence as at least one dimension with object event type matching selected in sentence set.
For example, inquiry knows that object event type includes the event sentence set of 10 dimensions, predetermined number is 3, then from The event sentence Resource selection of 10 dimensions goes out the event sentence set of 3 dimensions, then, from the event for this 3 dimensions selected An event sentence is respectively selected in each event sentence set in sentence set, the event sentence of 3 different dimensions is obtained, this 3 come from Event sentence in the event sentence set of different dimensions is the event sentence with 3 dimensions of object event type matching.
In another example inquiry knows that object event type includes the event sentence set of 2 dimensions, predetermined number is 3, then from An event sentence is respectively selected in each event sentence set of the event sentence set of this 2 dimensions, the thing of 2 different dimensions is obtained Part sentence, the event sentence of this 2 different dimensions are the event sentence with 2 dimensions of object event type matching.
S103, using the event sentence of at least one dimension to match with object event type as candidate reply content.
S104, candidate reply content is shown.
In the present embodiment, using with the event sentence of at least one matched dimension of event type as with the content pair that receives The candidate reply content at least one dimension answered.User can select according to self-demand from the multiple candidate reply contents of principal and subordinate The sender for selecting one or more contents received to this replys.
Fig. 2 is the chat interactive interface of illustrative instant message applications.By taking Fig. 2 as an example, when the content that user A is received It determines that the event type of " weekend, which is wanted to go to, climbs the mountain " is " climbing the mountain " by Event Extraction for " weekend, which is wanted to go to, climbs the mountain ", then shows Candidate reply content to user A is respectively " intending where to climb the mountain? ", " Saturday or Sunday? ", " with whom? ", user A optionally one or more from multiple candidate reply contents of displaying replies to user B.
Wherein, " intend where climb the mountain? " corresponding is the event sentence of place dimension, and " Saturday or Sunday " is corresponding It is the event sentence of time dimension, it is the event sentence of personage's dimension that " with whom " corresponding.Provide place, time, Ren Wusan The candidate reply content of a dimension is selected for user.
Reply content generation method provided in an embodiment of the present invention by obtaining the content received, and is extracted and is received Content object event type;At least one dimension to match with object event type is obtained in event sentence knowledge base Event sentence;Using the event sentence of at least one dimension to match with object event type as candidate reply content;It shows candidate Reply content.To realize according to receiving the event type auto-returned of content according to the candidate of the different dimensions of event type Reply content, the candidate reply content due to having provided a user different dimensions enrich user's selection, realize fast to user Speed is replied, and communication efficiency is improved.
Fig. 3 is the flow diagram of another reply content generation method provided in an embodiment of the present invention.In conjunction with reference to figure 3, on the basis of embodiment shown in Fig. 1, before step S101, the reply content generation method is further comprising the steps of:
S105, event sentence knowledge base is established.
In one possible implementation, the specific implementation of step S105 are as follows:
S1051, it determines at least one event type, and belongs to each event sentence of each event type.
In the present embodiment, the corpus of magnanimity is collected first, the corpus of magnanimity is segmented, the pretreatment such as data cleansing, Obtain the event sentence of magnanimity;Then, event type extraction is carried out based on event sentence of the Event Extraction to magnanimity, determined each The event type of event sentence;Followed by the event sentence of magnanimity being classified according to event type, by each of similar events type A event sentence is grouped into same class.
By taking event type is to climb the mountain class activity as an example, in the movable corpus of class of climbing the mountain, it is possible that " we go at weekend Climb the mountain OK ", " weekend go can with ", " we together ".It, can be by " we go to climb the mountain OK at weekend ", " week then in classification End is gone can be with ", " we together " be all classified as the event sentence of " class of climbing the mountain activity ".
S1052, it is directed to each event type, the critical event element of each event sentence is determined according to preset rules.
In order to better understand, the event type identification in lower Event Extraction and event argument recognition are briefly introduced:
Event type identification is to judge in short whether express certain types of event, and event type determines event table The event of the template shown, different event type has different templates.More introductions about event type identification are detailed in correlation Technology.
Event argument recognition refers to the template according to affiliated event type, extracts corresponding Event element, and mark for it The process of upper correct element tags.For example, the template of birth event is { personage, time, place }, the Event element being related to point It Wei not personage, time, place.In another example the template of the attack of terrorism is that { place, time, attacker, victim are hurted sb.'s feelings Number }, Event element difference place, time, attacker, victim, number of injured people for being related to etc..
In the present embodiment, event argument recognition is carried out to each event sentence for belonging to same event type first, determines group At each Event element of each event sentence, determined from each Event element for forming each event sentence according to preset rules every The critical event element of a event sentence.
It should be noted that preset rules are configured according to practical situation.
For example, preset rules can be according to the trigger word in event sentence from each Event element of composition event sentence really The critical event element of the fixed event sentence.Specifically, trigger word indicates the core word that event occurs, mostly verb or noun.This In embodiment, the specific implementation of " the critical event element of each event sentence is determined according to preset rules " are as follows: firstly, determining Form each Event element of the event sentence;It is then determined the corresponding trigger word of event sentence, finally, according to trigger word from each The critical event element of the event sentence is determined in a Event element.
For example, preset rules can be according to the centre word in event sentence from each Event element of composition event sentence really The critical event element of the fixed event sentence.Specifically, the centre word of event sentence can be determined by centre word analysis method.Center Word analytic approach, which is called, does sentence element analytic approach, is the analysis of sentence method that traditional grammar uses.About centre word analytic approach It is more introduction be detailed in the relevant technologies.
By taking class life event type of climbing the mountain as an example, the Event element being related to is respectively time, place, personage etc..
In the event sentence of " class of climbing the mountain life event type ", including " we go to climb the mountain OK at weekend ", " weekend goes can be with ", three event sentences such as " we together ".
Wherein, " we go to climb the mountain OK at weekend " this event sentence, the Event element being related to be respectively we (personage), week Last (time) climbs the mountain (place).In this event sentence, trigger word is that " place " at this moment can be determined as the thing by " climbing the mountain " The critical event element of part sentence.
Wherein, " weekend go can with " this event sentence, the Event element being related to are weekend (time), at this moment, can will " time " is determined as the critical event element of the event sentence.
Wherein, " we together " this event sentence, the Event element being related to is our (personages), at this moment, can be by " people Object " is determined as the critical event element of the event sentence.
S1053, clustering is carried out to each event sentence according to each critical event element, each event sentence is divided For the event sentence set of at least one dimension.
In the present embodiment, each event sentence is classified according to critical event element, critical event member having the same Each event sentence of element returns into the event sentence set an of classification, and different classes of event sentence set has different critical events Element.
The event sentence set of one dimension of event sentence set expression of one classification, in the event sentence set of each dimension Each event sentence critical event element having the same.
By taking class life event type of climbing the mountain as an example, the critical event element being related to is respectively time, place, personage, then Each event sentence that critical event element is " time " is returned into a classification, is each thing in " place " by critical event element Part sentence returns into a classification, and each event sentence that critical event element is " personage " is returned into a classification.
Reply content generation method provided in an embodiment of the present invention establishes event sentence knowledge base based on Event Extraction, Event sentence knowledge base saves the event sentence of multiple dimensions of each event type, it is subsequent can be automatic based on event sentence knowledge base The candidate reply content for returning to the different dimensions according to event type, due to provided a user different dimensions it is candidate reply in Hold to user, enriches user's selection, realize Quick-return, improve communication efficiency.
Fig. 4 is a kind of structural schematic diagram of reply content generating means provided in an embodiment of the present invention.As shown in figure 4, packet Include: abstraction module 11 obtains module 12 and determining module 13, display module 14.
Abstraction module 11 for obtaining the content received, and extracts the object event type of the content received;
Module 12 is obtained, for obtaining at least one dimension to match with object event type in event sentence knowledge base Event sentence, wherein event sentence knowledge base includes at least one event type, and belongs at least one of each event type The event sentence set of dimension, each event sentence critical event element having the same in the event sentence set of each dimension;
The event sentence of determining module 13, at least one dimension for will match with object event type is returned as candidate Multiple content;
Display module 14, for showing candidate reply content.
Further, obtaining module 12 includes first unit, second unit, third unit:
First unit, for being obtained at random or in event sentence knowledge base according to default screening rule and object event type The event sentence set of matched predetermined number;
Second unit, at random or according to default selection rule respectively from each thing of the event sentence set of predetermined number An event sentence is obtained in part sentence set, obtains the event sentence of predetermined number;
Third unit, for using the event sentence of obtained predetermined number as at least one with object event type matching The event sentence of a dimension.
Further, first unit is specifically used for:
Determine history keyword Event element corresponding with the content that historical reception arrives;
Default with object event type matching is filtered out from event sentence knowledge base according to history keyword Event element Several event sentence set, wherein the critical event element of each event sentence set in the event sentence set of predetermined number with go through History critical event element is different.
Further, second unit is specifically used for:
Count the selection number that each event sentence is selected as reply content;
A selection number is selected to meet from each event sentence set of the event sentence set of predetermined number respectively default The event sentence of condition.
It should be noted that the aforementioned explanation to reply content generation method embodiment is also applied for the embodiment Reply content generating means, details are not described herein again.
Reply content generating means provided in an embodiment of the present invention by obtaining the content received, and are extracted and are received Content object event type;At least one dimension to match with object event type is obtained in event sentence knowledge base Event sentence;Using the event sentence of at least one dimension to match with object event type as candidate reply content;It shows candidate Reply content.To realize according to receiving the event type auto-returned of content according to the candidate of the different dimensions of event type Reply content, the candidate reply content due to having provided a user different dimensions enrich user's selection, realize fast to user Speed is replied, and communication efficiency is improved.
In conjunction with reference Fig. 5, on the basis of the embodiment shown in fig. 4, reply content generating means can also include: to establish mould Block 15, for establishing event sentence knowledge base.
Further, establishing module 15 includes: the first determination unit, the second determination unit, division unit.
First determination unit for determining at least one event type, and belongs to each event of each event type Sentence;
Second determination unit determines the crucial thing of each event sentence according to preset rules for being directed to each event type Part element;
Division unit, for carrying out clustering to each event sentence according to each critical event element, by each thing Part sentence is divided into the event sentence set of at least one dimension, wherein each event sentence tool in the event sentence set of each dimension There is identical critical event element.
Further, the second determination unit is specifically used for:
Determine the trigger word of each Event element and each event sentence that form each event sentence;
According to trigger word from each Event element, the critical event element of each event sentence is determined.
It should be noted that the aforementioned explanation to reply content generation method embodiment is also applied for the embodiment Reply content generating means, details are not described herein again.
Reply content generating means provided in an embodiment of the present invention establish event sentence knowledge base based on Event Extraction, Event sentence knowledge base saves the event sentence of multiple dimensions of each event type, it is subsequent can be automatic based on event sentence knowledge base The candidate reply content for returning to the different dimensions according to event type, due to provided a user different dimensions it is candidate reply in Hold to user, enriches user's selection, realize Quick-return, improve communication efficiency.
Fig. 6 is the structural schematic diagram of another reply content generating means provided in an embodiment of the present invention.The reply content Generating means include:
Memory 1001, processor 1002 and it is stored in the calculating that can be run on memory 1001 and on processor 1002 Machine program.
Processor 1002 realizes the reply content generation method provided in above-described embodiment when executing described program.
Further, reply content generating means further include:
Communication interface 1003, for the communication between memory 1001 and processor 1002.
Memory 1001, for storing the computer program that can be run on processor 1002.
Memory 1001 may include high speed RAM memory, it is also possible to further include nonvolatile memory (non- Volatile memory), a for example, at least magnetic disk storage.
Processor 1002 realizes reply content generation method described in above-described embodiment when for executing described program.
If memory 1001, processor 1002 and the independent realization of communication interface 1003, communication interface 1003, memory 1001 and processor 1002 can be connected with each other by bus and complete mutual communication.The bus can be industrial standard Architecture (Industry Standard Architecture, referred to as ISA) bus, external equipment interconnection (Peripheral Component, referred to as PCI) bus or extended industry-standard architecture (Extended Industry Standard Architecture, referred to as EISA) bus etc..The bus can be divided into address bus, data/address bus, control Bus processed etc..Only to be indicated with a thick line in Fig. 6, it is not intended that an only bus or a type of convenient for indicating Bus.
Optionally, in specific implementation, if memory 1001, processor 1002 and communication interface 1003, are integrated in one It is realized on block chip, then memory 1001, processor 1002 and communication interface 1003 can be completed mutual by internal interface Communication.
Processor 1002 may be a central processing unit (Central Processing Unit, referred to as CPU), or Person is specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC) or quilt It is configured to implement one or more integrated circuits of the embodiment of the present invention.
The present embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that The program realizes reply content generation method as described above when being executed by processor.
The present embodiment also provides a kind of computer program product, when the instruction processing unit in the computer program product is held When row, reply content generation method as described above.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include at least one this feature.In the description of the present invention, the meaning of " plurality " is at least two, such as two, three It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.Such as, if realized with hardware in another embodiment, following skill well known in the art can be used Any one of art or their combination are realized: have for data-signal is realized the logic gates of logic function from Logic circuit is dissipated, the specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can compile Journey gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above The embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as to limit of the invention System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of the invention Type.

Claims (10)

1. a kind of reply content generation method characterized by comprising
Obtain the content received, and the object event type of the content received described in extraction;
The event sentence of at least one dimension to match with the object event type is obtained in event sentence knowledge base, wherein The event sentence knowledge base includes at least one event type, and belongs to the event of at least one dimension of each event type Sentence is gathered, each event sentence critical event element having the same in the event sentence set of each dimension;
Using the event sentence of at least one dimension to match with the object event type as candidate reply content;
Show the candidate reply content.
2. the method according to claim 1, wherein described obtain and the target thing in event sentence knowledge base The event sentence at least one dimension that part type matches, comprising:
It is obtained at random or in the event sentence knowledge base according to default screening rule pre- with the object event type matching If the event sentence set of number;
One is obtained from each event sentence set of the event sentence set of predetermined number respectively at random or according to default selection rule A event sentence obtains the event sentence of predetermined number;
Using the event sentence of obtained predetermined number as the event of at least one dimension with the object event type matching Sentence.
3. according to the method described in claim 2, it is characterized in that, it is described according to default screening rule in the event sentence knowledge Selection and the event sentence set of the predetermined number of the object event type matching include: in library
Determine history keyword Event element corresponding with the content that historical reception arrives;
It is filtered out from event sentence knowledge base according to the history keyword Event element pre- with the object event type matching If the event sentence set of number, wherein the critical event element of each event sentence set in the event sentence set of predetermined number It is different from history keyword Event element.
4. according to the method described in claim 2, it is characterized in that, described regular respectively from predetermined number according to default selection An event sentence is obtained in each event sentence set of event sentence set, comprising:
Count the selection number that each event sentence is selected as reply content;
A selection number is selected to meet preset condition from each event sentence set of the event sentence set of predetermined number respectively Event sentence.
5. the method according to claim 1, wherein further include:
Establish the event sentence knowledge base.
6. according to the method described in claim 5, it is characterized in that, the event sentence knowledge base of establishing includes:
It determines at least one event type, and belongs to each event sentence of each event type;
For each event type, the critical event element of each event sentence is determined according to preset rules;
Clustering is carried out to each event sentence according to each critical event element, each event sentence is drawn It is divided into the event sentence set of at least one dimension, wherein each event sentence in the event sentence set of each dimension has identical Critical event element.
7. according to the method described in claim 6, it is characterized in that, the key for determining each event sentence according to preset rules Event element, comprising:
Determine the trigger word of each Event element and each event sentence that form each event sentence;
According to the trigger word from each Event element, the critical event element of each event sentence is determined.
8. a kind of reply content generating means characterized by comprising
Abstraction module, for obtaining the content received, and the object event type of the content received described in extraction;
Module is obtained, for obtaining at least one dimension to match with the object event type in event sentence knowledge base Event sentence, wherein the event sentence knowledge base includes at least one event type, and belongs at least the one of each event type The event sentence set of a dimension, each event sentence critical event element having the same in the event sentence set of each dimension;
The event sentence of determining module, at least one dimension for will match with the object event type is replied as candidate Content;
Display module, for showing the candidate reply content.
9. device according to claim 8, which is characterized in that the acquisition module includes first unit, second unit, Unit three:
The first unit, for being obtained at random or in the event sentence knowledge base according to default screening rule and the target The event sentence set of the matched predetermined number of event type;
The second unit, at random or according to default selection rule respectively from each thing of the event sentence set of predetermined number An event sentence is obtained in part sentence set, obtains the event sentence of predetermined number;
The third unit, for using the event sentence of obtained predetermined number as with the object event type matching extremely The event sentence of a few dimension.
10. device according to claim 9, which is characterized in that the first unit is specifically used for:
Determine history keyword Event element corresponding with the content that historical reception arrives;
It is filtered out from event sentence knowledge base according to the history keyword Event element pre- with the object event type matching If the event sentence set of number, wherein the critical event element of each event sentence set in the event sentence set of predetermined number It is different from history keyword Event element.
CN201811569727.6A 2018-12-21 2018-12-21 Reply content generation method and device Pending CN109697229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811569727.6A CN109697229A (en) 2018-12-21 2018-12-21 Reply content generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811569727.6A CN109697229A (en) 2018-12-21 2018-12-21 Reply content generation method and device

Publications (1)

Publication Number Publication Date
CN109697229A true CN109697229A (en) 2019-04-30

Family

ID=66231860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811569727.6A Pending CN109697229A (en) 2018-12-21 2018-12-21 Reply content generation method and device

Country Status (1)

Country Link
CN (1) CN109697229A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331480A (en) * 2014-11-07 2015-02-04 苏州大学 System and method for extracting Chinese event trigger words
CN106874452A (en) * 2017-02-13 2017-06-20 长沙军鸽软件有限公司 A kind of method for obtaining session reply content
CN107612814A (en) * 2017-09-08 2018-01-19 北京百度网讯科技有限公司 Method and apparatus for generating candidate's return information
US20180268456A1 (en) * 2017-03-16 2018-09-20 Wipro Limited Method and system for automatically generating a response to a user query
CN108959516A (en) * 2018-06-28 2018-12-07 北京百度网讯科技有限公司 Conversation message treating method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331480A (en) * 2014-11-07 2015-02-04 苏州大学 System and method for extracting Chinese event trigger words
CN106874452A (en) * 2017-02-13 2017-06-20 长沙军鸽软件有限公司 A kind of method for obtaining session reply content
US20180268456A1 (en) * 2017-03-16 2018-09-20 Wipro Limited Method and system for automatically generating a response to a user query
CN107612814A (en) * 2017-09-08 2018-01-19 北京百度网讯科技有限公司 Method and apparatus for generating candidate's return information
CN108959516A (en) * 2018-06-28 2018-12-07 北京百度网讯科技有限公司 Conversation message treating method and apparatus

Similar Documents

Publication Publication Date Title
CN104933113B (en) A kind of expression input method and device based on semantic understanding
CN109815314B (en) Intent recognition method, recognition device and computer readable storage medium
CN110377716A (en) Exchange method, device and the computer readable storage medium of dialogue
Wang et al. Retweet wars: Tweet popularity prediction via dynamic multimodal regression
CN110147722A (en) A kind of method for processing video frequency, video process apparatus and terminal device
CN105095415B (en) The determination method and apparatus of network mood
JP2019500685A (en) Method, server, and storage medium for mining a target object social account
CN106022826A (en) Cheating user recognition method and system in webcast platform
CN106021403B (en) Client service method and device
CN108021558A (en) Keyword recognition method and device, electronic equipment and storage medium
CN104951807B (en) The determination method and apparatus of stock market's mood
CN109783624A (en) Answer generation method, device and the intelligent conversational system in knowledge based library
CN109657213A (en) Text similarity detection method and device and electronic equipment
CN110443120A (en) A kind of face identification method and equipment
CN110209809B (en) Text clustering method and device, storage medium and electronic device
CN113285815A (en) Method, device and equipment for counting personnel and joining group under group chat scene
CN104951434B (en) The determination method and apparatus of brand mood
CN109960719A (en) A kind of document handling method and relevant apparatus
CN112307318B (en) Content publishing method, system and device
CN108897592A (en) A kind of software methods of exhibiting and relevant device
CN109660621A (en) A kind of content delivery method and service equipment
CN111914859A (en) Service multiplexing method, computing device and computer readable storage medium
CN113627194A (en) Information extraction method and device, and communication message classification method and device
CN113010255A (en) Interaction method and device based on binding session group and computer equipment
CN109697229A (en) Reply content generation method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190430