CN110888969A - Dialog response method and device - Google Patents

Dialog response method and device Download PDF

Info

Publication number
CN110888969A
CN110888969A CN201911179760.2A CN201911179760A CN110888969A CN 110888969 A CN110888969 A CN 110888969A CN 201911179760 A CN201911179760 A CN 201911179760A CN 110888969 A CN110888969 A CN 110888969A
Authority
CN
China
Prior art keywords
predicate
intention
dialog
dialog text
formula
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.)
Withdrawn
Application number
CN201911179760.2A
Other languages
Chinese (zh)
Inventor
刘璐
朱越
张宝峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911179760.2A priority Critical patent/CN110888969A/en
Publication of CN110888969A publication Critical patent/CN110888969A/en
Priority to PCT/CN2020/124160 priority patent/WO2021103902A1/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems

Landscapes

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

Abstract

The application provides a dialogue response method and a dialogue response device, relates to the field of Artificial Intelligence (AI) of a terminal, and particularly relates to the field of voice recognition. The method comprises the following steps: acquiring a dialog text to be identified; converting the dialog text into a predicate formula according to a preset predicate logic rule, wherein the predicate formula is used for describing the semantics of the dialog text; determining at least one intention described in the dialog text according to the predicate formula; and executing the dialogue operation indicated by the at least one intention.

Description

