CN108984600B - Interaction processing method and device, computer equipment and readable medium - Google Patents

Interaction processing method and device, computer equipment and readable medium Download PDF

Info

Publication number
CN108984600B
CN108984600B CN201810565042.8A CN201810565042A CN108984600B CN 108984600 B CN108984600 B CN 108984600B CN 201810565042 A CN201810565042 A CN 201810565042A CN 108984600 B CN108984600 B CN 108984600B
Authority
CN
China
Prior art keywords
service template
key
structured
key structure
word
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.)
Active
Application number
CN201810565042.8A
Other languages
Chinese (zh)
Other versions
CN108984600A (en
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 Baidu Netcom Science and Technology Co Ltd
Shanghai Xiaodu Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810565042.8A priority Critical patent/CN108984600B/en
Publication of CN108984600A publication Critical patent/CN108984600A/en
Application granted granted Critical
Publication of CN108984600B publication Critical patent/CN108984600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides an interaction processing method, an interaction processing device, computer equipment and a readable medium. The method comprises the following steps: analyzing a Query statement of a user to obtain a structured statement; the structured statement comprises at least one word with a sequential relationship and the part of speech type of each word; according to the structured statement, acquiring a target service template matched with the structured statement from a plurality of service templates which are established in advance; each service template comprises at least one key structure with a sequential relationship, the word type corresponding to each key structure is recorded, each key structure corresponds to a keyword dictionary, and each keyword dictionary comprises a plurality of keywords capable of being filled in the positions of the corresponding key structures; and responding according to the target service template to realize interaction. According to the technical scheme, the target service template matched with the structured statement can be accurately recalled, response is carried out based on the target service module, interaction is realized, and the accuracy of service positioning and the service efficiency can be effectively improved.

Description

Interaction processing method and device, computer equipment and readable medium
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of computer application technologies, and in particular, to an interaction processing method and apparatus, a computer device, and a readable medium.
[ background of the invention ]
With the rapid development of the Artificial Intelligence (AI) industry, voice interconversion is essential. The intelligent interaction device performing voice interaction with the user is like human ears and mouth, firstly, a query sentence sent by the user through voice is understood, then the intention of the user is understood, and corresponding dialogues are recalled to give feedback based on the intention of the user, so that interaction is realized. If neither intelligent interactive device can understand and understand the interaction behavior of the user, it is certain that artificial intelligence is not mentioned. It is better to communicate with a person with impaired ears that the user says it and that he answers another, knowing how bad the user experience is.
For example, in the prior art intelligent interactive device, one intelligent interactive device can support a plurality of parallel services. For each service, a corresponding template can be set in a wildcard + keyword mode. For example, the template may be represented as follows: [ "[ W:0-n ]" ] + [ key words ]. Wherein 0-n in the wildcard [ "[ W:0-n ]" ] represents the number of matched bytes, and if the characters are Chinese characters, the number of wildcard Chinese characters is n/2. Therefore, for the Query sentence of the user, the template corresponding to each service can be matched with whether the Query sentence is matched with the template of the user, if the Query sentence is matched with the template of the user, response is fed back to the user based on the service, and interaction with the user is realized.
However, when the templates are set by using wildcard + keyword for each service in the prior art, different services may be recalled simultaneously for the same Query of the user, and the service that the user actually wants to recall is only one of the services, so the existing template may cause service recall, which may not accurately provide services for the user, and reduce the service efficiency of interactive processing.
[ summary of the invention ]
The invention provides an interactive processing method, an interactive processing device, computer equipment and a readable medium, which are used for avoiding calling over service caused by a template and improving the service efficiency of interactive processing.
The invention provides an interactive processing method, which comprises the following steps:
analyzing a Query statement of a user to obtain a corresponding structured statement; the structured statement comprises at least one word with a sequential relationship and the part of speech type of each word;
according to the structured statement, acquiring a target service template matched with the structured statement from a plurality of service templates which are established in advance; each service template comprises at least one key structure with a sequential relationship, and records a word type corresponding to each key structure, each plurality of key structures respectively correspond to a keyword dictionary, and each keyword dictionary comprises a plurality of keywords capable of being filled in the corresponding key structure positions;
and responding according to the target service template to realize interaction.
Further optionally, in the method, analyzing the Query statement of the user to obtain a corresponding structured statement specifically includes:
carrying out voice recognition on the Query sentence in the voice form of the user to obtain a corresponding text sentence;
and analyzing the text sentences according to the grammatical structure of the text sentences to obtain the structured sentences.
Further optionally, in the method, according to the structured statement, obtaining a target service template matched with the structured statement from a plurality of service templates established in advance includes:
and acquiring the target service template matched with the structured statement from the plurality of service templates according to the structured statement, each key structure included in each service template, the word type corresponding to each key structure, the relative sequence of each key structure and each keyword dictionary.
Further optionally, in the method, according to the structured statement, each of the key structures included in each of the service templates, a word type corresponding to each of the key structures, a relative order of each of the key structures, and each of the keyword dictionaries, obtaining the target service template matching the structured statement from the plurality of service templates specifically includes:
for each service template, judging whether the number of at least one word contained in the structured statement is consistent with the number of at least one key structure contained in the service template;
if the key words in the structured sentence are consistent with the word types corresponding to the key structures at the corresponding positions in the service template, sequentially comparing whether the key words in the structured sentence are consistent with the word types corresponding to the key structures at the corresponding positions in the service template or not according to the sequence and the relative sequence of the key structures in the service template and the word types corresponding to the key structures in the structured sentence;
if yes, further judging whether each word in the structured sentence belongs to a word in the keyword dictionary at a corresponding position in the service template according to each word in the structured sentence and each keyword dictionary in the service template;
and if so, determining the service template as the target service template matched with the structured statement.
Further optionally, in the method as described above, each service template further includes at least one non-key structure, and records a word type corresponding to each non-key structure, each non-key structure corresponds to a non-key word dictionary, and the non-key word dictionary includes a plurality of non-key words that can be filled into the corresponding non-key structures; arranging each of the critical structures and each of the non-critical structures in the service template according to a predetermined order;
according to the structured statement, acquiring a target service template matched with the structured statement from a plurality of service templates which are established in advance, wherein the method specifically comprises the following steps:
and acquiring the target service template matched with the structured statement from the plurality of service templates according to the structured statement, each key structure, each non-key structure, the relative sequence of each key structure and each non-key structure, each keyword dictionary and each non-keyword dictionary.
Further optionally, in the method as described above, the obtaining, from the multiple service templates, the target service template matching the structured sentence according to the structured sentence, each of the key structures included in each of the service templates, each of the non-key structures, a relative order of each of the key structures and each of the non-key structures, a word type corresponding to each of the key structures and each of the non-key structures, each of the keyword dictionaries, and each of the non-keyword dictionaries, specifically includes:
for each service template, judging whether a keyword matched with each key structure of the service template exists in the structured sentence or not according to the structured sentence, each key structure in the service template, the relative sequence of each key structure, the word type corresponding to each key structure and each keyword dictionary;
if yes, judging whether each non-keyword in the structured statement is matched with each corresponding non-key structure in the service template or not according to the structured statement, each non-key structure in the service template, the word type corresponding to each non-key structure, the relative sequence of each non-key structure and each non-keyword dictionary;
and if so, determining the service template as the target service template matched with the structured statement.
Further optionally, in the method, determining, according to the structured statement, each of the non-key structures in the service template, a word type corresponding to each of the non-key structures, a relative order of each of the non-key structures, and each of the non-keyword dictionaries, whether each of the non-keywords in the structured statement matches each of the non-key structures of the service template specifically includes:
judging whether the service template has the non-key structures which are consistent with the part-of-speech of each non-keyword in the structured statement and are matched in position according to the structured statement, each non-key structure in the service template and the part-of-speech corresponding to each non-key structure in the service template and the relative sequence of each non-key structure and the sequence of each non-keyword in the structured statement from front to back;
if yes, judging whether each non-keyword belongs to the non-key words in the non-key dictionary corresponding to the matched non-key structure;
and if so, determining that each non-keyword in the structured statement is matched with each corresponding non-key structure in the service template.
Further optionally, in the method described above, before obtaining, according to the structured statement, a target service template matching the structured statement from a plurality of service templates established in advance, the method further includes:
and establishing the plurality of service templates according to preset configuration.
The invention provides an interactive processing device, comprising:
the analysis module is used for analyzing the Query statement of the user to obtain a corresponding structured statement; the structured statement comprises at least one word with a sequential relationship and the part of speech type of each word;
the acquisition module is used for acquiring a target service template matched with the structured statement from a plurality of pre-established service templates according to the structured statement; each service template comprises at least one key structure with a sequential relationship, and records a word type corresponding to each key structure, each plurality of key structures respectively correspond to a keyword dictionary, and each keyword dictionary comprises a plurality of keywords capable of being filled in the corresponding key structure positions;
and the response module is used for responding according to the target service template to realize interaction.
Further optionally, in the apparatus described above, the analysis module specifically includes:
the voice recognition unit is used for carrying out voice recognition on the Query sentence in the voice form of the user to obtain a corresponding text sentence;
and the analysis processing unit is used for analyzing the text sentences according to the grammatical structures of the text sentences to obtain the structured sentences.
Further optionally, in the apparatus described above, the obtaining module is specifically configured to: and acquiring the target service template matched with the structured statement from the plurality of service templates according to the structured statement, each key structure included in each service template, the word type corresponding to each key structure, the relative sequence of each key structure and each keyword dictionary.
Further optionally, in the apparatus described above, the obtaining module is specifically configured to:
for each service template, judging whether the number of at least one word contained in the structured statement is consistent with the number of at least one key structure contained in the service template;
if the key words in the structured sentence are consistent with the word types corresponding to the key structures at the corresponding positions in the service template, sequentially comparing whether the key words in the structured sentence are consistent with the word types corresponding to the key structures at the corresponding positions in the service template or not according to the sequence and the relative sequence of the key structures in the service template and the word types corresponding to the key structures in the structured sentence;
if yes, further judging whether each word in the structured sentence belongs to a word in the keyword dictionary at a corresponding position in the service template according to each word in the structured sentence and each keyword dictionary in the service template;
and if so, determining the service template as the target service template matched with the structured statement.
Further optionally, in the apparatus as described above, each service template further includes at least one non-key structure, and records a word type corresponding to each non-key structure, each non-key structure corresponds to a non-key word dictionary, and the non-key word dictionary includes a plurality of non-key words that can be filled into the corresponding non-key structures; arranging each of the critical structures and each of the non-critical structures in the service template according to a predetermined order;
the acquisition module is specifically configured to:
and acquiring the target service template matched with the structured statement from the plurality of service templates according to the structured statement, each key structure, each non-key structure, the relative sequence of each key structure and each non-key structure, each keyword dictionary and each non-keyword dictionary.
Further optionally, in the apparatus described above, the obtaining module is specifically configured to:
for each service template, judging whether a keyword matched with each key structure of the service template exists in the structured sentence or not according to the structured sentence, each key structure in the service template, the relative sequence of each key structure, the word type corresponding to each key structure and each keyword dictionary;
if yes, judging whether each non-keyword in the structured statement is matched with each corresponding non-key structure in the service template or not according to the structured statement, each non-key structure in the service template, the word type corresponding to each non-key structure, the relative sequence of each non-key structure and each non-keyword dictionary;
and if so, determining the service template as the target service template matched with the structured statement.
Further optionally, in the apparatus described above, the obtaining module is specifically configured to:
judging whether the service template has the non-key structures which are consistent with the part-of-speech of each non-keyword in the structured statement and are matched in position according to the structured statement, each non-key structure in the service template and the part-of-speech corresponding to each non-key structure in the service template and the relative sequence of each non-key structure and the sequence of each non-keyword in the structured statement from front to back;
if yes, judging whether each non-keyword belongs to the non-key words in the non-key dictionary corresponding to the matched non-key structure;
and if so, determining that each non-keyword in the structured statement is matched with each corresponding non-key structure in the service template.
Further optionally, the apparatus as described above further includes:
and the establishing module is used for establishing the plurality of service templates according to preset configuration.
The present invention also provides a computer apparatus, the apparatus comprising:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the interaction processing method as described above.
The invention also provides a computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, carries out the interaction processing method as described above.
According to the interactive processing method, the interactive processing device, the computer equipment and the readable medium, the Query statement of the user is analyzed to obtain the corresponding structured statement; the structured statement comprises at least one word with a sequential relationship and the part of speech type of each word; according to the structured statement, acquiring a target service template matched with the structured statement from a plurality of service templates which are established in advance; each service template comprises at least one key structure with a sequential relation, and a word type corresponding to each key structure is recorded, each key structure corresponds to a keyword dictionary, and each keyword dictionary comprises a plurality of keywords capable of being filled in the corresponding key structure positions; and responding according to the target service template to realize interaction. According to the technical scheme, the service template is realized by adopting a special structure, and the technical problem of service recall caused by the fact that the template is set in a wildcard + keyword mode in the prior art can be solved.
[ description of the drawings ]
Fig. 1 is a flowchart of an embodiment of an interactive processing method according to the present invention.
Fig. 2 is a structural diagram of an interactive processing device according to a first embodiment of the present invention.
Fig. 3 is a structural diagram of a second embodiment of an interactive processing device according to the present invention.
FIG. 4 is a block diagram of an embodiment of a computer device of the present invention.
Fig. 5 is an exemplary diagram of a computer device provided by the present invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flowchart of an embodiment of an interactive processing method according to the present invention. As shown in fig. 1, the interactive processing method of this embodiment may specifically include the following steps:
100. analyzing a Query statement of a user to obtain a corresponding structured statement; the structured statement comprises at least one word with a sequential relationship and the part of speech type of each word;
101. according to the structured statement, acquiring a target service template matched with the structured statement from a plurality of service templates which are established in advance; each service template comprises at least one key structure with a sequential relation, and a word type corresponding to each key structure is recorded, each key structure corresponds to a keyword dictionary, and each keyword dictionary comprises a plurality of keywords capable of being filled in the corresponding key structure positions;
102. and responding according to the target service template to realize interaction.
The execution main body of the interactive processing method of this embodiment may be an interactive processing device interacting with a user, and the interactive processing device may be an artificial intelligence device, and may receive a Query statement of the user and understand the Query statement of the user, so as to perform corresponding feedback based on the Query statement of the user.
In this embodiment, the interactive processing device may support voice input of a user and may also support text input of the user. That is, the Query sentence of the user can be in a voice form or a text form.
Specifically, in this embodiment, after receiving the Query sentence of the user, the interactive processing device may analyze whether the Query sentence of the user is in a voice form or a text form, and if the Query sentence of the user is in the voice form, perform voice recognition on the Query sentence of the voice form of the user to obtain a corresponding text sentence; and then analyzing the text sentences according to the grammatical structures of the text sentences to obtain structured sentences. For example, for a chinese sentence, matching may be performed according to the sentence pattern and the grammar of the chinese sentence and the rule of adding the corresponding modifier to obtain the corresponding structured sentence. A sentence pattern, such as a structured sentence, may be: sentence patterns such as modifier + subject + predicate + object + adverb. Therefore, at least one word having an order relationship and the part-of-speech of each word may be included in the structured sentence of the present embodiment, for example, the part-of-speech of the word in the structured sentence may be a modifier, a subject, a predicate, an object, a mood, and the like. In addition, for words in other languages, corresponding structured words can be obtained according to characteristics such as grammar. For example, a sentence of a user Query is "listen to music", and a corresponding structured sentence may be "listen (predicate) + music (object)".
Optionally, in this embodiment, a plurality of service templates may be established according to a preset configuration, and each service template may correspond to one service provided. Specifically, each service template may be generated according to a configuration preset by a manager in the interaction processing device. Specifically, the service template may be expressed by a sentence and a sentence grammar, for example, a certain service template may be composed of word types such as a subject, a predicate, an object, a preposition, and an exclamation having an order relationship, and the service template composed of these word types may include only a key structure that is necessarily present, or may include a non-key structure that may or may not be present. That is, each service template includes at least one key structure having an order relationship, and records the word types corresponding to each key structure, such as subjects, predicates, objects, prepositions, exclamations, and the like. Of course, if the service template further includes at least one non-key structure having an order relationship, the part-of-speech corresponding to each non-key structure also needs to be recorded at the same time.
Corresponding to each key structure or non-key structure, a dictionary is respectively corresponding. If each key structure corresponds to a keyword dictionary, the keyword dictionary may include a plurality of keywords that can be filled in to the corresponding position of the key structure. Each non-key structure corresponds to a non-keyword dictionary that may include a plurality of non-keywords that can be populated to the corresponding key structure location. The plurality of keyword words in the keyword dictionary may be semantically identical or similar words. Similarly, the non-keywords in the non-keyword dictionary may also be words with the same or similar semantics. For example, a keyword dictionary corresponding to a keyword structure of which the word type in a certain service template is an object may include a plurality of keywords such as "guess riddle", and "riddle".
For example, a service template is formed by modifiers + subjects + predicates + objects + words, and each word structure corresponds to a dictionary in the service template. For example, the order of the word structures of a service template and the dictionary corresponding to each word structure are as follows: [ D: Please ]: please, troublesome, impossible, … …; [ D: give ]: feeding, assisting, replacing and … …; me [ D ]: me, baby, me, … …; [ D: want ]: want, … …; [ D: play ]: play, guess, play, … …; [ D: puzzle ]: guessing riddle, … …; AUX [ D ]: a table, a bar, a bell and … …; [ D: listen ]: listen, … …. Where [ D: play ] and [ D: puzzle ] can be defined as keyword dictionaries in the service template, while others are non-keyword dictionaries.
In practical application, when a user configures a service template, there may be two configuration modes as follows:
the first configuration: each of the pre-established plurality of service templates includes only critical structures and no non-critical structures.
In this case, the correspondence requires that only the keyword corresponding to the key structure should be included in the structured sentence obtained based on the Query sentence of the user. At this time, when the target service template matched with the structured statement is acquired from the plurality of service templates established in advance according to the structured statement in step 102, "it may be assumed that all terms in the structured statement are key terms, and then the target service template is determined. Specifically, a target service template matching the structured sentence can be obtained from a plurality of service templates according to the structured sentence, each key structure included in each service template, a word type corresponding to each key structure, a relative order of each key structure, and each keyword dictionary. Wherein the relative order of the key structures may identify the location of the key structures in the service template. For example, the following steps may be specifically adopted to implement:
(a1) for each service template, judging whether the number of at least one word contained in the structured statement is consistent with the number of at least one key structure contained in the service template; if yes, executing step (b 1); otherwise, the structured statement is considered not to be matched with the service template;
(b1) sequentially comparing whether each word in the structured sentence is consistent with the word type corresponding to the key structure at the corresponding position in the service template or not according to the sequence and the word type of each word in the structured sentence, the relative sequence of each key structure in the service template and the word type corresponding to each key structure; if yes, executing step (c 1); otherwise, the structured statement is considered not to be matched with the service template;
(c1) further judging whether each word in the structured sentence belongs to the word in the keyword dictionary at the corresponding position in the service template according to each word in the structured sentence and each keyword dictionary in the service template; if yes, executing step (d 1); otherwise, the structured statement is considered not to be matched with the service template;
(d1) and determining the service template as a target service template matched with the structured statement.
In this embodiment, the service template only includes at least one key structure, and the number of the at least one word included in the structured statement is the same as the number of the at least one key structure of the service template, so that the service template is likely to become a target service template matching with the structured statement. Therefore, in this embodiment, it may be assumed that at least one term in the structured statement is a key term, and then it is determined whether the number of the at least one term included in the structured statement is consistent with the number of the at least one key structure included in the service template, and if so, it is indicated that the structured statement may be matched with the service template. And then, sequentially comparing whether the word types of the words in the structured sentences are consistent with the word types corresponding to the key structures at the corresponding positions in the service template or not according to the sequence of the key structures in the structured sentences and the service template from front to back. If so, comparing whether the part of speech of the first word in the structured sentence is consistent with the part of speech corresponding to the first key structure in the service template, comparing whether the part of speech of the second word in the structured sentence is consistent with the part of speech corresponding to the second key structure in the service template, and so on until comparing whether the part of speech of the last word in the structured sentence is consistent with the part of speech corresponding to the last key structure in the service template. If the part of speech of each word in the structured sentence is consistent with the part of speech corresponding to the key structure at the corresponding position in the service template, the service template may be the service template matched with the structured sentence. Otherwise, as long as the word type of a word in the structured statement is inconsistent with the word type corresponding to the key structure at the corresponding position in the service template, the service template cannot be the target service template matched with the structured statement.
And when each word in the structured sentence is consistent with the word type corresponding to the key structure at the corresponding position in the service template, further judging whether each word in the structured sentence belongs to the word in the keyword dictionary at the corresponding position in the service template. If the first word in the structured sentence belongs to the word in the keyword dictionary corresponding to the first key structure in the service template, whether the second word in the structured sentence belongs to the word in the keyword dictionary corresponding to the second key structure in the service template is judged, and the like until whether the last word in the structured sentence belongs to the word in the keyword dictionary corresponding to the last key structure in the service template is compared. And if each word in the structured sentence belongs to the word in the keyword dictionary corresponding to the key structure at the corresponding position in the service template, determining the service template as a target service template matched with the structured sentence. Otherwise, as long as a word in the structured sentence does not belong to a word in the keyword dictionary corresponding to the key structure at the corresponding position in the service template, the service template is not the target service template matched with the structured sentence.
The second configuration: each of the pre-established plurality of service templates includes both critical and non-critical structures.
In this case, the structured statement obtained based on the Query statement of the user, which can be processed by a plurality of service templates established in advance, may only include the keyword corresponding to the key structure; or, a structural sentence including both a keyword corresponding to a key structure in the service template and a non-keyword corresponding to a non-key structure in the service template may be processed. In this case, when the target service template matching the structured sentence is acquired from the plurality of service templates established in advance according to the structured sentence in step 102, the target service template matching the structured sentence may be specifically acquired from the plurality of service templates according to the structured sentence, each of the key structures included in each of the service templates, each of the non-key structures, a relative order of each of the key structures and each of the non-key structures, each of the keyword dictionaries, and each of the non-keyword dictionaries. Since the sequence of each critical structure and non-critical structure in the service template is preset, the relative sequence of each critical structure, the relative sequence of each non-critical structure, and the relative sequence of each critical structure and non-critical structure can be determined. In practice, the relative order of at least one critical structure, such as the first critical structure, the second critical structure from front to back, etc., may be determined, and then the critical structure whose relative order has been determined may be used to identify the immediately adjacent non-critical structure before or after it, and other non-critical structures may be identified by the adjacent determined critical structure or the relative order of the non-critical structures. For example, a sentence pattern structure of a certain service template is: modifier + subject + predicate + object + adverb, where the predicate and object are key structures, i.e., the predicate is the first key structure and the object is the second key structure. The modifiers, the subject and the moose words are all non-key structures, the subject is a non-key structure located before the first key structure, namely the predicate, the moose words are non-key structures located after the second key structure, namely the object, and the modifiers are non-key structures located before the subject of the non-key structures. Of course, in practical applications, other ways may be used to identify the relevant order of each critical structure and each non-critical structure in one service template, so as to identify the relative position of each critical structure in the service template.
For example, the step "obtaining a target service template matching the structured sentence from a plurality of service templates according to the structured sentence, each key structure included in each service template, each non-key structure, the relative order of each key structure and each non-key structure, each keyword dictionary, and each non-keyword dictionary" may specifically include the following steps:
(a2) for each service template, judging whether a key word matched with each key structure of the service template exists in the structured sentence or not according to the structured sentence, each key structure in the service template, the relative sequence of each key structure, the word type corresponding to each key structure and each keyword dictionary; if so, performing step (b 2); otherwise, if the structured statement does not exist, the structured statement is not matched with the service template;
in this step, it is determined whether there are key words matching with each key structure of the service template in the structured statement, which may refer to steps (a1) - (c1) in the foregoing embodiment, and details are not repeated here.
(b2) Judging whether each non-key word in the structured sentence is matched with the corresponding non-key structure in the service template or not according to the structured sentence, each non-key structure in the service template, the word type corresponding to each non-key structure, the relative sequence of each non-key structure and each non-key word dictionary; if so, executing step (c 2); otherwise, if not, the structured statement is not matched with the service template;
(c2) and determining the service template as a target service template matched with the structured statement.
Specifically, in this embodiment, when detecting whether the service template is a target service template matched with the structured statement, first, it is detected whether a keyword that hits a key structure that must exist in the service module exists in the structured statement; if the keywords of the key structures in the service template exist, detecting whether the remaining words in the structured statement just hit the optionally existing non-key structures in the service template, and if so, determining that the service template is the target service template matched with the structured statement. It should be noted that, since the non-critical structure in the service template is optionally present, that is, the non-critical structure in the service template may be present or absent, but if present, it is required that the word corresponding to the non-critical structure in the structured sentence must be a word in the non-keyword dictionary corresponding to the non-critical structure.
Similarly, for a service template of the following structure: modifier + subject + predicate + object + adverb, where the predicate and object are key structures, i.e., the predicate is the first key structure and the object is the second key structure. And modifiers, subjects and moods are all non-critical structures. The service template may be recalled by structured sentences structured as "predicate + object", "subject + predicate + object", "predicate + object + adverb", "modifier + subject + predicate + object", "modifier + object + adverb", and the like. And each word in the structured sentence must also belong to a word in the keyword dictionary or the non-keyword dictionary at the corresponding position in the service template, so that the service template can be determined to be the target service template matched with the structured sentence.
For example, the following is an example of a service template:
Figure BDA0001684190750000141
in the service template, "indicates that the corresponding structure is a non-key structure, the non-key structure may be present or absent in the structured sentence that can be matched with the service template, but if the non-key structure is present, the corresponding word in the structured sentence that is matched with the service template must be a word in a non-keyword dictionary corresponding to the non-key structure. Wherein, "[ D: puzzle ]" is a key structure which must exist, and the corresponding words in the structured sentences which are matched with the service template must be the words in the keyword dictionary which corresponds to the key structure.
Specifically, the implementation of step (b2) may specifically include the following steps:
(a3) judging whether a non-key structure which is consistent with the part of speech of each non-key word in the structured sentence and is matched with the part of speech of each non-key word in the structured sentence in position exists in the service template according to the relative sequence of each non-key structure, each non-key structure in the service template and the part of speech corresponding to each non-key structure in the structured sentence and the sequence of each non-key word from front to back; if so, performing step (b 3); otherwise, if the structured statement does not exist, the structured statement is considered not to be matched with the service template;
(b3) judging whether each non-key word belongs to a non-key word in a non-key dictionary corresponding to the matched non-key structure; if yes, executing step (c 3); otherwise, if not, the structured statement is considered not to be matched with the service template;
(c3) determining that each non-keyword in the structured statement matches a corresponding non-critical structure in the service template.
According to the step (a2), if there are key words matching with each key structure of the service template in the structured sentence, it may be determined that, except the key words matching with the service template, other key words may be temporarily considered as non-key words, and then it is determined whether each non-key word in the structured sentence matches with each corresponding non-key structure in the service template according to the steps (a3) - (b 3).
In the interactive processing method of the embodiment, a corresponding structured statement is obtained by analyzing a Query statement of a user; the structured statement comprises at least one word with a sequential relationship and the part of speech type of each word; according to the structured statement, acquiring a target service template matched with the structured statement from a plurality of service templates which are established in advance; each service template comprises at least one key structure with a sequential relation, and a word type corresponding to each key structure is recorded, each key structure corresponds to a keyword dictionary, and each keyword dictionary comprises a plurality of keywords capable of being filled in the corresponding key structure positions; and responding according to the target service template to realize interaction. In the technical scheme of the embodiment, the service template is realized by adopting a special structure, and the technical problem of service overtaking caused by adopting a wildcard + keyword mode to set the template in the prior art can be avoided.
Fig. 2 is a structural diagram of an interactive processing device according to a first embodiment of the present invention. As shown in fig. 2, the interactive processing apparatus of this embodiment may specifically include:
the analysis module 10 is configured to analyze a Query statement of a user to obtain a corresponding structured statement; the structured statement comprises at least one word with a sequential relationship and the part of speech type of each word;
the acquisition module 11 is configured to acquire a target service template matched with the structured statement from a plurality of service templates established in advance according to the structured statement analyzed by the analysis module 10; each service template comprises at least one key structure with a sequential relationship, and records a word type corresponding to each key structure, each multi-key structure corresponds to a keyword dictionary respectively, and each keyword dictionary comprises a plurality of keywords capable of being filled in the corresponding key structure;
the response module 12 is configured to respond according to the target service template acquired by the acquisition module 11, so as to implement interaction.
The implementation principle and technical effect of the interactive processing device in this embodiment that uses the modules to implement the interactive processing are the same as those of the related method embodiment, and details of the related method embodiment may be referred to and are not repeated herein.
Fig. 3 is a structural diagram of a second embodiment of an interactive processing device according to the present invention. As shown in fig. 3, the interactive processing device of the present embodiment further includes the following technical solutions on the basis of the technical solutions of the embodiment shown in fig. 2.
In the interactive processing device of this embodiment, if the Query sentence of the user is in a text form, the analysis module 10 may directly analyze the Query sentence in the text form according to the syntax structure of the text sentence, so as to obtain a structured sentence.
If the Query statement of the user is in a speech form, as shown in fig. 3, the corresponding analysis module 10 may specifically include:
the voice recognition unit 101 is configured to perform voice recognition on a Query statement in a voice form of a user to obtain a corresponding text statement;
the analysis processing unit 102 is configured to analyze the text sentence identified by the speech recognition unit 101 according to the grammatical structure of the text sentence to obtain a structured sentence.
Further optionally, in the interaction processing apparatus of this embodiment, the obtaining module 11 is specifically configured to obtain, according to the structured statement, each key structure included in each service template, a word type corresponding to each key structure, a relative order of each key structure, and each keyword dictionary, which are obtained by processing by the analysis processing unit 102, a target service template matched with the structured statement from the plurality of service templates.
Further optionally, in the interaction processing apparatus of this embodiment, the obtaining module 11 is specifically configured to:
for each service template, judging whether the number of at least one word contained in the structured statement processed by the analysis processing unit 102 is consistent with the number of at least one key structure contained in the service template;
if so, sequentially comparing whether each key word in the structured sentence is consistent with the word type corresponding to the key structure at the corresponding position in the service template or not according to the sequence and the word type of each word in the structured sentence, the relative sequence of each key structure in the service template and the word type corresponding to each key structure from front to back;
if yes, further judging whether each word in the structured sentence belongs to the word in the keyword dictionary at the corresponding position in the service template according to each word in the structured sentence and each keyword dictionary in the service template;
and if so, determining the service template as a target service template matched with the structured statement.
Further optionally, in the interaction processing apparatus of this embodiment, each service template further includes at least one non-key structure, and records a part-of-speech type corresponding to each non-key structure, each non-key structure corresponds to one non-key word dictionary, and the non-key word dictionary includes a plurality of non-key words that can be filled into the corresponding non-key structure; arranging all key structures and all non-key structures in a service template according to a preset sequence;
the obtaining module 11 is specifically configured to:
according to the structured sentence obtained by the analysis processing unit 102, each key structure included in each service template, each non-key structure, the relative order of each key structure and each non-key structure, each keyword dictionary and each non-keyword dictionary, a target service template matching the structured sentence is obtained from a plurality of service templates.
Further optionally, in the interaction processing apparatus of this embodiment, the obtaining module 11 is specifically configured to:
for each service template, judging whether a keyword matched with each key structure of the service template exists in the structured sentence according to the structured sentence obtained by processing by the analysis processing unit 102, each key structure in the service template, the relative sequence of each key structure, the part of speech corresponding to each key structure and each keyword dictionary;
if yes, judging whether each non-key word in the structured sentence is matched with each corresponding non-key structure in the service template or not according to the structured sentence, each non-key structure in the service template, the word type corresponding to each non-key structure, the relative sequence of each non-key structure and each non-key word dictionary;
and if so, determining the service template as a target service template matched with the structured statement.
Further optionally, in the interaction processing apparatus of this embodiment, the obtaining module 11 is specifically configured to:
according to the structured sentence obtained by the processing of the analysis processing unit 102, each non-key structure in the service template, and the part of speech corresponding to each non-key structure, and the relative sequence of each non-key structure, and according to the sequence of each non-key word in the structured sentence from front to back, whether a non-key structure which is consistent with the part of speech of each non-key word in the structured sentence and is matched with the part of speech of each non-key word in the service template in position is judged;
if yes, judging whether each non-key word belongs to a non-key word in a non-key dictionary corresponding to the matched non-key structure;
and if so, determining that each non-key word in the structured statement is matched with each corresponding non-key structure in the service template.
Further optionally, as shown in fig. 3, the interactive processing device of this embodiment further includes:
the building module 13 builds a plurality of service templates according to a preset configuration.
Correspondingly, the obtaining module 11 is configured to obtain, from the structured statement processed by the analysis processing unit 102, a target service template matching the structured statement from a plurality of service templates pre-established by the establishing module 13.
The implementation principle and technical effect of the interactive processing device in this embodiment that uses the modules to implement the interactive processing are the same as those of the related method embodiment, and details of the related method embodiment may be referred to and are not repeated herein.
FIG. 4 is a block diagram of an embodiment of a computer device of the present invention. As shown in fig. 4, the computer device of the present embodiment includes: one or more processors 30, and a memory 40, the memory 40 being used for storing one or more programs, when the one or more programs stored in the memory 40 are executed by the one or more processors 30, the one or more processors 30 are enabled to implement the interaction processing method of the embodiment shown in fig. 1 above. The embodiment shown in fig. 4 is exemplified by including a plurality of processors 30.
For example, fig. 5 is an exemplary diagram of a computer device provided by the present invention. FIG. 5 illustrates a block diagram of an exemplary computer device 12a suitable for use in implementing embodiments of the present invention. The computer device 12a shown in fig. 5 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present invention.
As shown in FIG. 5, computer device 12a is in the form of a general purpose computing device. The components of computer device 12a may include, but are not limited to: one or more processors 16a, a system memory 28a, and a bus 18a that connects the various system components (including the system memory 28a and the processors 16 a).
Bus 18a represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12a typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12a and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28a may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30a and/or cache memory 32 a. Computer device 12a may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34a may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18a by one or more data media interfaces. System memory 28a may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of the various embodiments of the invention described above in fig. 1-3.
A program/utility 40a having a set (at least one) of program modules 42a may be stored, for example, in system memory 28a, such program modules 42a including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. Program modules 42a generally perform the functions and/or methodologies described above in connection with the various embodiments of fig. 1-3 of the present invention.
Computer device 12a may also communicate with one or more external devices 14a (e.g., keyboard, pointing device, display 24a, etc.), with one or more devices that enable a user to interact with computer device 12a, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12a to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22 a. Also, computer device 12a may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) through network adapter 20 a. As shown, network adapter 20a communicates with the other modules of computer device 12a via bus 18 a. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12a, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 16a executes various functional applications and data processing by executing programs stored in the system memory 28a, for example, to implement the interactive processing method shown in the above-described embodiment.
The present invention also provides a computer-readable medium on which a computer program is stored, which when executed by a processor implements the interaction processing method as shown in the above embodiments.
The computer-readable media of this embodiment may include RAM30a, and/or cache memory 32a, and/or storage system 34a in system memory 28a in the embodiment illustrated in fig. 5 described above.
With the development of technology, the propagation path of computer programs is no longer limited to tangible media, and the computer programs can be directly downloaded from a network or acquired by other methods. Accordingly, the computer-readable medium in the present embodiment may include not only tangible media but also intangible media.
The computer-readable medium of the present embodiments may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (18)

