CN108984600A - Interaction processing method, device, computer equipment and readable medium - Google Patents
Interaction processing method, device, computer equipment and readable medium Download PDFInfo
- Publication number
- CN108984600A CN108984600A CN201810565042.8A CN201810565042A CN108984600A CN 108984600 A CN108984600 A CN 108984600A CN 201810565042 A CN201810565042 A CN 201810565042A CN 108984600 A CN108984600 A CN 108984600A
- Authority
- CN
- China
- Prior art keywords
- key structure
- key
- moulding plate
- service moulding
- structured statement
- 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
Abstract
The present invention provides a kind of interaction processing method, device, computer equipment and readable medium.Its method includes: to analyze the Query sentence of user, obtains structured statement;It include the part of speech type at least one word and each word of ordinal relation in structured statement;According to structured statement, obtained and the matched destination service template of structured statement from the multiple service moulding plates pre-established;Each service moulding plate includes at least one key structure with ordinal relation, record has the corresponding part of speech type of each key structure, each key structure respectively corresponds a keyword dictionary, includes multiple keywords that can be filled into corresponding key structure position in each keyword dictionary;It is responded according to destination service template, realizes interaction.Technical solution of the present invention, can accurately recall with the matched destination service template of structured statement, and then responded based on destination service module, realize interaction, the accuracy and efficiency of service of positioning service can be effectively improved.
Description
[technical field]
The present invention relates to computer application technology more particularly to a kind of interaction processing method, device, computer equipments
And readable medium.
[background technique]
With artificial intelligence (Artificial Intelligence;AI) the fast development of industry, interactive voice become must
It is indispensable.Ear and mouth of the intelligent interaction device just as people that interactive voice is carried out with user, first have to understand user and pass through
Then the query sentence that voice issues understands the intention of user, and the intention based on user is recalled accordingly art and given instead
Feedback, to realize interaction.If the interbehavior of user cannot all be understood and be understood to intelligent interaction device, that people of being far from being certainly
Work intelligence.Like user exchanges with the personage that an ear hinders, and what user said is this part thing, and what he answered is other part
Thing, as one can imagine, how bad user experience is.
For example, an intelligent interaction device can support multiple parallel services in the intelligent interaction device of the prior art.
For each service, corresponding template can be set by the way of asterisk wildcard+keyword.Such as template can be expressed as
Following form: [" [W:0-n] "]+[crucial words].Wherein 0-n indicates the byte number being adapted in asterisk wildcard [" [W:0-n] "], such as
If fruit is Chinese character, the Chinese character number of wildcard is n/2.In this way, for the Query sentence of user, it is each to service corresponding template all
It can go to match whether the Query sentence matches with oneself template, if matching, be realized based on the service to user feedback and rung
It answers, realizes the interaction with user.
But when each service is respectively adopted asterisk wildcard+keyword mode template is arranged in the prior art, for user's
The same Query may recall different services simultaneously, and what user actually wanted to recall is only one of service,
Therefore, existing template will lead to service and call together, so that service accurately can not be provided for user, reduce the clothes of interaction process
Business efficiency.
[summary of the invention]
The present invention provides a kind of interaction processing method, device, computer equipment and readable mediums, for avoiding based on mould
It serviced and called together caused by plate, and improved the efficiency of service of interaction process.
The present invention provides a kind of interaction processing method, which comprises
The Query sentence of user is analyzed, corresponding structured statement is obtained;It include tool in the structured statement
There are at least one word of ordinal relation and the part of speech type of each word;
According to the structured statement, obtains from the multiple service moulding plates pre-established and matched with the structured statement
Destination service template;Each service moulding plate includes at least one key structure with ordinal relation, and record has each institute
The corresponding part of speech type of key structure is stated, each key structure respectively corresponds a keyword dictionary, each keyword word
It include multiple keywords that can be filled into the corresponding key structure position in allusion quotation;
It is responded according to the destination service template, realizes interaction.
Still optionally further, in method as described above, the Query sentence of user is analyzed, corresponding knot is obtained
Structure sentence, specifically includes:
Speech recognition is carried out to the Query sentence of the speech form of the user, obtains corresponding text sentence;
The text sentence is analyzed according to the syntactic structure of the text sentence, obtains the structured statement.
Still optionally further, in method as described above, according to the structured statement, from the multiple services pre-established
Acquisition and the matched destination service template of the structured statement in template, specifically include:
According to each key structure, each crucial knot for including in the structured statement, each service moulding plate
The relative ranks and each keyword dictionary of the corresponding part of speech type of structure, each key structure, from the multiple service mould
It is obtained and the matched destination service template of the structured statement in plate.
Still optionally further, in method as described above, include according in the structured statement, each service moulding plate
Each key structure, the corresponding part of speech type of each key structure, the relative ranks of each key structure and each institute
Keyword dictionary is stated, acquisition and the matched destination service template of the structured statement from the multiple service moulding plate,
It specifically includes:
For each service moulding plate, judge at least one word for including in the structured statement quantity whether with
The quantity of at least one for including in service moulding plate key structure is consistent;
If consistent, according to the sequencing of the word each in the structured statement and part of speech type, the service mould
The relative ranks and the corresponding part of speech type of each key structure for each key structure for including in plate, according to from front to back
Sequence, successively compare each key words in the structured statement whether with corresponding position in the service moulding plate
Whether the corresponding part of speech type of the key structure is consistent;
If consistent, further according to each word in the structured statement and each institute in the service moulding plate
Keyword dictionary is stated, judges whether each word in the structured statement belongs to corresponding position in the service moulding plate
Word in the keyword dictionary;
If belonging to, determine that the service moulding plate is and the matched destination service template of the structured statement.
It still optionally further, further include at least one non-key knot in each service moulding plate in method as described above
Structure, and record and have the corresponding part of speech type of each non-key structure, each corresponding non-key word dictionary of non-key structure,
It include multiple non-key words that can be filled into the corresponding non-key structure in the non-key word dictionary;Institute
Each key structure and each non-key structure in service moulding plate is stated to arrange in a predetermined sequence;
According to the structured statement, obtains from the multiple service moulding plates pre-established and matched with the structured statement
Destination service template, specifically include:
According to each key structure, each described non-key for including in the structured statement, each service moulding plate
Structure, the relative ranks of each key structure and each non-key structure, each keyword dictionary and each described non-
Keyword dictionary obtains and the matched destination service template of the structured statement from the multiple service moulding plate.
Still optionally further, in method as described above, include according in the structured statement, each service moulding plate
Each key structure, each non-key structure, each key structure and each non-key structure relative ranks,
Each key structure and the corresponding part of speech type of each non-key structure, each keyword dictionary and each described non-key
Word dictionary obtains and the matched destination service template of the structured statement, specific packet from the multiple service moulding plate
It includes:
For each service moulding plate, according to each crucial knot in the structured statement and the service moulding plate
Structure, the relative ranks of each key structure, each corresponding part of speech type of key structure and each keyword dictionary, sentence
Break in the structured statement with the presence or absence of each matched key words of key structure with the service moulding plate;
If it exists, according to each non-key structure in the structured statement, the service moulding plate, each non-pass
The relative ranks and each non-key word dictionary of the corresponding part of speech type of bond structure, each non-key structure, described in judgement
Each non-key word each non-key structure matching whether corresponding with the service moulding plate in structured statement;
If matching, determine that the service moulding plate is and the matched destination service template of the structured statement.
Still optionally further, in method as described above, according to each institute in the structured statement, the service moulding plate
State non-key structure, the corresponding part of speech type of each non-key structure, the relative ranks of each non-key structure and each institute
State non-key word dictionary, judge each non-key word in the structured statement whether each non-pass with the service moulding plate
Bond structure matching, specifically includes:
According to each non-key structure, each non-key structure in the structured statement, the service moulding plate
Corresponding part of speech type is with the relative ranks of each non-key structure, according to each non-key word in the structured statement
Sequence from front to back judges to whether there is and each non-key word in the structured statement in the service moulding plate
Part of speech type is consistent and the non-key structure of location matches;
If it exists, it is corresponding described non-key to judge whether each non-key word belongs to the matched non-key structure
The non-key word in dictionary;
If belonging to, each non-key word each institute corresponding with the service moulding plate in the structured statement is determined
State non-key structure matching.
Still optionally further, in method as described above, according to the structured statement, from the multiple services pre-established
Before obtaining in template with the matched destination service template of the structured statement, the method also includes:
According to preset configuration, the multiple service moulding plate is established.
The present invention provides a kind of interaction process device, and described device includes:
Analysis module is analyzed for the Query sentence to user, obtains corresponding structured statement;The structure
Changing in sentence includes the part of speech type at least one word and each word of ordinal relation;
Obtain module, for according to the structured statement, obtained from the multiple service moulding plates pre-established with it is described
The matched destination service template of structured statement;Each service moulding plate includes at least one key knot with ordinal relation
Structure, and record has the corresponding part of speech type of each key structure, each key structure respectively corresponds a keyword dictionary,
It include multiple keywords that can be filled into the corresponding key structure position in each keyword dictionary;
Respond module realizes interaction for being responded according to the destination service template.
Still optionally further, in device as described above, the analysis module is specifically included:
Voice recognition unit, the Query sentence for the speech form to the user carry out speech recognition, obtain
Corresponding text sentence;
Analysis and processing unit is obtained for being analyzed according to the syntactic structure of the text sentence the text sentence
To the structured statement.
Still optionally further, in device as described above, the acquisition module is specifically used for: according to the structuring language
Sentence, each key structure for including in each service moulding plate, the corresponding part of speech type of each key structure, each key
The relative ranks of structure and each keyword dictionary obtain and the structured statement from the multiple service moulding plate
The destination service template matched.
Still optionally further, in device as described above, the acquisition module is specifically used for:
For each service moulding plate, judge at least one word for including in the structured statement quantity whether with
The quantity of at least one for including in service moulding plate key structure is consistent;
If consistent, according to the sequencing of the word each in the structured statement and part of speech type, the service mould
The relative ranks and the corresponding part of speech type of each key structure for each key structure for including in plate, according to from front to back
Sequence, successively compare each key words in the structured statement whether with corresponding position in the service moulding plate
Whether the corresponding part of speech type of the key structure is consistent;
If consistent, further according to each word in the structured statement and each institute in the service moulding plate
Keyword dictionary is stated, judges whether each word in the structured statement belongs to corresponding position in the service moulding plate
Word in the keyword dictionary;
If belonging to, determine that the service moulding plate is and the matched destination service template of the structured statement.
It still optionally further, further include at least one non-key knot in each service moulding plate in device as described above
Structure, and record and have the corresponding part of speech type of each non-key structure, each corresponding non-key word dictionary of non-key structure,
It include multiple non-key words that can be filled into the corresponding non-key structure in the non-key word dictionary;Institute
Each key structure and each non-key structure in service moulding plate is stated to arrange in a predetermined sequence;
The acquisition module, is specifically used for:
According to each key structure, each described non-key for including in the structured statement, each service moulding plate
Structure, the relative ranks of each key structure and each non-key structure, each keyword dictionary and each described non-
Keyword dictionary obtains and the matched destination service template of the structured statement from the multiple service moulding plate.
Still optionally further, in device as described above, the acquisition module is specifically used for:
For each service moulding plate, according to each crucial knot in the structured statement and the service moulding plate
Structure, the relative ranks of each key structure, each corresponding part of speech type of key structure and each keyword dictionary, sentence
Break in the structured statement with the presence or absence of each matched key words of key structure with the service moulding plate;
If it exists, according to each non-key structure in the structured statement, the service moulding plate, each non-pass
The relative ranks and each non-key word dictionary of the corresponding part of speech type of bond structure, each non-key structure, described in judgement
Each non-key word each non-key structure matching whether corresponding with the service moulding plate in structured statement;
If matching, determine that the service moulding plate is and the matched destination service template of the structured statement.
Still optionally further, in device as described above, the acquisition module is specifically used for:
According to each non-key structure, each non-key structure in the structured statement, the service moulding plate
Corresponding part of speech type is with the relative ranks of each non-key structure, according to each non-key word in the structured statement
Sequence from front to back judges to whether there is and each non-key word in the structured statement in the service moulding plate
Part of speech type is consistent and the non-key structure of location matches;
If it exists, it is corresponding described non-key to judge whether each non-key word belongs to the matched non-key structure
The non-key word in dictionary;
If belonging to, each non-key word each institute corresponding with the service moulding plate in the structured statement is determined
State non-key structure matching.
Still optionally further, in device as described above, further includes:
Module is established, establishes according to preset configuration, establishes the multiple service moulding plate.
The present invention also provides a kind of computer equipment, the equipment includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes interaction processing method as described above.
The present invention also provides a kind of computer-readable mediums, are stored thereon with computer program, which is held by processor
Interaction processing method as described above is realized when row.
Interaction processing method, device, computer equipment and readable medium of the invention passes through the Query sentence to user
It is analyzed, obtains corresponding structured statement;Include in the structured statement have at least one word of ordinal relation with
And the part of speech type of each word;According to structured statement, obtained and structured statement from the multiple service moulding plates pre-established
The destination service template matched;Wherein, each service moulding plate includes at least one key structure with ordinal relation, and record has respectively
The corresponding part of speech type of key structure, each key structure respectively correspond a keyword dictionary, include multiple in each keyword dictionary
The keyword of corresponding key structure position can be filled into;It is responded according to destination service template, realizes interaction.This hair
In bright technical solution, service moulding plate is realized using special construction, can be avoided in the prior art using asterisk wildcard+keyword
Mode cause to service the technical issues of calling together when template is arranged, therefore, technical solution of the present invention accurately can be recalled and be tied
The destination service template of structure statement matching, and then responded based on destination service module, interaction is realized, so as to effective
Ground improves the accuracy of positioning service, improves the efficiency of service of interaction process.
[Detailed description of the invention]
Fig. 1 is the flow chart of interaction processing method embodiment of the invention.
Fig. 2 is the structure chart of interaction process Installation practice one of the invention.
Fig. 3 is the structure chart of interaction process Installation practice two of the invention.
Fig. 4 is the structure chart of computer equipment embodiment of the invention.
Fig. 5 is a kind of exemplary diagram of computer equipment provided by the invention.
[specific embodiment]
To make the objectives, technical solutions, and advantages of the present invention clearer, right in the following with reference to the drawings and specific embodiments
The present invention is described in detail.
Fig. 1 is the flow chart of interaction processing method embodiment of the invention.As shown in Figure 1, the interaction process of the present embodiment
Method can specifically include following steps:
100, the Query sentence of user is analyzed, obtains corresponding structured statement;Include in the structured statement
The part of speech type of at least one word and each word with ordinal relation;
101, it according to structured statement, is obtained and the matched mesh of structured statement from the multiple service moulding plates pre-established
Mark service moulding plate;Wherein, each service moulding plate includes at least one key structure with ordinal relation, and recording has each key to tie
The corresponding part of speech type of structure, each key structure respectively correspond a keyword dictionary, include in each keyword dictionary it is multiple can be by
It is filled into the keyword of corresponding key structure position;
102, it is responded according to destination service template, realizes interaction.
The executing subject of the interaction processing method of the present embodiment can be the interaction process device interacted with user, should
Interaction process device can be an artificial intelligence equipment, can receive the Query sentence of user, and it will be appreciated that user
Query sentence, so that the Query sentence based on user is fed back accordingly.
In the present embodiment, interaction process device can support the voice of user to input, and the text of user can also be supported defeated
Enter.I.e. the Query sentence of user can be speech form, or written form.
Specifically, in the present embodiment, after interaction process device receives the Query sentence of user, use can first be analyzed
The Query sentence at family is that the still written form of speech form at this time may be used if the Query of user is speech form
Speech recognition is carried out with the Query sentence of the speech form to user, obtains corresponding text sentence;Then according to text sentence
Syntactic structure text sentence is analyzed, obtain structured statement.For example, for Chinese sentence, it can be according to Chinese
Sentence pattern, grammer and the corresponding qualifier rule of addition match, and obtain corresponding structured statement.Such as the sentence pattern of structured statement
It can be with are as follows: the sentence patterns such as qualifier+subject+predicate+object+modal particle.Therefore, may include in the structured statement of the present embodiment
The part of speech type of at least one word and each word with ordinal relation, for example, the part of speech type of the word in structured statement
It can be qualifier, subject, predicate, object, modal particle etc..In addition, for the sentence of other linguistic forms, also according to it
The characteristics such as grammer, available corresponding structured statement.Such as the sentence of some user Query is " listening to music ", it is corresponding
Structured statement can be " listening (predicate)+music (object) ".
Optionally, in the present embodiment, multiple service moulding plates can be established, each service moulding plate can according to preset configuration
With a kind of corresponding service provided.Specifically, each service moulding plate, can be preparatory in interaction process device according to administrative staff
The configuration of setting, to generate corresponding service moulding plate.Specifically, service moulding plate can also be using sentence pattern and the grammer knot of sentence
Structure indicates, for example, some service moulding plate can be using subject, predicate, object and preposition, interjection with ordinal relation
Etc. the structure of part of speech type constitute, and can only include the crucial knot that there must be in the service moulding plate that constitutes of these part of speech types
Structure, also may include may or may not existing non-key structure.I.e. each service moulding plate includes at least, and there is sequence to close
System at least one key structure, and record have the corresponding part of speech type of each key structure such as subject, predicate, object and preposition,
The types such as interjection.Certainly, it if further include at least one non-key structure with ordinal relation in service moulding plate, also needs
The corresponding part of speech type of each non-key structure is recorded simultaneously.
Each corresponding key structure or non-key structure, all respectively correspond a dictionary.Such as each key structure pair
A keyword dictionary is answered, may include that multiple can be filled into the corresponding key structure position in the keyword dictionary
Keyword.The corresponding non-key word dictionary of each non-key structure, may include in the non-key word dictionary it is multiple can be by
It is filled into the non-key word of the corresponding key structure position.Multiple keyword words in keyword dictionary can be semantic phase
Same or similar word.Similarly, multiple non-key words in non-key word dictionary may be semantic same or similar
As word.As the part of speech type in some service moulding plate be object the corresponding keyword dictionary of key structure in may include
Multiple keywords such as " guessing a riddle ", " guessing riddles " and " riddle ".
For example, some service moulding plate is constituted using qualifier+subject+predicate+object+modal particle, in the service moulding plate,
Each word structure corresponds to a dictionary.For example, the following is the sequence and each word structure of the word structure of a service moulding plate
Corresponding dictionary: [D:please]: ask, bother, can ...;[D:give]: give, help, replacing ...;[D:me]: I, treasured
It is precious, I, I ...;[D:want]:, to think, want ...;[D:play]: play, guess, putting ...;[D:puzzle]:
Guess a riddle, riddle ...;[D:aux]:,, oh, Oh ...;[D:listen]: listen, hear ....It can wherein limit
Fixed [D:play] and [D:puzzle] is the keyword dictionary in service moulding plate, and other are non-key word dictionary.
In practical applications, user is when configuring service moulding plate, it is understood that there may be the following two kinds configuration mode:
The first configuration mode: each service moulding plate in multiple service moulding plates pre-established only includes key structure, not
Including non-key structure.
It should only include closing in the corresponding structured statement for requiring the Query sentence based on user to obtain in this kind of situation
The corresponding keyword of bond structure.At this time according to step 102 " according to structured statement, from the multiple service moulding plates pre-established
When middle acquisition and the matched destination service template of structured statement ", the word that can be first defaulted as in structured statement is to close
Then keyword language carries out the determination of destination service template.Specifically, can include according in structured statement, each service moulding plate
Each key structure, the corresponding part of speech type of each key structure, each key structure relative ranks and each keyword dictionary, from more
It is obtained and the matched destination service template of structured statement in a service moulding plate.Wherein the relative ranks of each key structure can be marked
Know position of each key structure in service moulding plate.For example, can specifically be realized using following steps:
(a1) for each service moulding plate, judge at least one word for including in structured statement quantity whether with service
The quantity at least one key structure for including in template is consistent;If consistent, execute step (b1);Otherwise, then it is assumed that structuring
Sentence and the service moulding plate mismatch;
(b1) according to each key for including in the sequencing and part of speech type, service moulding plate of word each in structured statement
The relative ranks of structure and the corresponding part of speech type of each key structure successively compare structuring language according to sequence from front to back
Whether each word part of speech type whether corresponding with the key structure of corresponding position in service moulding plate in sentence is consistent;If consistent, hold
Row step (c1);Otherwise it is assumed that structured statement and the service moulding plate mismatch;
(c1) further each keyword dictionary according to each word in structured statement and in service moulding plate, judges to tie
Whether each word in structure sentence belongs to the word in the keyword dictionary of corresponding position in service moulding plate;If belonging to, execute
Step (d1);Otherwise it is assumed that structured statement and the service moulding plate mismatch;
(d1) determine that service moulding plate is and the matched destination service template of structured statement.
Only include at least one key structure in service moulding plate by this present embodiment, include in structured statement to
When the quantity of a few word is identical as the quantity of at least one key structure of service moulding plate, which is possible into
For with the matched destination service template of the structured statement.So in the present embodiment, it can be assumed that in structured statement at least
One word is key words, then judge at least one word for including in structured statement quantity whether with service mould
The quantity at least one key structure for including in plate is consistent, if when consistent, illustrating that the structured statement may be with the clothes
Business template matching.Then the sequence further according to the key structure in structured statement and service moulding plate from the front to the back, successively
In comparative structure sentence the part of speech type of word part of speech type corresponding with the key structure of corresponding position in service moulding plate whether one
It causes.Such as according to sequence from front to back, first in the part of speech type and service moulding plate of first word in comparative structure sentence
Whether the corresponding part of speech type of a key structure is consistent, the part of speech type and service moulding plate of second word in comparative structure sentence
In the corresponding part of speech type of second key structure it is whether consistent, and so on, until the last one in comparative structure sentence
Whether the part of speech type of word part of speech type corresponding with the last one key structure in service moulding plate is consistent.If in structured statement
The part of speech type of each word part of speech type corresponding with the key structure of corresponding position in service moulding plate is consistent, then the service moulding plate
May be exactly and the matched service moulding plate of the structured statement.As long as otherwise there are the part of speech types of a word in structured statement
Word Type-Inconsistencies corresponding with the key structure of corresponding position in service moulding plate, then the service moulding plate be impossible to be and the knot
The destination service template of structure statement matching.
When each word part of speech type corresponding with the key structure of corresponding position in service moulding plate in structured statement is consistent
When, further judge whether each word in structured statement belongs to the word in the keyword dictionary of corresponding position in service moulding plate
Language.Such as according to sequence from front to back, judge whether first in structured statement word belongs in service moulding plate first
Word in the corresponding keyword dictionary of key structure, judges whether second in structured statement word belongs to service moulding plate
In word in the corresponding keyword dictionary of second key structure, and so on, until last in comparative structure sentence
Whether one word belongs to the word in the corresponding keyword dictionary of the last one key structure in service moulding plate.If structuring language
Each of sentence word belongs to the word in the corresponding keyword dictionary of key structure of corresponding position in service moulding plate, then
Determine that service moulding plate is and the matched destination service template of structured statement.As long as otherwise there are a words in structured statement
The word being not belonging in the corresponding keyword dictionary of key structure of corresponding position in service moulding plate, then the service moulding plate be not
With the matched destination service template of the structured statement.
Second of configuration mode: each service moulding plate in multiple service moulding plates pre-established not only includes key structure, but also
Including non-key structure.
In this kind of situation, the manageable Query sentence based on user of the multiple service moulding plates pre-established is obtained
It can only include the corresponding keyword of key structure in structured statement;Or also can handle both includes in service moulding plate
The corresponding keyword of key structure, and the structured statement including the corresponding non-key word of non-key structure in service moulding plate.This
When " according to structured statement, obtain from the multiple service moulding plates pre-established and matched with structured statement according to step 102
Destination service template " when, specifically can according to include in structured statement, each service moulding plate each key structure, each non-pass
Bond structure, the relative ranks of each key structure and each non-key structure, each keyword dictionary and each non-key word dictionary, from more
It is obtained and the matched destination service template of structured statement in a service moulding plate.Wherein, due to each crucial knot in service moulding plate
The sequence of structure and non-key structure be it is pre-set, so the phase of the relative ranks of each key structure, each non-key structure
It is all confirmable to sequence and each key structure and the relative ranks of non-key structure.It, can first really in practical application
The relative ranks of at least one fixed key structure, such as first key structure, second key structure from front to back, so
Can be identified afterwards using the key structure of relative ranks is had determined before it or after tight adjacent non-key structure, other
Non-key structure can be identified using the relative ranks of the adjacent key structure having determined or non-key structure.Example
Such as, the sentence pattern structure of some service moulding plate are as follows: qualifier+subject+predicate+object+modal particle, wherein predicate and object are key
Structure, i.e. predicate are first key structure, and object is second key structure.And qualifier, subject and modal particle are non-
Key structure, subject are the non-key structure before the first key structure, that is, predicate, and modal particle is positioned at the second crucial knot
Non-key structure after structure, that is, object, qualifier are the non-key structure before the subject of non-key structure.Certainly, real
In the application of border, each key structure and each non-key knot in a service moulding plate can also be identified using other modes
The associated order of structure, to identify its relative position in service moulding plate.
For example, the step " according to include in structured statement, each service moulding plate each key structure, each non-key structure,
Each key structure and the relative ranks of each non-key structure, each keyword dictionary and each non-key word dictionary, from multiple services
The realization of acquisition and the matched destination service template of structured statement in template ", can specifically include following steps:
(a2) for each service moulding plate, according to each key structure, each crucial knot in structured statement and service moulding plate
The corresponding part of speech type of the relative ranks of structure, each key structure and each keyword dictionary, judge to whether there is in structured statement
With the matched key words of each key structure of service moulding plate;If it exists, step (b2) is executed;Otherwise, if it does not exist, then it is assumed that
Structured statement is not matched that with the service moulding plate;
Judge to whether there is the matched key words of each key structure with service moulding plate in structured statement in the step,
Can be with reference to step (a1)-(c1) in above-described embodiment, details are not described herein.
(b2) according in structured statement, service moulding plate each non-key structure, the corresponding part of speech type of each non-key structure,
The relative ranks of each non-key structure and each non-key word dictionary, judge each non-key word in structured statement whether with clothes
Corresponding non-key structure matching in template of being engaged in;If matching executes step (c2);Otherwise, if mismatching, then it is assumed that structuring language
Sentence is not matched that with the service moulding plate;
(c2) determine that service moulding plate is and the matched destination service template of structured statement.
Specifically, in the present embodiment, when whether detection service template is destination service template matched with structured statement,
It first detects in the structured statement with the presence or absence of the keyword of the key structure that there must be in hit service module;If deposited
The whether positive good lot of remaining word in the keyword and then detection structure sentence of the key structure in hit service moulding plate
The non-key structure that there can optionally be in middle service moulding plate, if hit, the service moulding plate are only and the structured statement
Matched destination service template.It should be noted that due to the non-key structure in service moulding plate be there can optionally be, that is,
It says, the non-key structure in service moulding plate may exist, and can also be not present, but if it exists, require structuring
Word corresponding with non-key structure is necessary for the word in the corresponding non-key word dictionary of the non-key structure in sentence.
Similarly, for the service moulding plate of such as flowering structure: qualifier+subject+predicate+object+modal particle, wherein predicate and guest
Language is key structure, i.e., predicate is first key structure, and object is second key structure.And qualifier, subject and the tone
Word is non-key structure.The service moulding plate can be configured to " predicate+object ", " subject+predicate+object ", " predicate+guest
The structuring language of language+modal particle ", " qualifier+subject+predicate+object ", " qualifier+subject+predicate+object+modal particle " etc.
Sentence is recalled.And each word also must belong to the keyword dictionary or non-of corresponding position in service moulding plate in structured statement
Word in keyword dictionary, in this way, just can determine that the service moulding plate is and the matched destination service template of structured statement.
For example, the following is the example of a service moulding plate:
" " indicates that corresponding structure is non-key structure in above-mentioned service moulding plate, can match the structuring of the service moulding plate
May exist the non-key structure in sentence, the non-key structure can also be not present, but if there is the non-key structure,
Corresponding word in the structured statement of the service moulding plate is matched to be necessary in the corresponding non-key word dictionary of the non-key structure
Word.Wherein " [D:puzzle] " is the key structure that there must be, and is matched corresponding in the structured statement of the service moulding plate
Word be necessary for the word in the corresponding keyword dictionary of the key structure.
Specifically, for the implementation of step (b2), following steps be can specifically include:
(a3) according to each non-key structure, the corresponding part of speech type of each non-key structure in structured statement, service moulding plate
Judge to service according to the sequence of each non-key word from front to back in structured statement with the relative ranks of each non-key structure
It whether there is non-key structure consistent and location matches with the part of speech type of each non-key word in structured statement in template;
If it exists, step (b3) is executed;Otherwise if it does not exist, then it is assumed that structured statement and the service moulding plate mismatch;
(b3) it is non-key in the corresponding non-key dictionary of matched non-key structure to judge whether each non-key word belongs to
Word;If belonging to, execute step (c3);If being otherwise not belonging to, then it is assumed that structured statement and the service moulding plate mismatch;
(c3) each non-key word each non-key structure matching corresponding with service moulding plate in structured statement is determined.
According to above-mentioned steps (a2), if there is the matched keyword of each key structure with service moulding plate in structured statement
Language can then determine in structured statement in addition to after the matched key words of service moulding plate, other can temporarily be considered
Non-key word, then according in step (a3)-(b3) again determine structured statement in each non-key word with it is right in service moulding plate
Whether each non-key structure answered matches, and whether there is and service moulding plate in implementation process and above-mentioned determining structured statement
The process of each matched key words of key structure is similar, and details are not described herein.
The interaction processing method of the present embodiment is analyzed by the Query sentence to user, obtains corresponding structuring
Sentence;It include the part of speech type at least one word and each word of ordinal relation in the structured statement;According to structure
Change sentence, is obtained and the matched destination service template of structured statement from the multiple service moulding plates pre-established;Wherein, each clothes
Template of being engaged in includes at least one key structure with ordinal relation, and record has the corresponding part of speech type of each key structure, each to close
Bond structure respectively corresponds a keyword dictionary, includes that multiple can be filled into corresponding key structure in each keyword dictionary
The keyword of position;It is responded according to destination service template, realizes interaction.In the technical solution of the present embodiment, service moulding plate
It is realized using special construction, can be avoided causes to take when template is arranged by the way of asterisk wildcard+keyword in the prior art
The technical issues of being engaged in calling together, therefore, the technical solution of the present embodiment can be recalled accurately and be taken with the matched target of structured statement
Business template, and then responded based on destination service module, interaction is realized, so as to effectively improve the accurate of positioning service
Property, improve the efficiency of service of interaction process.
Fig. 2 is the structure chart of interaction process Installation practice one of the invention.As shown in Fig. 2, at the interaction of the present embodiment
Device is managed, can specifically include:
Analysis module 10 obtains corresponding structured statement for analyzing the Query sentence of user;Structuring language
It include the part of speech type at least one word and each word of ordinal relation in sentence;
It obtains module 11 to be used to analyze obtained structured statement according to analysis module 10, from the multiple services pre-established
It is obtained and the matched destination service template of structured statement in template;Each service moulding plate includes at least one with ordinal relation
Key structure, and record has the corresponding part of speech type of each key structure, each more key structures respectively correspond a keyword dictionary, respectively
It include multiple keywords that can be filled into corresponding key structure position in keyword dictionary;
Respond module 12 is used to be responded according to the destination service template for obtaining the acquisition of module 11, realizes interaction.
The interaction process device of the present embodiment realizes the realization principle and technology of interaction process by using above-mentioned module
Effect is identical as the realization of above-mentioned related method embodiment, can refer to the record of above-mentioned related method embodiment in detail, herein
It repeats no more.
Fig. 3 is the structure chart of interaction process Installation practice two of the invention.As shown in figure 3, at the interaction of the present embodiment
Managing device further comprises following technical solution on the basis of the technical solution of above-mentioned embodiment illustrated in fig. 2.
It, can be directly by analyzing if the Query sentence of user is written form in the interaction process device of the present embodiment
Module 10 analyzes the Query sentence of written form according to the syntactic structure of text sentence, obtains structured statement.
If the Query sentence of user is speech form, at this time as shown in figure 3, corresponding analysis module 10 can be specific
Include:
Voice recognition unit 101 is used to carry out speech recognition to the Query sentence of the speech form of user, obtains corresponding
Text sentence;
What analysis and processing unit 102 was used to obtain the identification of voice recognition unit 101 according to the syntactic structure of text sentence
Text sentence is analyzed, and structured statement is obtained.
Still optionally further, it in the interaction process device of the present embodiment, obtains module 11 and is specifically used for being handled according to analysis
Structured statement that the processing of unit 102 obtains, each key structure, the corresponding part of speech of each key structure for including in each service moulding plate
The relative ranks and each keyword dictionary of type, each key structure, obtain from multiple service moulding plates and match with structured statement
Destination service template.
Still optionally further, it in the interaction process device of the present embodiment, obtains module 11 and is specifically used for:
For each service moulding plate, discriminatory analysis processing unit 102 handles include in obtained structured statement at least one
Whether the quantity of a word is consistent with the quantity at least one key structure for including in service moulding plate;
It is each according to include in the sequencing and part of speech type, service moulding plate of word each in structured statement if consistent
The relative ranks of key structure and the corresponding part of speech type of each key structure successively compare structure according to sequence from front to back
Whether each key words part of speech type whether corresponding with the key structure of corresponding position in service moulding plate changed in sentence is consistent;
If consistent, further each keyword dictionary according to each word in structured statement and in service moulding plate, sentences
Whether each word in disconnected structured statement belongs to the word in the keyword dictionary of corresponding position in service moulding plate;
If belonging to, determine that service moulding plate is and the matched destination service template of structured statement.
It still optionally further, further include at least one non-pass in each service moulding plate in the interaction process device of the present embodiment
Bond structure, and record has the corresponding part of speech type of each non-key structure, each corresponding non-key word dictionary of non-key structure, non-pass
It include multiple non-key words that can be filled into corresponding non-key structure in keyword dictionary;It is respectively closed in service moulding plate
Bond structure and each non-key structure arrange in a predetermined sequence;
Module 11 is obtained to be specifically used for:
According to analysis and processing unit 102 handle obtained structured statement, each key structure for including in each service moulding plate,
Each non-key structure, the relative ranks of each key structure and each non-key structure, each keyword dictionary and each non-key word word
Allusion quotation obtains and the matched destination service template of structured statement from multiple service moulding plates.
Still optionally further, it in the interaction process device of the present embodiment, obtains module 11 and is specifically used for:
For each service moulding plate, handled in obtained structured statement and service moulding plate according to analysis and processing unit 102
Each key structure, each key structure the corresponding part of speech type of relative ranks, each key structure and each keyword dictionary, judgement
With the presence or absence of the matched key words of each key structure with service moulding plate in structured statement;
If it exists, according to each non-key structure in structured statement, service moulding plate, the corresponding part of speech of each non-key structure
The relative ranks and each non-key word dictionary of type, each non-key structure judge whether is each non-key word in structured statement
Each non-key structure matching corresponding with service moulding plate;
If matching, determine that service moulding plate is and the matched destination service template of structured statement.
Still optionally further, it in the interaction process device of the present embodiment, obtains module 11 and is specifically used for:
Obtained structured statement, each non-key structure in service moulding plate, each non-is handled according to analysis and processing unit 102
The corresponding part of speech type of key structure is with the relative ranks of each non-key structure, according to each non-key word in structured statement by preceding
Sequence after judges in service moulding plate with the presence or absence of the consistent and position with the part of speech type of each non-key word in structured statement
Set matched non-key structure;
If it exists, judge the non-pass whether each non-key word belongs in the corresponding non-key dictionary of matched non-key structure
Keyword language;
If belonging to, each non-key word each non-key structure corresponding with service moulding plate in structured statement is determined
Match.
Still optionally further, as shown in figure 3, in the interaction process device of the present embodiment, further includes:
It establishes module 13 to establish according to preset configuration, establishes multiple service moulding plates.
Accordingly, it obtains module 11 to be used to handle obtained structured statement according to analysis and processing unit 102, from establishing mould
It is obtained and the matched destination service template of structured statement in multiple service moulding plates that block 13 pre-establishes.
The interaction process device of the present embodiment realizes the realization principle and technology of interaction process by using above-mentioned module
Effect is identical as the realization of above-mentioned related method embodiment, can refer to the record of above-mentioned related method embodiment in detail, herein
It repeats no more.
Fig. 4 is the structure chart of computer equipment embodiment of the invention.As shown in figure 4, the computer equipment of the present embodiment,
It include: one or more processors 30 and memory 40, memory 40 works as memory for storing one or more programs
The one or more programs stored in 40 are executed by one or more processors 30, so that one or more processors 30 are realized such as
The interaction processing method of figure 1 above illustrated embodiment.In embodiment illustrated in fig. 4 for including multiple processors 30.
For example, Fig. 5 is a kind of exemplary diagram of computer equipment provided by the invention.Fig. 5, which is shown, to be suitable for being used to realizing this
The block diagram of the exemplary computer device 12a of invention embodiment.The computer equipment 12a that Fig. 5 is shown is only an example,
Should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 5, computer equipment 12a is showed in the form of universal computing device.The component of computer equipment 12a can
To include but is not limited to: one or more processor 16a, system storage 28a connect different system components (including system
Memory 28a and processor 16a) bus 18a.
Bus 18a indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC)
Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Computer equipment 12a typically comprises a variety of computer system readable media.These media can be it is any can
The usable medium accessed by computer equipment 12a, including volatile and non-volatile media, moveable and immovable Jie
Matter.
System storage 28a may include the computer system readable media of form of volatile memory, such as deposit at random
Access to memory (RAM) 30a and/or cache memory 32a.Computer equipment 12a may further include it is other it is removable/
Immovable, volatile/non-volatile computer system storage medium.Only as an example, storage system 34a can be used for reading
Write immovable, non-volatile magnetic media (Fig. 5 do not show, commonly referred to as " hard disk drive ").Although being not shown in Fig. 5,
The disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided, and non-easy to moving
The CD drive that the property lost CD (such as CD-ROM, DVD-ROM or other optical mediums) is read and write.In these cases, each
Driver can be connected by one or more data media interfaces with bus 18a.System storage 28a may include at least
One program product, the program product have one group of (for example, at least one) program module, these program modules are configured to hold
The function of the above-mentioned each embodiment of Fig. 1-Fig. 3 of the row present invention.
Program with one group of (at least one) program module 42a/utility 40a, can store and deposit in such as system
In reservoir 28a, such program module 42a include --- but being not limited to --- operating system, one or more application program,
It may include the reality of network environment in other program modules and program data, each of these examples or certain combination
It is existing.Program module 42a usually executes the function and/or method in above-mentioned each embodiment of Fig. 1-Fig. 3 described in the invention.
Computer equipment 12a can also be with one or more external equipment 14a (such as keyboard, sensing equipment, display
24a etc.) communication, the equipment interacted with computer equipment 12a communication can be also enabled a user to one or more, and/or
(such as network interface card is adjusted with any equipment for enabling computer equipment 12a to be communicated with one or more of the other calculating equipment
Modulator-demodulator etc.) communication.This communication can be carried out by input/output (I/O) interface 22a.Also, computer equipment
12a can also by network adapter 20a and one or more network (such as local area network (LAN), wide area network (WAN) and/or
Public network, such as internet) communication.As shown, network adapter 20a passes through its of bus 18a and computer equipment 12a
The communication of its module.It should be understood that although not shown in the drawings, other hardware and/or software can be used in conjunction with computer equipment 12a
Module, including but not limited to: microcode, device driver, redundant processor, external disk drive array, RAID system, tape
Driver and data backup storage system etc..
Processor 16a by the program that is stored in system storage 28a of operation, thereby executing various function application and
Data processing, such as realize interaction processing method shown in above-described embodiment.
The present invention also provides a kind of computer-readable mediums, are stored thereon with computer program, which is held by processor
The interaction processing method as shown in above-described embodiment is realized when row.
The computer-readable medium of the present embodiment may include in the system storage 28a in above-mentioned embodiment illustrated in fig. 5
RAM30a, and/or cache memory 32a, and/or storage system 34a.
With the development of science and technology, the route of transmission of computer program is no longer limited by tangible medium, it can also be directly from net
Network downloading, or obtained using other modes.Therefore, the computer-readable medium in the present embodiment not only may include tangible
Medium can also include invisible medium.
The computer-readable medium of the present embodiment can be using any combination of one or more computer-readable media.
Computer-readable medium can be computer-readable signal media or computer readable storage medium.Computer-readable storage medium
Matter for example may be-but not limited to-system, device or the device of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or
Any above combination of person.The more specific example (non exhaustive list) of computer readable storage medium includes: with one
Or the electrical connections of multiple conducting wires, portable computer diskette, hard disk, random access memory (RAM), read-only memory (ROM),
Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light
Memory device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer readable storage medium can
With to be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or
Person is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including --- but
It is not limited to --- electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be
Any computer-readable medium other than computer readable storage medium, which can send, propagate or
Transmission is for by the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In --- wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.?
Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or
Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service
It is connected for quotient by internet).
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation.
The 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, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention
The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various
It can store the medium of program code.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.
Claims (18)
1. a kind of interaction processing method, which is characterized in that the described method includes:
The Query sentence of user is analyzed, corresponding structured statement is obtained;It include with suitable in the structured statement
The part of speech type of at least one word of order relation and each word;
According to the structured statement, obtained and the matched mesh of the structured statement from the multiple service moulding plates pre-established
Mark service moulding plate;Each service moulding plate includes at least one key structure with ordinal relation, and record has each pass
The corresponding part of speech type of bond structure, each key structure respectively correspond a keyword dictionary, in each keyword dictionary
Including multiple keywords that can be filled into the corresponding key structure position;
It is responded according to the destination service template, realizes interaction.
2. being obtained corresponding the method according to claim 1, wherein the Query sentence to user is analyzed
Structured statement specifically includes:
Speech recognition is carried out to the Query sentence of the speech form of the user, obtains corresponding text sentence;
The text sentence is analyzed according to the syntactic structure of the text sentence, obtains the structured statement.
3. multiple from what is pre-established the method according to claim 1, wherein according to the structured statement
Acquisition and the matched destination service template of the structured statement in service moulding plate, specifically include:
According to each key structure, each key structure pair for including in the structured statement, each service moulding plate
The relative ranks and each keyword dictionary of the part of speech type, each key structure answered, from the multiple service moulding plate
It obtains and the matched destination service template of the structured statement.
4. according to the method described in claim 3, it is characterized in that, according in the structured statement, each service moulding plate
Including each key structure, the corresponding part of speech type of each key structure, each key structure relative ranks and
Each keyword dictionary obtains and the matched destination service mould of the structured statement from the multiple service moulding plate
Plate specifically includes:
For each service moulding plate, judge at least one word for including in the structured statement quantity whether with it is described
The quantity of at least one for including in service moulding plate key structure is consistent;
If consistent, according in the sequencing and part of speech type, the service moulding plate of the word each in the structured statement
Including each key structure relative ranks and the corresponding part of speech type of each key structure, it is suitable according to from front to back
Sequence, successively compare each key words in the structured statement whether with described in corresponding position in the service moulding plate
Whether the corresponding part of speech type of key structure is consistent;
If consistent, further according to each word in the structured statement and each pass in the service moulding plate
Keyword dictionary, judges whether each word in the structured statement belongs to the described of corresponding position in the service moulding plate
Word in keyword dictionary;
If belonging to, determine that the service moulding plate is and the matched destination service template of the structured statement.
5. according to the method described in claim 4, it is characterized in that, further including that at least one is non-key in each service moulding plate
Structure, and record and have the corresponding part of speech type of each non-key structure, each corresponding non-key word word of non-key structure
Allusion quotation includes multiple non-key words that can be filled into the corresponding non-key structure in the non-key word dictionary;
Each key structure and each non-key structure arrange in a predetermined sequence in the service moulding plate;
According to the structured statement, obtained and the matched mesh of the structured statement from the multiple service moulding plates pre-established
Service moulding plate is marked, is specifically included:
According to include in the structured statement, each service moulding plate each key structure, each non-key structure,
Each key structure and the relative ranks of each non-key structure, each keyword dictionary and each non-key word
Dictionary obtains and the matched destination service template of the structured statement from the multiple service moulding plate.
6. according to the method described in claim 5, it is characterized in that, according in the structured statement, each service moulding plate
Including each key structure, each non-key structure, each key structure and each non-key structure it is opposite
Sequentially, each key structure and the corresponding part of speech type of each non-key structure, each keyword dictionary and each described
Non-key word dictionary, acquisition and the matched destination service template of the structured statement from the multiple service moulding plate,
It specifically includes:
For each service moulding plate, according in the structured statement and the service moulding plate each key structure,
The relative ranks of each key structure, each corresponding part of speech type of key structure and each keyword dictionary, judgement
With the presence or absence of each matched key words of key structure with the service moulding plate in the structured statement;
If it exists, according to each non-key structure in the structured statement, the service moulding plate, each non-key knot
The relative ranks and each non-key word dictionary of the corresponding part of speech type of structure, each non-key structure, judge the structure
Change each non-key word each non-key structure matching whether corresponding with the service moulding plate in sentence;
If matching, determine that the service moulding plate is and the matched destination service template of the structured statement.
7. according to the method described in claim 6, it is characterized in that, according in the structured statement, the service moulding plate
Each non-key structure, the corresponding part of speech type of each non-key structure, each non-key structure relative ranks and
Each non-key word dictionary judges whether each non-key word in the structured statement is each described with the service moulding plate
Non-key structure matching, specifically includes:
It is corresponding according to each non-key structure, each non-key structure in the structured statement, the service moulding plate
Part of speech type with the relative ranks of each non-key structure, according to each non-key word in the structured statement by preceding
Sequence after judges in the service moulding plate with the presence or absence of the part of speech with each non-key word in the structured statement
Type is consistent and the non-key structure of location matches;
If it exists, judge whether each non-key word belongs to the corresponding non-key dictionary of the matched non-key structure
In the non-key word;
If belonging to, determine that each non-key word in the structured statement is corresponding with the service moulding plate each described non-
Key structure matching.
8. according to any method of claim 3-7, which is characterized in that according to the structured statement, from pre-establishing
Multiple service moulding plates in obtain with the matched destination service template of the structured statement before, the method also includes:
According to preset configuration, the multiple service moulding plate is established.
9. a kind of interaction process device, which is characterized in that described device includes:
Analysis module is analyzed for the Query sentence to user, obtains corresponding structured statement;The structuring language
It include the part of speech type at least one word and each word of ordinal relation in sentence;
Module is obtained, for being obtained and the structure from the multiple service moulding plates pre-established according to the structured statement
Change the destination service template of statement matching;Each service moulding plate includes at least one key structure with ordinal relation, and
Record has the corresponding part of speech type of each key structure, and each key structure respectively corresponds a keyword dictionary, each institute
Stating includes multiple keywords that can be filled into the corresponding key structure position in keyword dictionary;
Respond module realizes interaction for being responded according to the destination service template.
10. device according to claim 9, which is characterized in that the analysis module specifically includes:
Voice recognition unit, the Query sentence for the speech form to the user carry out speech recognition, are corresponded to
Text sentence;
Analysis and processing unit obtains institute for analyzing according to the syntactic structure of the text sentence the text sentence
State structured statement.
11. device according to claim 9, which is characterized in that the acquisition module is specifically used for: according to the structure
Change sentence, each key structure for including in each service moulding plate, the corresponding part of speech type of each key structure, each described
The relative ranks of key structure and each keyword dictionary obtain and the structuring language from the multiple service moulding plate
The matched destination service template of sentence.
12. device according to claim 11, which is characterized in that the acquisition module is specifically used for:
For each service moulding plate, judge at least one word for including in the structured statement quantity whether with it is described
The quantity of at least one for including in service moulding plate key structure is consistent;
If consistent, according in the sequencing and part of speech type, the service moulding plate of the word each in the structured statement
Including each key structure relative ranks and the corresponding part of speech type of each key structure, it is suitable according to from front to back
Sequence, successively compare each key words in the structured statement whether with described in corresponding position in the service moulding plate
Whether the corresponding part of speech type of key structure is consistent;
If consistent, further according to each word in the structured statement and each pass in the service moulding plate
Keyword dictionary, judges whether each word in the structured statement belongs to the described of corresponding position in the service moulding plate
Word in keyword dictionary;
If belonging to, determine that the service moulding plate is and the matched destination service template of the structured statement.
13. device according to claim 12, which is characterized in that further include at least one non-pass in each service moulding plate
Bond structure, and record and have the corresponding part of speech type of each non-key structure, each corresponding non-key word of non-key structure
Dictionary includes multiple non-key words that can be filled into the corresponding non-key structure in the non-key word dictionary
Language;Each key structure and each non-key structure arrange in a predetermined sequence in the service moulding plate;
The acquisition module, is specifically used for:
According to include in the structured statement, each service moulding plate each key structure, each non-key structure,
Each key structure and the relative ranks of each non-key structure, each keyword dictionary and each non-key word
Dictionary obtains and the matched destination service template of the structured statement from the multiple service moulding plate.
14. device according to claim 13, which is characterized in that the acquisition module is specifically used for:
For each service moulding plate, according in the structured statement and the service moulding plate each key structure,
The relative ranks of each key structure, each corresponding part of speech type of key structure and each keyword dictionary, judgement
With the presence or absence of each matched key words of key structure with the service moulding plate in the structured statement;
If it exists, according to each non-key structure in the structured statement, the service moulding plate, each non-key knot
The relative ranks and each non-key word dictionary of the corresponding part of speech type of structure, each non-key structure, judge the structure
Change each non-key word each non-key structure matching whether corresponding with the service moulding plate in sentence;
If matching, determine that the service moulding plate is and the matched destination service template of the structured statement.
15. device according to claim 14, which is characterized in that the acquisition module is specifically used for:
It is corresponding according to each non-key structure, each non-key structure in the structured statement, the service moulding plate
Part of speech type with the relative ranks of each non-key structure, according to each non-key word in the structured statement by preceding
Sequence after judges in the service moulding plate with the presence or absence of the part of speech with each non-key word in the structured statement
Type is consistent and the non-key structure of location matches;
If it exists, judge whether each non-key word belongs to the corresponding non-key dictionary of the matched non-key structure
In the non-key word;
If belonging to, determine that each non-key word in the structured statement is corresponding with the service moulding plate each described non-
Key structure matching.
16. any device of 1-15 according to claim 1, which is characterized in that described device further include:
Module is established, establishes according to preset configuration, establishes the multiple service moulding plate.
17. a kind of computer equipment, which is characterized in that the equipment includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Now such as method described in any one of claims 1-8.
18. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that the program is executed by processor
Shi Shixian method for example described in any one of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810565042.8A CN108984600B (en) | 2018-06-04 | 2018-06-04 | Interaction processing method and device, computer equipment and readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810565042.8A CN108984600B (en) | 2018-06-04 | 2018-06-04 | Interaction processing method and device, computer equipment and readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108984600A true CN108984600A (en) | 2018-12-11 |
CN108984600B CN108984600B (en) | 2020-03-03 |
Family
ID=64540033
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810565042.8A Active CN108984600B (en) | 2018-06-04 | 2018-06-04 | Interaction processing method and device, computer equipment and readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108984600B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111767391A (en) * | 2020-03-27 | 2020-10-13 | 北京沃东天骏信息技术有限公司 | Target text generation method, device, computer system and medium |
CN112632973A (en) * | 2020-12-31 | 2021-04-09 | 中国农业银行股份有限公司 | Text processing method, device, equipment and storage medium |
WO2021169499A1 (en) * | 2020-02-26 | 2021-09-02 | 平安科技(深圳)有限公司 | Network bad data monitoring method, apparatus and system, and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4823306A (en) * | 1987-08-14 | 1989-04-18 | International Business Machines Corporation | Text search system |
CN105072143A (en) * | 2015-07-02 | 2015-11-18 | 百度在线网络技术(北京)有限公司 | Interaction system for intelligent robot and client based on artificial intelligence |
CN105930362A (en) * | 2016-04-12 | 2016-09-07 | 晶赞广告(上海)有限公司 | Search target recognition method and device, and terminal |
CN106407377A (en) * | 2016-09-12 | 2017-02-15 | 北京百度网讯科技有限公司 | Search method and device based on artificial intelligence |
-
2018
- 2018-06-04 CN CN201810565042.8A patent/CN108984600B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4823306A (en) * | 1987-08-14 | 1989-04-18 | International Business Machines Corporation | Text search system |
CN105072143A (en) * | 2015-07-02 | 2015-11-18 | 百度在线网络技术(北京)有限公司 | Interaction system for intelligent robot and client based on artificial intelligence |
CN105930362A (en) * | 2016-04-12 | 2016-09-07 | 晶赞广告(上海)有限公司 | Search target recognition method and device, and terminal |
CN106407377A (en) * | 2016-09-12 | 2017-02-15 | 北京百度网讯科技有限公司 | Search method and device based on artificial intelligence |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021169499A1 (en) * | 2020-02-26 | 2021-09-02 | 平安科技(深圳)有限公司 | Network bad data monitoring method, apparatus and system, and storage medium |
CN111767391A (en) * | 2020-03-27 | 2020-10-13 | 北京沃东天骏信息技术有限公司 | Target text generation method, device, computer system and medium |
CN111767391B (en) * | 2020-03-27 | 2024-04-16 | 北京沃东天骏信息技术有限公司 | Target text generation method, device, computer system and medium |
CN112632973A (en) * | 2020-12-31 | 2021-04-09 | 中国农业银行股份有限公司 | Text processing method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108984600B (en) | 2020-03-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106133825B (en) | Broad sense phrase in automatic speech recognition system | |
CN105874530B (en) | Predicting phrase recognition quality in an automatic speech recognition system | |
JP2021505032A (en) | Automatic blocking of sensitive data contained in audio streams | |
US10147438B2 (en) | Role modeling in call centers and work centers | |
CN108052577A (en) | A kind of generic text content mining method, apparatus, server and storage medium | |
CN110321413A (en) | Session frame | |
CN109002510A (en) | A kind of dialog process method, apparatus, equipment and medium | |
CN108984600A (en) | Interaction processing method, device, computer equipment and readable medium | |
CN109711200A (en) | Accurate poverty alleviation method, apparatus, equipment and medium based on block chain | |
JP2023505283A (en) | Anaphora solution, system, program | |
US20200042643A1 (en) | Heuristic q&a system | |
CN107436844A (en) | A kind of generation method and device of interface use-case intersection | |
CN108012173A (en) | A kind of content identification method, device, equipment and computer-readable storage medium | |
CN111694940A (en) | User report generation method and terminal equipment | |
US20190079916A1 (en) | Using syntactic analysis for inferring mental health and mental states | |
CN109783624A (en) | Answer generation method, device and the intelligent conversational system in knowledge based library | |
CN108369806A (en) | Configurable all-purpose language understands model | |
CN109446907A (en) | A kind of method, apparatus of Video chat, equipment and computer storage medium | |
CN109542757A (en) | Interface testing environment determines method, apparatus, electronic equipment and storage medium | |
CN107273250A (en) | The method of testing and device of electronic declaration form automatic cover system | |
JP2022170726A (en) | Computer-implemented method, computer system and computer program (contextual real-time content highlighting on shared screens) | |
US11226832B2 (en) | Dynamic generation of user interfaces based on dialogue | |
WO2019168235A1 (en) | Method and interactive ai agent system for providing intent determination on basis of analysis of same type of multiple pieces of entity information, and computer-readable recording medium | |
CN110442803A (en) | Data processing method, device, medium and the calculating equipment executed by calculating equipment | |
US11037549B1 (en) | System and method for automating the training of enterprise customer response systems using a range of dynamic or generic data sets |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210511 Address after: 100085 Baidu Building, 10 Shangdi Tenth Street, Haidian District, Beijing Patentee after: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd. Patentee after: Shanghai Xiaodu Technology Co.,Ltd. Address before: 100085 Baidu Building, 10 Shangdi Tenth Street, Haidian District, Beijing Patentee before: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd. |