Dialog response method and device
Technical Field
The application relates to the field of Artificial Intelligence (AI) of a terminal, in particular to the field of voice recognition, and relates to a dialog response method and a device.
Background
The man-machine conversation refers to a process in which a person makes a conversation with a machine through human language (i.e., natural language), and is an important research direction in the field of AI. The task-based multi-turn dialogue aims at realizing task driving. The terminal device drives corresponding tasks by recognizing the user intention (i.e. the target the user wants to realize by the machine, such as inquiring weather, playing music, booking tickets, etc.) in the natural language during the process of responding to the conversation, so as to realize the target the user wants to realize.
At present, when a terminal device responds to a conversation, recognition modes such as a neural network, a clustering algorithm, a classification algorithm, a rule system and the like are often adopted to recognize the intention of a user. When the recognition methods are adopted, a recognition model needs to be trained based on a large amount of text corpora, and then the recognition model is used for recognizing the intention of the user. However, the recognition effect of the recognition model is limited by the size, category, language phenomenon and other factors of the corpus, so that the language phenomenon covered by the trained recognition mode is limited, and the recognition model often cannot accurately recognize the intention of the user along with the change of the language environment or the difference of language habits. Thereby causing the terminal device to fail to drive or not to accurately drive the task indicated by the user's true intention, resulting in a failure of the dialog response.
Disclosure of Invention
The embodiment of the application provides a dialog response method and device, and the problem of dialog response failure caused by low intention recognition accuracy in a man-machine dialog process can be solved.
In a first aspect, the present application provides a dialog response method, including: acquiring a dialog text to be identified;
converting the dialog text into a predicate formula according to a preset predicate logic rule, wherein the predicate formula is used for describing the semantics of the dialog text; determining at least one intention described in the dialog text according to the predicate formula; and executing the dialogue operation indicated by the at least one intention.
By adopting the method for providing the dialog response, the terminal equipment converts the dialog text into the predicate formula, describes the semantics of the dialog text through the predicate formula, and further extracts the intention described in the dialog text from the predicate formula. The predicate formula can accurately describe the semantics of the dialog text and accurately describe the intention in the dialog text and the complex relationship of various intentions. Therefore, the intention is extracted from the predicate formula, the accuracy of intention identification can be improved, and the failure rate of dialogue response is reduced.
Optionally, the obtaining the text to be recognized includes: receiving voice input by a user; converting the speech into the dialog text.
Optionally, the converting the dialog text into a predicate formula according to a preset predicate logic rule includes: extracting logic connection words from the dialog text according to the predicate logic rule; decomposing the dialog text into at least two atomic propositions according to the extracted logical connecting words; determining individual words and predicates of each atomic proposition; and generating the predicate formula according to the logic join words, the individual words of each atom proposition and the predicate.
Optionally, if the atom proposition further includes a quantifier of the individual word, the generating the predicate formula according to the logic conjunction word, the individual word of each atom proposition and the predicate includes: and generating the predicate formula according to the logic join words, the individual words of each atom proposition, the predicates and the quantifiers.
Optionally, the determining at least one intention described in the dialog text according to the predicate formula includes: and generating at least one intention slot position according to the predicate formula, and extracting intention information from the predicate formula to fill the slot position of the at least one intention slot position to obtain the at least one intention.
Optionally, when at least two intentions are generated, the performing of the dialog operation indicated by the at least one intention includes: determining an execution relationship between the at least two intents according to the predicate formula; and executing the dialogue operation indicated by the at least two intentions according to the execution relation between the at least two intentions.
Optionally, the execution relationship between the at least two intentions includes a true and false discriminant combination of the at least two intentions.
In a third aspect, the present application provides a dialog response device, comprising:
the acquiring unit is used for acquiring a dialog text to be identified;
the recognition unit is used for converting the dialog text into a predicate formula according to a preset predicate logic rule, and determining at least one intention described in the dialog text according to the predicate formula, wherein the predicate formula is used for describing the semantics of the dialog text;
a response unit, configured to perform a dialog operation indicated by the at least one intention.
In a fourth aspect, the present application provides a terminal device, comprising: comprising a memory for storing a computer program and a processor for retrieving and running the computer program from the memory so that the terminal device performs the method of the first aspect or any alternative of the first aspect.
In a fifth aspect, the present application provides a computer storage medium storing a program, wherein the program is configured to implement the method of the first aspect or any alternative form of the first aspect.
The advantageous effects of the above second to fifth aspects can be referred to the advantageous effects of the above first aspect, and are not described here.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a terminal device to which a dialog response method according to an embodiment of the present application is applied;
fig. 2 is a schematic flowchart illustrating a dialog response method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a dialog response device according to another embodiment of the present application.
Detailed Description
In a man-machine conversation aiming at realizing task driving, when a terminal device responds to a conversation, the intention of a user is often required to be recognized from natural language input by the user so as to drive a corresponding task, thereby realizing the aim that the user wants to realize. At present, algorithms such as a neural network, a clustering algorithm, a classification algorithm, a rule system and the like are adopted in a common recognition method, a recognition model is trained based on a large amount of text corpora, and then the recognition model is used for recognizing the intention of a user. However, due to the limitation of corpus, the language phenomena covered by the recognition model are limited, and the intention correction cannot be performed or a plurality of intentions cannot be recognized accurately.
For example, the user's dialog text is "find city 1, no, city 2's weather" and the user's true intent is "find city 2's weather". Based on the existing recognition model, the intention recognized by the terminal device may be the wrong intention of checking the weather of city 1. Then, the terminal device performs a dialogue operation of finding weather according to the wrong intention, and the information fed back to the user is a wrong conclusion, for example, "city 1: 12 days on a week, 08 and month, the west wind and west-north wind of more clouds, the lowest temperature of 27 ℃ and the highest temperature of 34 ℃. Alternatively, based on the existing recognition model, the intention recognized by the terminal device may be an incorrect intention of "looking up" the weather of city 1, city 2 ", or both. Then, when the terminal device executes the dialogue operation of weather search according to the wrong intention, it finds that there is no city 1, city 2, and the terminal device feeds back information that the dialogue cannot be responded to the user, for example, "i know weather conditions of most cities at home and abroad, but this place is temporarily too mystery la |)! ".
To address this problem, the present application provides a dialog response method that converts dialog text into a Predicate formula using Predicate logic (Predicate logic), and then extracts an intention described in the dialog text from the Predicate formula. Due to the fact that the predicate formula has strong capability of expressing semantics, the intention in the dialog text and the complex relation of various intentions can be accurately described. Therefore, the intention is extracted from the predicate formula, the accuracy of intention identification can be improved, and the failure rate of dialogue response is reduced.
Predicate logic refers to dividing words in natural language into individual words, predicates and logical conjunctions.
The individual word is a word representing a thought object in a proposition and represents a concrete or abstract object which independently exists. Corresponding to nouns in natural language. Specific and definite individual words in the individual words are called individual frequent items; abstract, uncertain individual words are called individual variants.
Predicates are words describing the properties of individual words or the relationships among individual words, and can be divided into unitary predicates (which can also be called first-order predicates) and multi-order predicates (multi-order predicates) according to the data of the individual words contained in the text. If only one individual word x exists in the text, the predicate P is a unitary predicate and represents the property of the individual word x. Corresponding to verbs, adjectives, etc. in natural language. Which may be expressed as p (x) in the predicate equation.
If the text contains a plurality of individualized words x1, x2, … … and xn, the word Q describing the relationship among x1, x2, … … and xn is a multi-element predicate. Can be expressed as Q (x1, x2, … …, xn) in the predicate equation.
Quantifier includes presence quantifiers and full quantifiers. In the predicate formula, there is an inverted letter E (Exist) for quantifier, i.e., a
Figure BDA0002290936320000031
And (4) showing. The term full-measure is used to describe the property that an individual word has, which is generally a noun. The full-scale word is defined by the reverse A (all), namely
Figure BDA0002290936320000032
And (4) showing. For example, there is an individual word x, with property A (x), that can be expressed in a predicate formula as
Figure BDA0002290936320000035
A (x). All the individual words x have the property A (x), and can be expressed as
Figure BDA0002290936320000036
A(x)。
Logical conjunctions include conjunctions that mean negative, conjunctive (meaning "and" in natural language "), disjunctive (meaning" or "in natural language), implied (meaning" if … … in natural language), equivalent (meaning "if and only if" in natural language), and the like, respectively. In the predicate formula, a negative conjunction is expressed as
Figure BDA0002290936320000037
The conjunction word is represented as ' A ', the extraction conjunction word is represented as ' V ', the implication conjunction word is represented as ' → ', the equivalence conjunction word is represented as ' E
Figure BDA0002290936320000038
The predicate formula is an expression mode for expressing text semantics by adopting symbols, and can accurately describe the text semantics.
The predicate formula is symbolic description, and the description is difficult and can accurately describe the meaning.
The following describes an exemplary dialog response method provided by the present application with reference to specific embodiments.
In the description of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or illustrations. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
Unless otherwise indicated, "/" herein generally indicates that the former and latter associated objects are in an "or" relationship, e.g., a/B may represent a or B. The term "and/or" is merely an associative relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the present application, "a plurality" means two or more.
The dialog response method provided by the application is applied to terminal equipment, and specifically can be an Artificial Intelligence (AI) terminal. In this embodiment of the application, the AI terminal may be a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), or another terminal device having an AI, and the specific type of the terminal device is not limited in this embodiment of the application.
Referring to fig. 1, a block diagram of a partial structure of a terminal device provided in an embodiment of the present application includes: processor 100, memory 110, communication module 120, input module 130, display module 140, audio module 150, and the like. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 1 is not intended to be limiting of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Among other things, processor 100 may include at least one of the following types: a Central Processing Unit (CPU), the Processor 100 may also be other general purpose processors, Digital Signal Processors (DSP), Application Specific Integrated Circuits (ASIC), Field-Programmable Gate arrays (FPGA) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 110 may be used to store software programs and modules, and the processor 100 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 110. The memory 110 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program (such as a human-machine conversation, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 110 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The communication module 120 is used for receiving and transmitting signals under the control of the processor 100. The communication module 120 may include a Radio Frequency (RF) circuit. Typically, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, an LNA (low noise amplifier), a duplexer, and the like. In addition, the RF circuitry may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (global system for mobile communications), GPRS (general packet radio service), CDMA (code division multiple access), WCDMA (wideband code division multiple access), LTE (long term evolution), email, SMS (short messaging service), short-range communication technologies (e.g., wireless fidelity (WiFi) communication), etc.
The input module 130 may be used to receive input numbers, characters, voice information, and generate key signal inputs and voice signal inputs related to user settings and function control of the terminal device. Specifically, the input module 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also referred to as a touch screen, may collect touch operations of a user on or near the touch panel 131 (e.g., operations of the user on or near the touch panel 131 using any suitable object or accessory such as a finger or a stylus pen), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 131 may include two parts, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 100, and can receive and execute commands sent by the processor 100. In addition, the touch panel 131 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 131, the input module 130 may include other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display module 140 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The display module 140 may include a display panel 141, and optionally, the display panel 141 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 131 can cover the display panel 141, and when the touch panel 131 detects a touch operation on or near the touch panel 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 100 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although the touch panel 131 and the display panel 141 are shown as two separate components in fig. 1 to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 131 and the display panel 141 may be integrated to implement the input and output functions of the mobile phone.
The audio module 150 may include an audio circuit 150, a speaker 151, a microphone 152, etc., which may provide an audio interface between a user and a terminal device. The audio circuit 150 may transmit the electrical signal converted from the received audio data to the speaker 151, and convert the electrical signal into a sound signal for output by the speaker 151; on the other hand, the microphone 152 converts a collected sound signal (e.g., voice input by a user) into an electric signal, converts the electric signal into audio data after being received by the audio circuit 150, and outputs the audio data to the processor 100 for processing.
In addition, although not shown, the terminal device may further include a power module, a camera, a sensor, and the like, which are not described herein again.
Fig. 3 shows a schematic flow chart of the dialog response method provided by the present application, which may be applied to the terminal device described above by way of example and not limitation. Referring to fig. 3, the dialogue response method includes:
s201, the terminal device obtains the dialog text to be identified.
When the terminal equipment carries out man-machine conversation with a user, if the terminal equipment detects that the text is input by the user, the terminal equipment determines that the text is the conversation text to be identified. If the voice input by the user is detected, the terminal equipment converts the voice into a dialog text after receiving the voice input by the user.
And S202, the terminal equipment converts the dialog text into a predicate formula according to a preset predicate logic rule.
The predicate logic rule is a conversion rule set by combining the predicate logic based on the requirements in practical application. For example, predicate logic rules may include individual words, predicates, quantifiers, partitioning rules for logical conjuncts, logical conjunct usage rules, and the like.
Illustratively, assume that the preset predicate logic rule includes an atom topic preceding a negation conjunction as a negated atom topic. When the predicate formula is converted, if a negative conjunction word appears, the atom topic before the negative conjunction word is determined as a negative atom topic. For example, dialog text 1 is "find city 1, no, city 2's weather". Dialog text 1 includes two atomic propositions, "weather for looking up city 1" and "weather for looking up city 2", respectively. The atomic proposition before the negative conjunction "no" is "look into the weather of city 1". Then "find the weather of city 1" is a negated proposition in the predicate formula.
It is assumed that the preset predicate logic rule includes that when two nouns are connected through 'of', the preceding noun of 'is an individual word, and the following noun of' is a quantifier. When the method is converted into a predicate formula, if two nouns connected by 'the' are present, the noun before 'is determined to be an individual word, and the noun after' is determined to be a quantifier. For example, the dialog text 2 is "play song 1 of singer 1", where singer 1 and song 1 are two nouns, then in the predicate formula, singer 1 is an individual word and song 1 is an quantifier.
For example, in the process of converting the dialog text into the predicate formula, the terminal device may extract the logical conjunction word from the dialog text according to the predicate logic rule. For example, with regard to the above-described dialog text 1, the terminal device first extracts the logical conjunction in the dialog text 1, and determines that only one logical conjunction "no" in the dialog text 1 indicates negation.
The dialog text is then decomposed into at least two atomic propositions according to the extracted logical conjunctions.
In this application, atomic propositions refer to statements that have a true-false meaning and cannot be broken down into simpler statements.
Illustratively, for dialog text 1, at least two atomic propositions are included in dialog text 1, since only one logical conjunction "no" is extracted, which represents negation. Then, after decomposition, the terminal device decomposes "weather for looking up city 1" and "weather for looking up city 2" from dialog text 1.
The terminal device then determines individual words and predicates for each atomic proposition.
For example, in the atomic proposition "weather for looking up city 1" and "weather for looking up city 2", the individual words are city 1 and city 2, and the predicate is weather.
And finally, the terminal equipment generates a predicate formula according to the logic conjunction words, the individual words of each atom proposition and the predicates.
For example, the predicate formula of dialog text 1 generated by the terminal device is:
Figure BDA0002290936320000065
look up weather (city 1) ∪ looks up weather (city 2).
Optionally, if the terminal device determines that the atomic proposition further includes quantifier of the individual word. For example, the terminal device determines that in the atomic proposition "weather of looking up city 1" and "weather of looking up city 2", the individual words are city 1 and city 2, the predicate is looking up, and the quantifier is weather.
Then, when the terminal device generates the predicate formula, the predicate formula is generated according to the logical join word, the individual word of each atomic proposition, the predicate, and the quantifier. For example, the predicate formula of dialog text 1 generated by the terminal device is:
Figure BDA0002290936320000066
checking (
Figure BDA0002290936320000064
City 1A weather) ∪, (c)
Figure BDA0002290936320000063
City 2A weather).
Of course, if the terminal device does not extract the logical conjunction word in the dialog text, it indicates that the dialog text only contains one atomic proposition. The terminal equipment can directly determine the individual words, predicates and quantifiers of the atom proposition according to the preset predicate logic rule and generate a predicate formula.
In the embodiment of the application, the dialog text is expressed through the predicate formula, and the semantics of the dialog text can be accurately expressed.
S203, the terminal equipment determines at least one intention described in the dialog text according to the predicate formula.
Illustratively, dialog text 1, while having two atomic propositions, is apparently based on a predicate formula generated by the terminal device
Figure BDA0002290936320000067
Looking up weather (city 1) ∪ looking up weather (city 2) can determine that one intent is described in dialog text 1, querying the weather for city 2.
For example, the terminal device may generate at least one intention slot according to a predicate formula, and extract intention information from the predicate formula to fill the slot in the at least one intention slot (slot) to obtain at least one intention.
Wherein the format of the intent slot matches the dialog operation corresponding to the intent.
For example, the terminal device is according to
Figure BDA0002290936320000068
Look-up weather (city 1) ∪ look-up weather (city 2) determines that an intent slot is generated that matches the look-up weather dialogue operation.
For example, the intended slot format is:
Figure BDA0002290936320000061
the terminal device extracts intention information from the predicate formula as a city 1, fills the city 1 into the intention slot, and obtains an intention which can be expressed as:
Figure BDA0002290936320000062
and S204, executing the dialogue operation indicated by the at least one intention.
Wherein the dialog operation includes driving a service indicated by the at least one intent and responding to the dialog.
Illustratively, the terminal device determines the intention of the dialog text 1 to be:
Figure BDA0002290936320000071
the terminal device drives the weather query service to query the weather of the city 1, and responds to a conversation based on a query result of '12 days on Monday 08 month, 12 days on Tuesday, West-west wind, 26-degree minimum temperature and 33-degree maximum temperature'. That is, the dialog interface displays "city 1: 12 days in 08 months of Monday, the west wind of more clouds changes to the northwest wind, the lowest temperature is 26 ℃, and the highest temperature is 33 ℃. Or direct voice broadcast "city 1: 12 days in 08 months of Monday, the west wind of more clouds changes to the northwest wind, the lowest temperature is 26 ℃, and the highest temperature is 33 ℃.
Optionally, when generating the at least two intentions, the terminal device may determine an execution relationship between the at least two intentions according to a predicate formula when performing a dialog operation. And then executing the dialogue operation indicated by the at least two intentions according to the execution relation between the at least two intentions.
Wherein the execution relation between the at least two intentions comprises a true and false discriminant combination of the at least two intentions.
For example, it is assumed that the terminal device receives a voice input by the user, and after converting the voice, the obtained dialog text 3 is "listen to song 2" of the singer 2, if not, song 3 ", and if not, song 4".
The terminal device executes the above step 302 to convert the dialog text 3 into a predicate formula according to the predicate logic rule. That is, the logical conjunction words in the extracted dialog text 3 are extracted as two logical conjunction words, which are null words and null words, respectively. The dialog text 3 is then broken down into three atomic propositions, "Song 2" for the listening singer 2, "Song 3" when "Song 2" without the listening singer 2, "Song 4" when "Song 3" is not available.
The individual words of the atomic proposition ' listen to song 2 of singer 2 ' are singers 2, the predicate is listening, and the quantifier is song 2 '.
When the atomic proposition is song 2 without singer 2, the individual word of song 3 is song 3, and the predicate is play.
The individual word for placing song 4 when the atomic proposition is ' Song 3 ' is absent ' is song 4, and the predicate is ' Place '.
And a predicate formula generated according to the determined logical conjunction words, predicates, individual words and quantifier is as follows:
PLAY(
Figure BDA0002290936320000074
singer 2A song 2V
Figure BDA0002290936320000073
Singer 2A Song 2 (the term "Song 3") PLAY
Figure BDA0002290936320000072
"Song 3 ═ PLAY (Song 4)
Wherein "!
Figure BDA0002290936320000075
"indicates absence," and "indicates next execution," PLAY "indicates predicate listen and PLAY.
It can be seen that the predicate formula of dialog text 3 describes the semantics of dialog text 3 very accurately.
After the terminal device generates the predicate formula of the dialog text 3, the above step 303 is executed, and at least one intention described in the dialog text 3 is determined according to the predicate formula.
The terminal equipment determines that 3 intentions are included according to the predicate formula, and therefore the terminal equipment sequentially generates three intention slots according to the intentions in the predicate formula. The format of the three intent slots matches the dialog (playing music) indicated by the three intentions. For example: the three intended slots are arranged as follows:
slot: { song: (ii) a Singer: }
Slot: { song: (ii) a Singer: }
Slot: { song: (ii) a Singer: }
After the terminal equipment extracts intention information from the predicate formula and fills the three intention slots in sequence, the obtained three intentions are respectively expressed as:
slot: { song: song 2; singer: singer 2}
Slot: { song: song 3; singer: }
Slot: { song: song 4; singer: }
The terminal equipment determines the execution relation among the three intentions according to a predicate formula, wherein the execution relation comprises 4 true and false distinguishing combinations, which are respectively:
and the combination of true and false indicates that when the song 2 of the player singer 2 is a true proposition, the played song 3 and the played song 4 are false propositions. That is, when the terminal device performs a dialogue operation, if song 2 of the singer 2 can be played, song 3 and song 4 are not played.
A false-true-false combination, which indicates that when song 2 of the player singer 2 is a false proposition and song 3 is a true proposition, song 4 is played as a false proposition. That is, when the terminal device performs a dialogue operation, if there is no song 2 of the singer 2 but there is song 3, song 3 is played, and song 4 is not played.
The combination of false and false indicates that song 2 playing singer 2 and song 3 playing singer are false propositions, and song 4 playing singer is true proposition. That is, when the terminal device performs a dialogue operation, if there are no song 2 and song 3 of the singer 2 but there is song 4, song 4 is played.
The combination of false and false indicates that song 2, song 3 and song 4 of the player singer 2 are false propositions. That is, when the terminal device performs the dialogue operation, if there is no song 2, song 3, or song 4 of the singer 2, it is not played.
The terminal device can execute the responsive dialog operation according to the determined execution relation. Of course, if the false and false combination is executed, when the terminal device responds to the dialog, the prompt such as "song 2, song 3, and song 4 of the singer 2 are not found, and whether other songs are played" may be directly displayed or voice broadcast on the dialog interface.
The sequence numbers of the steps in the foregoing embodiments do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic of the process, and should not constitute any limitation on the implementation process of the embodiments of the present application.
In summary, based on the dialog response method provided by the application, the terminal device converts the dialog text into the predicate formula, describes the semantics of the dialog text through the predicate formula, and further extracts the intention described in the dialog text from the predicate formula. The predicate formula can accurately describe the semantics of the dialog text and accurately describe the intention in the dialog text and the complex relationship of various intentions. Therefore, the intention is extracted from the predicate formula, the accuracy of intention identification can be improved, and the failure rate of dialogue response is reduced.
Fig. 3 shows a block diagram of a dialog response device provided in the embodiment of the present application, which corresponds to the dialog response method described in the above embodiment, and only shows the relevant parts in the embodiment of the present application for convenience of description.
Referring to fig. 3, the dialogue response apparatus includes:
an obtaining unit 301, configured to obtain a dialog text to be recognized.
The identifying unit 302 is configured to convert the dialog text into a predicate formula according to a preset predicate logic rule, and determine at least one intention described in the dialog text according to the predicate formula, where the predicate formula is used to describe semantics of the dialog text.
A response unit 303, configured to perform a dialog operation indicated by the at least one intention.
Optionally, the acquiring unit 301 acquires a text to be recognized, including: receiving voice input by a user; converting the speech into the dialog text.
Optionally, the converting unit 302 converts the dialog text into a predicate formula according to a preset predicate logic rule, where the predicate formula includes: extracting logic connection words from the dialog text according to the predicate logic rule; decomposing the dialog text into at least two atomic propositions according to the extracted logical connecting words; determining individual words and predicates of each atomic proposition; and generating the predicate formula according to the logic join words, the individual words of each atom proposition and the predicate.
Optionally, if the identifying unit 302 determines that the atom proposition further includes a quantifier of the individual word, the identifying unit 302 generates the predicate formula according to the logical conjunction word, the individual word of each atom proposition, and the predicate, including: and generating the predicate formula according to the logic join words, the individual words of each atom proposition, the predicates and the quantifiers.
Optionally, the identifying unit 302 determines at least one intention described in the dialog text according to the predicate formula, including: and generating at least one intention slot position according to the predicate formula, and extracting intention information from the predicate formula to fill the slot position of the at least one intention slot position to obtain the at least one intention.
Optionally, when the recognition unit 302 generates at least two intentions, the response unit 303 performs a dialog operation indicated by the at least one intention, including: determining an execution relationship between the at least two intents according to the predicate formula; and executing the dialogue operation indicated by the at least two intentions according to the execution relation between the at least two intentions.
Optionally, the execution relationship between the at least two intentions includes a true and false discriminant combination of the at least two intentions.
The dialog response device provided by the application can convert the dialog text into the predicate formula, describe the semantics of the dialog text through the predicate formula, and further extract the intention described in the dialog text from the predicate formula. The predicate formula can accurately describe the semantics of the dialog text and accurately describe the intention in the dialog text and the complex relationship of various intentions. Therefore, the intention is extracted from the predicate formula, the accuracy of intention identification can be improved, and the failure rate of dialogue response is reduced.
In this embodiment of the application, the dialog response device may specifically be a terminal device, for example, the terminal device shown in fig. 1, and may also be a chip integrated in the terminal device.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above implemented by the present application may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps S301 to 304 of the embodiments of the methods described above may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a device/terminal apparatus, a recording medium, a computer Memory, a Read-Only Memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A dialog response method, comprising:
acquiring a dialog text to be identified;
converting the dialog text into a predicate formula according to a preset predicate logic rule, wherein the predicate formula is used for describing the semantics of the dialog text;
determining at least one intention described in the dialog text according to the predicate formula;
and executing the dialogue operation indicated by the at least one intention.
2. The method of claim 1, wherein the obtaining text to be recognized comprises:
receiving voice input by a user;
converting the speech into the dialog text.
3. The method of claim 1, wherein the converting the dialog text into a predicate formula according to a preset predicate logic rule comprises:
extracting logic connection words from the dialog text according to the predicate logic rule;
decomposing the dialog text into at least two atomic propositions according to the extracted logical connecting words;
determining individual words and predicates of each atomic proposition;
and generating the predicate formula according to the logic join words, the individual words of each atom proposition and the predicate.
4. The method of claim 3, wherein if the atomic proposition further includes a quantifier of the individual words, the generating the predicate formula according to the logical conjunction words, the individual words of each atomic proposition, and the predicate includes:
and generating the predicate formula according to the logic join words, the individual words of each atom proposition, the predicates and the quantifiers.
5. The method of any of claims 1-4, wherein the determining at least one intent described in the dialog text according to the predicate formula comprises:
and generating at least one intention slot position according to the predicate formula, and extracting intention information from the predicate formula to fill the slot position of the at least one intention slot position to obtain the at least one intention.
6. The method according to any one of claims 1-5, wherein when generating at least two intents, the performing the dialog operation indicated by the at least one intention comprises:
determining an execution relationship between the at least two intents according to the predicate formula;
and executing the dialogue operation indicated by the at least two intentions according to the execution relation between the at least two intentions.
7. The method of claim 6, wherein the execution relationship between the at least two intentions comprises a true and false discriminant combination of the at least two intentions.
8. A dialog response device comprising:
the acquiring unit is used for acquiring a dialog text to be identified;
the recognition unit is used for converting the dialog text into a predicate formula according to a preset predicate logic rule, and determining at least one intention described in the dialog text according to the predicate formula, wherein the predicate formula is used for describing the semantics of the dialog text;
a response unit, configured to perform a dialog operation indicated by the at least one intention.
9. A terminal device, comprising: comprising a memory for storing a computer program and a processor for retrieving and running the computer program from the memory so that the terminal device performs the method according to any of claims 1 to 7.
10. A computer storage medium storing a program for implementing the method according to any one of claims 1 to 7.
CN201911179760.2A 2019-11-27 2019-11-27 Dialog response method and device Withdrawn CN110888969A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911179760.2A CN110888969A (en) 2019-11-27 2019-11-27 Dialog response method and device
PCT/CN2020/124160 WO2021103902A1 (en) 2019-11-27 2020-10-27 Dialogue response method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911179760.2A CN110888969A (en) 2019-11-27 2019-11-27 Dialog response method and device

Publications (1)

Publication Number Publication Date
CN110888969A true CN110888969A (en) 2020-03-17

Family

ID=69748953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911179760.2A Withdrawn CN110888969A (en) 2019-11-27 2019-11-27 Dialog response method and device

Country Status (2)

Country Link
CN (1) CN110888969A (en)
WO (1) WO2021103902A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021103902A1 (en) * 2019-11-27 2021-06-03 华为技术有限公司 Dialogue response method and apparatus
CN112988993A (en) * 2021-02-19 2021-06-18 车智互联(北京)科技有限公司 Question answering method and computing device
WO2022033213A1 (en) * 2020-08-10 2022-02-17 湖北亿咖通科技有限公司 Method for processing voice request text, and computer storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180052842A1 (en) * 2016-08-16 2018-02-22 Ebay Inc. Intelligent online personal assistant with natural language understanding
CN110110053B (en) * 2018-02-01 2023-09-26 国际商业机器公司 Establishing a logical connection between an indirect utterance and a transaction
CN109858030B (en) * 2019-02-11 2020-11-06 北京邮电大学 Two-way intent slot value cross-correlation task-based dialog understanding system and method
CN110188170B (en) * 2019-05-28 2023-05-09 丁跃辉 Multi-entry medical question template device and method thereof
CN110888969A (en) * 2019-11-27 2020-03-17 华为技术有限公司 Dialog response method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021103902A1 (en) * 2019-11-27 2021-06-03 华为技术有限公司 Dialogue response method and apparatus
WO2022033213A1 (en) * 2020-08-10 2022-02-17 湖北亿咖通科技有限公司 Method for processing voice request text, and computer storage medium
CN112988993A (en) * 2021-02-19 2021-06-18 车智互联(北京)科技有限公司 Question answering method and computing device
CN112988993B (en) * 2021-02-19 2023-10-20 车智互联(北京)科技有限公司 Question and answer method and computing device

Also Published As

Publication number Publication date
WO2021103902A1 (en) 2021-06-03

Similar Documents

Publication Publication Date Title
CN107644642B (en) Semantic recognition method and device, storage medium and electronic equipment
EP4057129A1 (en) Attention aware virtual assistant dismissal
US10122839B1 (en) Techniques for enhancing content on a mobile device
EP4064276A1 (en) Method and device for speech recognition, terminal and storage medium
CN110888969A (en) Dialog response method and device
CN110459222A (en) Sound control method, phonetic controller and terminal device
CN107608532A (en) A kind of association-feeding method, device and electronic equipment
CN107155121B (en) Voice control text display method and device
KR20150090966A (en) Method For Providing Search Result And Electronic Device Using The Same
CN109543014B (en) Man-machine conversation method, device, terminal and server
EP3593346B1 (en) Graphical data selection and presentation of digital content
CN108924343A (en) Control method of electronic device, device, storage medium and electronic equipment
CN114692639A (en) Text error correction method and electronic equipment
CN109389977B (en) Voice interaction method and device
CN113076397A (en) Intention recognition method and device, electronic equipment and storage medium
US20130132072A1 (en) Engine for human language comprehension of intent and command execution
WO2023246558A1 (en) Semantic understanding method and apparatus, and medium and device
CN104731918A (en) Voice search method and device
WO2024036616A1 (en) Terminal-based question and answer method and apparatus
CN111553163A (en) Text relevance determining method and device, storage medium and electronic equipment
CN108073293A (en) A kind of definite method and apparatus of target phrase
AU2017435621B2 (en) Voice information processing method and device, and terminal
CN111373473B (en) Method for voice recognition of electronic equipment and electronic equipment
CN113505596B (en) Topic switching marking method and device and computer equipment
CN108093124B (en) Audio positioning method and device and mobile terminal

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20200317

WW01 Invention patent application withdrawn after publication