1. An interaction processing method, characterized in that the method comprises:
analyzing a Query statement of a user to obtain a corresponding structured statement; the structured statement comprises at least one word with a sequential relationship and the part of speech type of each word; the word type comprises modifiers, subjects, predicates, objects or words of moods;
according to the structured statement, acquiring a target service template matched with the structured statement from a plurality of service templates which are established in advance; each service template comprises at least one key structure with a sequential relationship, and a word type corresponding to each key structure is recorded, each key structure corresponds to a keyword dictionary, and each keyword dictionary comprises a plurality of keywords capable of being filled in the corresponding key structure position;
and responding according to the target service template to realize interaction.
2. The method of claim 1, wherein analyzing the Query statement of the user to obtain a corresponding structured statement specifically comprises:
carrying out voice recognition on the Query sentence in the voice form of the user to obtain a corresponding text sentence;
and analyzing the text sentences according to the grammatical structure of the text sentences to obtain the structured sentences.
3. The method according to claim 1, wherein obtaining, according to the structured statement, a target service template matching the structured statement from a plurality of service templates established in advance includes:
and acquiring the target service template matched with the structured statement from the plurality of service templates according to the structured statement, each key structure included in each service template, the word type corresponding to each key structure, the relative sequence of each key structure and each keyword dictionary.
4. The method according to claim 3, wherein obtaining the target service template matching the structured sentence from the plurality of service templates according to the structured sentence, the key structures included in each of the service templates, the word types corresponding to the key structures, the relative order of the key structures, and the keyword dictionaries comprises:
for each service template, judging whether the number of at least one word contained in the structured statement is consistent with the number of at least one key structure contained in the service template;
if the key words in the structured sentence are consistent with the word types corresponding to the key structures at the corresponding positions in the service template, sequentially comparing whether the key words in the structured sentence are consistent with the word types corresponding to the key structures at the corresponding positions in the service template or not according to the sequence and the relative sequence of the key structures in the service template and the word types corresponding to the key structures in the structured sentence;
if yes, further judging whether each word in the structured sentence belongs to a word in the keyword dictionary at a corresponding position in the service template according to each word in the structured sentence and each keyword dictionary in the service template;
and if so, determining the service template as the target service template matched with the structured statement.
5. The method according to any of claims 1-4, wherein each of the service templates further comprises at least one non-key structure, and records a word type corresponding to each of the non-key structures, each of the non-key structures corresponds to a non-key word dictionary, and the non-key word dictionary comprises a plurality of non-key words capable of being filled into the corresponding non-key structures; arranging each of the critical structures and each of the non-critical structures in the service template according to a predetermined order;
according to the structured statement, acquiring a target service template matched with the structured statement from a plurality of service templates which are established in advance, wherein the method specifically comprises the following steps:
and acquiring the target service template matched with the structured statement from the plurality of service templates according to the structured statement, each key structure, each non-key structure, the relative sequence of each key structure and each non-key structure, each keyword dictionary and each non-keyword dictionary.
6. The method according to claim 5, wherein the obtaining the target service template matching the structured sentence from the plurality of service templates according to the structured sentence, each of the key structures included in each of the service templates, each of the non-key structures, a relative order of each of the key structures and each of the non-key structures, a word type corresponding to each of the key structures and each of the non-key structures, each of the keyword dictionaries, and each of the non-keyword dictionaries comprises:
for each service template, judging whether a keyword matched with each key structure of the service template exists in the structured sentence or not according to the structured sentence, each key structure in the service template, the relative sequence of each key structure, the word type corresponding to each key structure and each keyword dictionary;
if yes, judging whether each non-keyword in the structured statement is matched with each corresponding non-key structure in the service template or not according to the structured statement, each non-key structure in the service template, the word type corresponding to each non-key structure, the relative sequence of each non-key structure and each non-keyword dictionary;
and if so, determining the service template as the target service template matched with the structured statement.
7. The method according to claim 6, wherein determining whether each non-keyword in the structured sentence matches each non-key structure of the service template according to the structured sentence, each non-key structure in the service template, a word type corresponding to each non-key structure, a relative order of each non-key structure, and each non-keyword dictionary, specifically comprises:
judging whether the service template has the non-key structures which are consistent with the part-of-speech of each non-keyword in the structured statement and are matched in position according to the structured statement, each non-key structure in the service template and the part-of-speech corresponding to each non-key structure in the service template and the relative sequence of each non-key structure and the sequence of each non-keyword in the structured statement from front to back;
if yes, judging whether each non-keyword belongs to the non-key words in the non-key dictionary corresponding to the matched non-key structure;
and if so, determining that each non-keyword in the structured statement is matched with each corresponding non-key structure in the service template.
8. The method according to any of claims 3-4 and 6-7, wherein before obtaining a target service template matching the structured statement from a plurality of service templates established in advance according to the structured statement, the method further comprises:
and establishing the plurality of service templates according to preset configuration.
9. An interaction processing apparatus, comprising:
the analysis module is used for analyzing the Query statement of the user to obtain a corresponding structured statement; the structured statement comprises at least one word with a sequential relationship and the part of speech type of each word; the word type comprises modifiers, subjects, predicates, objects or words of moods;
the acquisition module is used for acquiring a target service template matched with the structured statement from a plurality of pre-established service templates according to the structured statement; each service template comprises at least one key structure with a sequential relationship, and a word type corresponding to each key structure is recorded, each key structure corresponds to a keyword dictionary, and each keyword dictionary comprises a plurality of keywords capable of being filled in the corresponding key structure position;
and the response module is used for responding according to the target service template to realize interaction.
10. The apparatus according to claim 9, wherein the analysis module specifically comprises:
the voice recognition unit is used for carrying out voice recognition on the Query sentence in the voice form of the user to obtain a corresponding text sentence;
and the analysis processing unit is used for analyzing the text sentences according to the grammatical structures of the text sentences to obtain the structured sentences.
11. The apparatus of claim 9, wherein the obtaining module is specifically configured to: and acquiring the target service template matched with the structured statement from the plurality of service templates according to the structured statement, each key structure included in each service template, the word type corresponding to each key structure, the relative sequence of each key structure and each keyword dictionary.
12. The apparatus of claim 11, wherein the obtaining module is specifically configured to:
for each service template, judging whether the number of at least one word contained in the structured statement is consistent with the number of at least one key structure contained in the service template;
if the key words in the structured sentence are consistent with the word types corresponding to the key structures at the corresponding positions in the service template, sequentially comparing whether the key words in the structured sentence are consistent with the word types corresponding to the key structures at the corresponding positions in the service template or not according to the sequence and the relative sequence of the key structures in the service template and the word types corresponding to the key structures in the structured sentence;
if yes, further judging whether each word in the structured sentence belongs to a word in the keyword dictionary at a corresponding position in the service template according to each word in the structured sentence and each keyword dictionary in the service template;
and if so, determining the service template as the target service template matched with the structured statement.
13. The apparatus according to any of claims 9-12, wherein each of the service templates further comprises at least one non-key structure, and records a word type corresponding to each of the non-key structures, each of the non-key structures corresponds to a non-key word dictionary, and the non-key word dictionary comprises a plurality of non-key words capable of being filled into the corresponding non-key structures; arranging each of the critical structures and each of the non-critical structures in the service template according to a predetermined order;
the acquisition module is specifically configured to:
and acquiring the target service template matched with the structured statement from the plurality of service templates according to the structured statement, each key structure, each non-key structure, the relative sequence of each key structure and each non-key structure, each keyword dictionary and each non-keyword dictionary.
14. The apparatus of claim 13, wherein the obtaining module is specifically configured to:
for each service template, judging whether a keyword matched with each key structure of the service template exists in the structured sentence or not according to the structured sentence, each key structure in the service template, the relative sequence of each key structure, the word type corresponding to each key structure and each keyword dictionary;
if yes, judging whether each non-keyword in the structured statement is matched with each corresponding non-key structure in the service template or not according to the structured statement, each non-key structure in the service template, the word type corresponding to each non-key structure, the relative sequence of each non-key structure and each non-keyword dictionary;
and if so, determining the service template as the target service template matched with the structured statement.
15. The apparatus of claim 14, wherein the obtaining module is specifically configured to:
judging whether the service template has the non-key structures which are consistent with the part-of-speech of each non-keyword in the structured statement and are matched in position according to the structured statement, each non-key structure in the service template and the part-of-speech corresponding to each non-key structure in the service template and the relative sequence of each non-key structure and the sequence of each non-keyword in the structured statement from front to back;
if yes, judging whether each non-keyword belongs to the non-key words in the non-key dictionary corresponding to the matched non-key structure;
and if so, determining that each non-keyword in the structured statement is matched with each corresponding non-key structure in the service template.
16. The apparatus of any of claims 11-12 and 14-15, further comprising:
and the establishing module is used for establishing the plurality of service templates according to preset configuration.
17. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
18. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN201810565042.8A 2018-06-04 2018-06-04 Interaction processing method and device, computer equipment and readable medium Active CN108984600B (en)

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 CN108984600A (en) 2018-12-11
CN108984600B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400439A (en) * 2020-02-26 2020-07-10 平安科技(深圳)有限公司 Network bad data monitoring method and device and storage medium
CN112632973A (en) * 2020-12-31 2021-04-09 中国农业银行股份有限公司 Text processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN108984600A (en) 2018-12-11

Similar Documents

Publication Publication Date Title
US9805718B2 (en) Clarifying natural language input using targeted questions
CN107220232B (en) Keyword extraction method and device based on artificial intelligence, equipment and readable medium
CN110069608B (en) Voice interaction method, device, equipment and computer storage medium
CN107221328B (en) Method and device for positioning modification source, computer equipment and readable medium
CN108549656B (en) Statement analysis method and device, computer equipment and readable medium
US10417240B2 (en) Identifying potential patient candidates for clinical trials
JP7323504B2 (en) METHOD, APPARATUS, ELECTRONIC DEVICE, AND COMPUTER-READABLE STORAGE MEDIUM FOR GENERATION OF MEETINGS
CN110647614A (en) Intelligent question and answer method, device, medium and electronic equipment
US11157699B2 (en) Interactive method and apparatus based on test-type application
US10565982B2 (en) Training data optimization in a service computing system for voice enablement of applications
WO2018057427A1 (en) Syntactic re-ranking of potential transcriptions during automatic speech recognition
US10553203B2 (en) Training data optimization for voice enablement of applications
US10740570B2 (en) Contextual analogy representation
US9760913B1 (en) Real time usability feedback with sentiment analysis
CN108595412B (en) Error correction processing method and device, computer equipment and readable medium
CN108984600B (en) Interaction processing method and device, computer equipment and readable medium
WO2020233381A1 (en) Speech recognition-based service request method and apparatus, and computer device
CN112562684A (en) Voice recognition method and device and electronic equipment
US20220188525A1 (en) Dynamic, real-time collaboration enhancement
US11017015B2 (en) System for creating interactive media and method of operating the same
US20180314683A1 (en) Method and device for processing natural language
WO2023103943A1 (en) Image processing method and apparatus, and electronic device
Morita et al. Superregular grammars do not provide additional explanatory power but allow for a compact analysis of animal song
US10678845B2 (en) Juxtaposing contextually similar cross-generation images
CN110276001B (en) Checking page identification method and device, computing equipment and medium

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

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.

TR01 Transfer of patent right