CN110309277B - Man-machine conversation semantic analysis method and system, vehicle-mounted man-machine conversation method and system, controller and storage medium - Google Patents

Man-machine conversation semantic analysis method and system, vehicle-mounted man-machine conversation method and system, controller and storage medium Download PDF

Info

Publication number
CN110309277B
CN110309277B CN201810267052.3A CN201810267052A CN110309277B CN 110309277 B CN110309277 B CN 110309277B CN 201810267052 A CN201810267052 A CN 201810267052A CN 110309277 B CN110309277 B CN 110309277B
Authority
CN
China
Prior art keywords
information
slot
word
intention
category
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
CN201810267052.3A
Other languages
Chinese (zh)
Other versions
CN110309277A (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.)
NIO Holding Co Ltd
Original Assignee
Weilai Holdings 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 Weilai Holdings Ltd filed Critical Weilai Holdings Ltd
Priority to CN201810267052.3A priority Critical patent/CN110309277B/en
Publication of CN110309277A publication Critical patent/CN110309277A/en
Application granted granted Critical
Publication of CN110309277B publication Critical patent/CN110309277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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/36Creation of semantic tools, e.g. ontology or thesauri
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention relates to a man-machine dialogue semantic analysis method and a system, wherein the method comprises the following steps: carrying out first analysis on the input demand information to obtain a first slot position of the demand information and one or more kinds of classification information of the demand information; the first slot is used for recording the attribute of a short sentence, phrase or word in the requirement information; the classification information is used for recording the category to which the demand information belongs; and obtaining semantic representation of the requirement information according to the first slot position and the classification information. By using the man-machine dialogue semantic analysis method and system provided by the invention, the semantic of the input demand information can be obtained clearly and accurately.

Description

Man-machine conversation semantic analysis method and system, vehicle-mounted man-machine conversation method and system, controller and storage medium
Technical Field
The invention relates to the field of man-machine conversation, in particular to a semantic analysis method and a semantic analysis system.
Background
With the development of science and technology, human beings have entered an artificial intelligence era, and artificial intelligence is used for extending the intelligence and capability of human beings, simulating the thinking process and intelligent behavior of human beings, so that a machine can be capable of completing complex work which usually needs human intelligence.
Man-machine conversation, a sub-direction in the field of artificial intelligence, is the process of letting a person exchange information with a computer in an interactive way, such as gestures, speech, text, through human language.
The complete man-machine dialogue system relates to the aspects of speech technology, natural language processing, knowledge base, dialogue state maintenance and the like. The semantic analysis is responsible for judging the intention of a user according to the request in the natural language form input by the user, extracting relevant elements (slots), and converting user demand information into internal representation of the human-computer interaction system so as to further process the request of the user by the human-computer interaction system.
The existing semantic analysis method has the defects that the semantic analysis result is not accurate enough, so that the reply of a dialogue system is unreasonable in the human-computer dialogue process, and the situations of reply which do not accord with the dialogue habit of people occur.
Disclosure of Invention
The invention mainly aims to overcome the defects of the existing semantic analysis method, and provides a novel man-machine conversation semantic analysis method and system, a vehicle-mounted man-machine conversation method and system, a controller and a storage medium, and the technical problem to be solved is to provide the man-machine conversation semantic analysis method and system which are more accurate and clearer in semantic analysis, more in line with human conversation habits and higher in intelligence.
The aim and the technical problems of the invention are realized by adopting the following technical proposal. The invention provides a man-machine dialogue semantic analysis method, which comprises the following steps: carrying out first analysis on the input demand information to obtain a first slot position of the demand information and one or more kinds of classification information of the demand information; the first slot is used for recording the attribute of a short sentence, phrase or word in the requirement information; the classification information is used for recording the category to which the demand information belongs; and obtaining semantic representation of the requirement information according to the first slot position and the classification information.
The object of the present invention and the solution to the technical problems thereof can be further achieved by the following technical measures.
The above-mentioned man-machine dialogue semantic analysis method, wherein the classification information includes: one or some of question type information, domain information, intention information; the question type information is used for recording the question category of the requirement information; the domain information is used for recording the domain category of the requirement information; the intention information is used for recording the intention category of the requirement information.
The aforementioned human-computer dialogue semantic analysis method further comprises: the type of the question type information, the type of the domain information and the type of the intention information are preset, and one or more intents are set for the corresponding one type of domain or one or more fields are set for the corresponding one type of intention.
The aforementioned human-computer dialogue semantic analysis method further comprises: the method comprises the steps of presetting the types of first slots, and correspondingly setting one or more first slots for the field of one type, or correspondingly setting one or more first slots for the intention of one type, or correspondingly setting one or more first slots for the problem type of one type.
The aforementioned human-computer dialogue semantic analysis method, wherein the first analysis is as follows: and obtaining the problem type information, the field information, the intention information and the first slot position of the requirement information by utilizing a learning algorithm of a bidirectional cyclic neural network combined with an attention mechanism and a joint loss function joint learning algorithm.
The method for semantic analysis of human-computer interaction, wherein the learning algorithm using a bidirectional cyclic neural network in combination with an attention mechanism and the joint loss function joint learning algorithm obtain the problem type information, the domain information, the intention information and the first slot position of the requirement information, comprises the following steps: obtaining a pre-training word vector representation of a preset phrase or a preset word based on large-scale corpus learning; obtaining each phrase or word in the demand information through word segmentation, and corresponding each phrase or word of the demand information to the pre-training word vector to obtain a word vector matrix corresponding to the demand information; the two-way circulation neural network is combined with the learning of the attention mechanism to acquire the representation of the demand information at each moment of the two-way circulation neural network, the global representation of the demand information, the output of the attention mechanism and the global representation of the attention mechanism; predicting a label of the first slot of the demand information using a representation of the demand information at various times of a bi-directional recurrent neural network and the attention mechanism output, predicting the intent information, the domain information, and the question type information of the demand information using a global representation of the demand information and the attention mechanism global representation such that the demand information representation is shared by a domain identification task, an intent identification task, a question type identification task, and a slot filling task; and jointly learning the domain identification task, the intention identification task, the problem type identification task and the slot filling task by using the joint loss function to respectively obtain category labels of the domain identification task, the intention identification task, the problem type identification task and the slot filling task.
The aforementioned human-computer dialogue semantic analysis method further comprises: performing second analysis on the first slot to obtain each word contained in the first slot, obtaining the attribute of each word and/or the relation among the words, and filling each word into the second slot according to the attribute of each word and the relation among the words; and obtaining semantic representation of the requirement information according to the second slot position, the problem type information, the field information and the intention information.
The method for analyzing the human-computer interaction semantics, wherein the second analyzing the first slot position comprises the following steps: performing word segmentation and dependency syntactic analysis on the first slot to obtain a syntactic tree of the first slot, and determining core words and limiting words in the first slot according to the syntactic tree; and obtaining the attribute of the core word and the attribute of the limiting word through part-of-speech tagging and entity tagging, and determining a second slot corresponding to each word in the first slot through the attribute of the word and/or the relation between one word and other words in the first slot.
The aforementioned human-computer dialogue semantic analysis method further comprises: the semantic representation of the demand information in the dialog of the present round is combined with the semantic representation of the demand information entered in the previous round.
The aim and the technical problems of the invention are also realized by adopting the following technical proposal. The invention provides a man-machine conversation semantic analysis system, which comprises a first analysis module, a second analysis module and a processing module, wherein the first analysis module is used for carrying out first analysis on input demand information to obtain a first slot position of the demand information and one or more kinds of classification information of the demand information; the first slot is used for recording the attribute of a short sentence, phrase or word in the requirement information; the classification information is used for recording the category to which the demand information belongs; and the semantic representation determining module is used for obtaining semantic representation of the requirement information according to the first slot position and the classification information.
The object of the present invention and the solution to the technical problems thereof can be further achieved by the following technical measures.
The human-computer interaction semantic analysis system, wherein the classification information comprises: one or some of question type information, domain information, intention information; the question type information is used for recording the question category of the requirement information; the domain information is used for recording the domain category of the requirement information; the intention information is used for recording the intention category of the requirement information.
The aforementioned human-computer dialogue semantic analysis system further comprises: the classification information category presetting module is used for presetting the category of the question type information, the category of the field information and the category of the intention information, and setting one or more intents for the corresponding field of one category or setting one or more fields for the corresponding intention of one category.
The aforementioned human-computer dialogue semantic analysis system further comprises: the groove category presetting module is used for presetting the category of the first groove, correspondingly setting one or more first grooves for the field of one category, correspondingly setting one or more first grooves for the intention of one category, or correspondingly setting one or more first grooves for the problem type of one category.
The aforementioned human-computer dialogue semantic analysis system, wherein the first analysis module comprises a machine learning sub-module, and is configured to obtain the problem type information, the domain information, the intention information and the first slot of the requirement information by using a learning algorithm of combining a bidirectional cyclic neural network with an attention mechanism and a joint loss function joint learning algorithm.
The foregoing human-machine dialogue semantic analysis system, wherein the machine learning submodule includes: the first unit is used for obtaining a pre-training word vector representation of a preset phrase or a preset word based on large-scale corpus learning; the second unit is used for obtaining each phrase or word in the requirement information through word segmentation, and corresponding each phrase or word of the requirement information to the pre-training word vector to obtain a word vector matrix corresponding to the requirement information; the third unit is used for learning the two-way circulation neural network combined with the attention mechanism for the demand information word vector matrix to obtain the representation of the demand information at each moment of the two-way circulation neural network, the global representation of the demand information, the output of the attention mechanism and the global representation of the attention mechanism; a fourth unit configured to predict a label of the first slot of the demand information using a representation of the demand information at respective times of a bidirectional recurrent neural network and the attention mechanism output, and predict the intention information, the domain information, and the question type information of the demand information using a global representation of the demand information and the attention mechanism global representation such that the demand information representation is shared by a domain identification task, an intention identification task, a question type identification task, and a slot filling task; and a fifth unit for jointly learning the domain identification task, the intention identification task, the problem type identification task and the slot filling task by using the joint loss function to respectively obtain category labels of the domain identification task, the intention identification task, the problem type identification task and the slot filling task.
The aforementioned human-computer dialogue semantic analysis system further comprises: the second analysis module is used for carrying out second analysis on the first slot position to obtain each word contained in the first slot position, obtaining the attribute of each word and/or the relation among the words, and filling each word into the second slot position according to the attribute of each word and the relation among the words; the semantic representation determining module is used for obtaining semantic representation of the requirement information according to the second slot position, the problem type information, the field information and the intention information.
The aforementioned human-computer dialogue semantic analysis system, wherein the second analysis module comprises: a sixth unit, configured to perform word segmentation and dependency syntax analysis on the first slot to obtain a syntax tree of the first slot, and determine a core word and a qualifier in the first slot according to the syntax tree; and a seventh unit, configured to obtain, through part-of-speech tagging and entity tagging, an attribute of the core word and an attribute of the qualifier, and determine, through an attribute of each word in the first slot and/or a relationship between one word and other words in the first slot, a second slot corresponding to the word.
The man-machine conversation semantic analysis system further comprises a semantic updating module, wherein the semantic updating module is used for combining the semantic representation of the requirement information in the conversation of the current round with the semantic representation of the requirement information input in each round.
The aim and the technical problems of the invention are also realized by adopting the following technical proposal. The vehicle-mounted man-machine conversation method provided by the invention comprises the steps of the man-machine conversation semantic analysis method.
The aim and the technical problems of the invention are also realized by adopting the following technical proposal. The vehicle-mounted man-machine dialogue system provided by the invention comprises the man-machine dialogue semantic analysis system.
The aim and the technical problems of the invention are also realized by adopting the following technical proposal. According to the invention, a controller is provided, comprising a memory and a processor, the memory storing a program which, when executed by the processor, is able to implement the steps of any of the methods described above.
The aim and the technical problems of the invention are also realized by adopting the following technical proposal. A computer readable storage medium according to the present invention stores computer instructions which, when executed by a computer or processor, implement the steps of any of the methods described above.
By means of the technical scheme, the man-machine conversation semantic analysis method and system, the vehicle-mounted man-machine conversation method and system, the controller and the storage medium have at least the following advantages and beneficial effects:
(1) The semantics of the requirement information can be clearly and uniquely determined by analyzing the information of four dimensions of the problem type, the field, the intention and the slot position from the requirement information input by the user; by analyzing the question types of the requirement information, the man-machine dialogue system can give different answers according to the different question types, so that the man-machine dialogue system is more in line with the habit of human dialogue and has higher intellectualization; by analyzing the field types of the requirement information, the semantics obtained only by the intention and the slot position can be corrected, and when the semantics cannot be defined, reasonable reply can be carried out according to the field of the requirement information;
(2) By setting a large number of slot categories and associating the division of the slot categories with the field information and/or the intention information and/or the problem type information, the coverage range of the slot is larger and more accurate;
(3) The learning algorithm of a bidirectional circulating neural network combined with an attention mechanism and the joint loss function joint learning algorithm are utilized, and the inherent relation among the four is considered when the problem type, the field, the intention and the slot position are analyzed, so that the analysis accuracy is improved;
(4) By combining the analysis result with the previous analysis result in multiple rounds of dialogue, the semantics of the demand information can be obtained more accurately.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention, as well as the preferred embodiments thereof, together with the following detailed description of the invention, given by way of illustration only, together with the accompanying drawings.
Drawings
FIG. 1 is a flow diagram of one embodiment of a semantic parsing method of the present invention.
FIG. 2 is a flow chart of another embodiment of the semantic parsing method of the present invention.
Fig. 3 is a schematic structural diagram of a syntax tree provided in one embodiment of the semantic parsing method of the present invention.
FIG. 4 is a block diagram of one embodiment of a semantic parsing system of the present invention.
FIG. 5 is a block diagram of another embodiment of a semantic parsing system of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description refers to the specific implementation, method, structure, characteristics and effects of the human-computer interaction semantic analysis method and system, the vehicle-mounted human-computer interaction method and system, the controller and the storage medium according to the invention with reference to the accompanying drawings and the preferred embodiment.
FIG. 1 is a schematic flow chart diagram of one embodiment of a human-machine dialog semantic parsing method of the present invention. Referring to fig. 1, the method for parsing human-computer dialogue semantics includes:
step S110, carrying out first analysis on demand information (query) input by a user to obtain a first analysis result, wherein the first analysis result comprises characteristic information of the demand information. The characteristic information is used for recording the content and the attribute of the requirement information, and comprises a slot (slot) of the requirement information and one or more kinds of classification information of the requirement information. The slot is used for recording short sentences, phrases or words in the requirement information and attributes of the short sentences, phrases or words, and the classification information is used for recording the category to which the requirement information belongs.
Step S120, semantic representation of the demand information is obtained according to the first analysis result, wherein the semantic representation comprises the slots and the classification information of the demand information.
Further, the requirement information may be classified in various manners, such as classifying according to a question type (ques_type), classifying according to a domain (domain), classifying according to an intention (intent), so that the classification information parsed in step S110 may include question type (ques_type) information, domain (domain) information, intention (intent) information. The problem type information, the domain information or the intention information of one piece of requirement information is determined, namely, the category of the problem type, the category of the domain and the category of the intention to which the piece of requirement information belongs are judged.
The question type information is used for representing the question type to which the requirement information belongs. The problem types include: non-query type (None), query type (YN), query How/How type (How), query location type (Where), query time type (When), query quantity type (how_many), query distance type (how_far), and so forth. It should be noted that the question type information is not limited to the examples listed above, and in fact, the kinds of preset question type information may be added or changed according to actual situations.
The domain information is used for representing the type of the domain to which the requirement information belongs. In fact, the domain information may be regarded as a generalized classification of the intent information. As one example, in-car human-machine interaction scenarios, domain information may include navigation, charging, media, phone calls, text messages, information, specific devices, searches, boring with human-machine dialogue systems, and so forth. It is to be noted that the domain information is not limited to the above-listed examples, and in fact, the kinds of preset domain information may be added or changed according to actual situations.
The intention information is used for representing the specific intention type of the requirement information, and is a detailed description of the field information.
As one example, in-car human-machine interaction scenarios, intent information may include:
from place to place (from_to); go to a place (to);
find and play music (search_and_play_music); volume adjustment (turn_volume);
making a call to someone (call_phone);
yes (yes); no (no);
an execution action (action/action_xxx), which may specifically include execution start, execution stop, execution pause, execution continue, etc., in general;
operating a certain device (action_device) to distinguish it for different device intention information, for example, for a car light, the intention information of the operating a certain device class including turning on/off the car light, etc.;
actions on the manifest (list_xxx), such as go to previous page, go to next page;
and inquiring state information (show_state) of the in-vehicle equipment.
It is to be noted that the intention information is not limited to the examples listed above, and in fact, the kind of preset intention information may be added or changed according to actual circumstances.
The slot is used for recording the extracted specific element (such as specific short sentence, phrase, word or character) and the category of the specific element in the user demand information. The analysis of slots (slot extraction, slot recognition or slot filling) corresponds to extracting relevant elements (phrases, words, characters, etc.) from the input demand information, filling the slots according to the attributes of the elements, or filling labels into each element of the demand information, and can be regarded as sequence labels.
In fact, the class of a specific element may be taken as a slot class (also referred to as the name of a slot), and the content of the specific element may be filled into the slot as a specific parameter of the slot, so as to map an infinite specific element into a limited slot, for example, in the case that the specific element is a proper noun; or the content of a particular element may be considered as a slot class without parameters, for example, where the particular element is part of a verb. As an example, one input demand information contains the statement "from beijing to hangzhou", which includes two elements, namely "beijing" and "hangzhou", where the category of "beijing" is "departure place" (from_loc), the category of "hangzhou" is "destination" (to_loc), which is the slot in this example, and "beijing" is the content of the slot record of "departure place" and "hangzhou" is the content of the slot record of "destination".
Alternatively, the "slot class" may be used: the slot parameter "is in the form of recording slot information, wherein a slot category is used for recording the category of the element (word, phrase) in the requirement information sentence, and in fact, a slot category can be used as the name of such a slot, and a slot parameter is used for recording the content of the element (word, phrase) in the requirement information sentence. The following are some examples of slots for in-car human-machine interaction scenarios:
"poi: point of interest", which is a geographical entity, typically a phrase including modifier words (e.g., whisper, scholarly, etc.), such as "coffee shop within 1 km of the Beijing subway station";
the "around_poi: geographical position" is used for recording the geographical position of a point of interest, such as "Beijing looking subway station" in the coffee shop within 1 km of the Beijing looking subway station ";
the tag is a kind of object entity and is used for representing entity tags of a kind of objects, such as a coffee shop, a restaurant and a parking lot;
"loc: specific location" which is a word or phrase of a specific location name, such as Botai building, east Wang Zhuangxiao area;
"fee: charge case" including phrases of whether to charge, charge amount, charge, etc.;
"park: park condition";
"operation: operation to be performed", which is a specific operation to be performed, such as "operation: search", "operation: play";
"language: language category" which is a specific language such as English, siban, guangdong, etc.;
volume, which is a phrase about volume;
"music_name: song name";
"music_artist: singer";
person name;
"phone_digit: phone number";
"distance" is a term for distance, such as "distance: how far", "distance: within one kilometer";
"duration" in terms of time, etc.
It should be noted that the slot information is not limited to the above-listed examples, and may be actually added or changed to a preset slot category according to actual situations.
The human-computer interaction semantic analysis method may further include a step of presetting the type of the question type information, the type of the domain information and the type of the intention information, and a step of presetting the type of the slot. Further, the kinds of the characteristic information can be set according to the types of questions, fields, intentions and interrelationships among slots. Specific:
for domain information and intent information:
since the domain information is a generalized classification of the intention information, which is a detailed description of the domain information, the kinds of domains, intentions can be set to be interrelated:
some intents belong to one or more specific areas only, e.g. from somewhere to somewhere (from_to), to somewhere (to), generally only to the navigation area;
In addition, specific intention information included in the same type of intention may be different for different specific fields, for example, for an intention such as an execution action (action/action_xxx), specific intention may include an execution start, an execution stop, an execution pause, an execution continuation, a search for songs, a song switching, a play mode changing, etc. in the media field, and an intention such as an execution action may include an intention to change an air conditioning mode, a set temperature changing, a wind direction changing, etc. in addition to an execution start, an execution stop, an execution pause, an execution continuation, etc. in the air conditioning device field, but may not include an intention to search for songs, a song switching, a play mode changing, etc.
For the slot:
the correspondence between the slot category (slot name) and the question type, domain or intention may be set, for example, the question type, domain or intention corresponding to one slot category may be set, or the slot category included in one question type, one domain or one intention may be set, so that the slot information is more accurate. For example, the "volume" slot may correspond to a "turn_volume" intent, may correspond to a "media" field, or may also correspond to a "talk" field, and generally not correspond to a "go to somewhere (to)" intent, and not to a "navigate" field.
According to the relation rule among the problem types, the fields, the intentions and the slots, whether the semantic analysis is successful or not can be judged by judging whether each analyzed characteristic information accords with the relation rule, and when certain characteristic information cannot be identified, the relation rule can be used for supplementing (or predicting) the information which cannot be identified.
The first parsing may be performed using a machine learning model. For this reason, a large amount of data marked with characteristic information such as problem type, field, intention and slot position needs to be machine-learning trained in advance to obtain a machine-learning model, and when a piece of demand information is first analyzed, the demand information is input into the machine-learning model which is learning trained, and the machine-learning model outputs the problem type, field, intention and slot position corresponding to the piece of demand information.
Furthermore, the first analysis can be performed by utilizing a learning algorithm of a bidirectional circulating neural network combined with an attention mechanism and a joint loss function joint learning algorithm, and the inherent relation among the four is considered when the problem type, the field, the intention and the slot position are identified, so that the accuracy of the first analysis is improved. Specifically, the requirement information input by the user can be converted into a word vector matrix, learning is performed through a bidirectional cyclic neural network and a attention mechanism, so that the requirement information is expressed as a word vector matrix shared by a domain recognition task, an intention recognition task, a problem type recognition task and a slot filling task, and then the domain recognition task, the intention recognition task, the problem type recognition task and the slot filling task are learned together by using a joint loss function. In some embodiments, step S110 specifically includes the steps of:
Step S111, obtaining a pre-training word vector representation of a preset word (or word, phrase) based on large-scale corpus learning.
Step S112, obtaining each word (or word, phrase) in the input demand information through word segmentation, and then corresponding each word in the demand information to the pre-trained word vector obtained in step S111 to obtain a word vector matrix corresponding to the piece of demand information.
Step S113, learning the word vector matrix of the requirement information obtained in step S112 by using the bidirectional recurrent neural network, and obtaining the representation ht_forward (corresponding to the forward recurrent neural network), ht_backward (corresponding to the backward recurrent neural network), the global representation hu_forward, hu_backward of the requirement information, the output Ct of the attention mechanism, and the global representation Cu of the attention mechanism of the requirement information at each moment of the bidirectional recurrent neural network.
In step S114, the output Ct of the requirement information, which is obtained in step S113, representing ht_forward, ht_backward and attention mechanism at each time of the bidirectional cyclic neural network is used to predict the label of each slot, and the global representation of the requirement information, which is obtained in step S113, representing hu_forward, hu_backward and attention mechanism, cu is used to predict the intention, the field and the problem type of the requirement information, so that the input requirement information representation is shared by the field recognition task, the intention recognition task, the problem type recognition task and the slot filling task.
Step S115, jointly learning a domain identification task, an intention identification task, a problem type identification task and a slot filling task by using the joint loss function, and respectively obtaining class labels of the domain identification task, the intention identification task, the problem type identification task and the slot filling task.
Fig. 2 is a schematic flow chart of another embodiment of the human-machine dialog semantic parsing method of the present invention. Since the slot obtained in step S110 may be a phrase or a phrase containing one or more modifier words (e.g. a fixed word, a scholarly word), the slot obtained in step S110 may be referred to as a first slot, and in order to obtain a more accurate semantic representation, please refer to fig. 2, in some embodiments, the method for human-machine dialogue semantic parsing of the present invention includes:
step S210, performing a first analysis on the requirement information (query) input by the user to obtain a first analysis result, where the first analysis result includes question type information, domain information, intention information and a first slot of the requirement information.
And step S220, performing second analysis on the first slot of the requirement information (query) obtained in the step S210 to obtain a second analysis result, wherein the second analysis result comprises each word (or phrase) contained in the first slot, the attribute of each word (or phrase) and the relation between each word (or phrase) so as to decompose and extract the core word and the modifier from the short sentence or phrase of the first slot which is insufficiently decomposed, and filling each word of the first slot into a more specific refined second slot according to the relation between the attribute of each word and each word in the short sentence or phrase of the first slot so as to more accurately express the input requirement information. Specifically, the second parsing may be performed by means of one or more of syntactic analysis, word segmentation, part-of-speech tagging, and entity tagging.
Step S230, combining the first analysis result and the second analysis result to obtain a semantic representation of the requirement information, wherein the semantic representation comprises the problem type information, the field information, the intention information and the second slot of the requirement information.
As a specific example, for a requirement information sentence "there are several coffee shops within 1 km of the inspection subway station", a first slot "poi" is extracted in step S210, which is the coffee shop within 1 km of the inspection subway station. The step S220 of performing the first slot information specifically includes the following steps:
in step S221, a syntax tree of a specific element (typically a word or phrase) in "coffee hall within 1 km of the telescoping subway station" is obtained through word segmentation and dependency syntax analysis, so as to determine a core word and a qualifier in the specific element according to the syntax tree. Fig. 3 is a schematic structural diagram of a syntax tree provided by an embodiment of the human-machine dialogue semantic parsing method of the present invention. Referring to fig. 3, word nodes directly linked by tree roots in the syntax tree are core words, and qualifiers are on child nodes of the core words in the syntax tree. In this example, "coffee shop" is a core word, and "Beijing subway station" and "within one kilometer" are both qualifiers of "coffee shop".
In step S222, the attributes of each core word and each qualifier are obtained through part-of-speech tagging and entity tagging, so as to determine the second slot category to which a specific element belongs through the attribute of the specific element and/or the relationship between the specific element and other specific elements. In this example, the "cafe" part of speech is a noun and the "Beijing" is a place name entity, so that the core word "cafe" is limited by the qualifier place name entity "Beijing".
As an example, the input demand information is "there are several coffee shops in a range of one kilometer of a Beijing subway station", and the semantic analysis result obtained by the human-computer dialogue semantic analysis method of the present invention may be:
{
ques_type:How_many;
domain:Nav;
intent:poi_lookup;
the slots are 'around_poi is a Beijing subway station', 'distance is within one kilometer', 'tag is a coffee shop';
}
the 'ques_type' is a question type of the requirement information, and the question type of the requirement information is a query quantity type; "domain: nav" is a domain type of the demand information, indicating that the domain of the demand information is navigation; "intent: poi_lookup" is the type of intent of the demand information, indicating that the intent of the demand information is a query point of interest (point of interest, poi); "slots: around_poi: wangjing subway station, distance: within one kilometer, tag: coffee hall" is the language slot of the demand information, which includes three language slots.
According to the semantic expression containing the question type information (ques_type) and the domain information (domain), the actual requirements of the user can be more clearly and accurately expressed, and more accurate judgment and finer processing can be performed in the subsequent process of the man-machine conversation.
Specifically, in an example that the requirement information input by the user is "a coffee shop within a kilometer range of a Beijing subway station", if the obtained intention information (intent) is "poi_lookup" (query poi), the obtained slot positions (slot) are three slot positions of "around_poi: the Beijing subway station", "distance: within a kilometer", and "tag: the coffee shop", and the requirement of the user can be obtained by combining the intention information and the slot positions: the user wants to search for the coffee shop within one kilometer of the Beijing subway station. However, the requirement information "there are several coffee shops within one kilometer of the Beijing subway station" is basically consistent with the intention of the two users in comparison with the requirement information "there are coffee shops within one kilometer of the Beijing subway station", but in fact, according to the difference of the details of the questions, the two requirement information should be answered differently to give a more pertinent reply. Therefore, the man-machine conversation semantic analysis method can distinguish user demands with similar intention information and slots by analyzing the problem type information (ques_type) of the user demand information, for example, the problem type of 'a coffee hall in a range of one kilometer of a Beijing subway station' is a How_many type, and the problem type of 'a coffee hall in a kilometer of a Beijing subway station' is a YN type, so that different answers can be given according to different problem types in the man-machine conversation process, the man-machine conversation system is more intelligent and humanized, and a user feels like a conversation with a person instead of a machine.
The domain information (domain) of the user demand information analyzed by the man-machine conversation semantic analysis method can play a role in correcting and preventing the user from getting in touch in the man-machine conversation process. When the intention information and the slot form contradiction and the user requirement cannot be judged in the man-machine conversation process, the intention information of the requirement can be supplemented or predicted by combining the domain information and the contact rule between the slot and the intention information, and the subsequent judgment and answer in the man-machine conversation process can be carried out according to the corrected and supplemented semantic representation; or, some unified spam answers based on domain information (domain) can be designed, for example, for the navigation domain, "less understand your meaning, please ask where to go" can be used as default spam answer, and for the music domain, "less understand your meaning, please ask what music to listen" can be set as default spam answer, so that the man-machine dialogue system is more intelligent and accords with people's habit.
In some embodiments, the human-computer dialogue semantic parsing method of the present invention further includes the steps of: in the multi-round dialogue, the semantic understanding representation of the requirement information in the dialogue of the round is combined with the semantic understanding representation of the requirement information input by each round before, so that in the multi-round man-machine dialogue, semantic understanding is updated, added and deleted round by round, and the semantic understanding information of each round of interaction is maintained so as to gradually and definitely meet the requirement.
The following lists some scenarios of the input demand information, and semantic analysis results obtained by the human-machine dialogue semantic analysis method of the present invention.
Scene one, the demand information is: b, removing the ground;
the semantic analysis result is: the queue_type is None, domain is navigation, slots is { to_loc is B }, and the content is to.
Scene two, the demand information is: navigating from the A ground to the B ground on the vehicle;
the semantic analysis result is: the method comprises the steps of query_type: none, domain: navigation, slots { from_loc: A, dest_loc: B }, and content: from-to.
Scene three, the demand information is: whether a traffic light exists;
the semantic analysis result is: the method comprises the steps of query_type: yn, domain: navigation, intent: not_support, slots { route_attribute: traffic light }.
It should be noted that, there may be a case where a certain feature information cannot be parsed, where a unified flag may be used to indicate that the feature information is not parsed, for example, "not_support" in the example of scene three is the intention information for indicating that the requirement information is not parsed. When certain characteristic information is missing, semantic understanding representation obtained by the human-computer dialogue semantic analysis method can still be judged in the human-computer dialogue process based on the analyzed other characteristic information, for example, in the example of a third scene, although intention information is not analyzed, the intention of the required information can be judged and other human-computer dialogue processes can be carried out through the analyzed problem type information, the field information and the slot position and the relation between the preset intention information, the field information and the slot position.
It should be noted that, the method for parsing human-computer dialogue semantics is not limited to be applied to the above-mentioned scenes.
The embodiment of the invention further provides a vehicle-mounted man-machine conversation method, which comprises the steps of the man-machine conversation semantic analysis method.
FIG. 4 is a schematic block diagram of one embodiment of a human-machine dialog semantic parsing system of the present invention. Referring to fig. 4, the human-computer dialogue semantic parsing system of the present invention includes:
the first parsing module 310 is configured to perform a first parsing on the requirement information (query) input by the user, to obtain a first parsing result, where the first parsing result includes feature information of the requirement information. The characteristic information is used for recording the content and the attribute of the requirement information, and comprises a slot (slot) of the requirement information and one or more kinds of classification information of the requirement information. The slot is used for recording short sentences, phrases or words in the requirement information and attributes of the short sentences, phrases or words, and the classification information is used for recording the category to which the requirement information belongs.
The semantic representation determining module 320 is configured to obtain a semantic representation of the requirement information according to the first analysis result, where the semantic representation includes a slot and classification information of the requirement information.
Further, the requirement information may be classified in various manners, such as classifying according to a question type (ques_type), classifying according to a domain (domain), and classifying according to an intention (intent), so that the classification information parsed by the first parsing module 301 may include question type (ques_type) information, domain (domain) information, and intention (intent) information. The problem type information, the domain information or the intention information of one piece of requirement information is determined, namely, the category of the problem type, the category of the domain and the category of the intention to which the piece of requirement information belongs are judged.
The question type information is used for representing the question type to which the requirement information belongs. The problem types include: non-query type (None), query type (YN), query How/How type (How), query location type (Where), query time type (When), query quantity type (how_many), query distance type (how_far), and so forth. It should be noted that the question type information is not limited to the examples listed above, and in fact, the kinds of preset question type information may be added or changed according to actual situations.
The domain information is used for representing the type of the domain to which the requirement information belongs. In fact, the domain information may be regarded as a generalized classification of the intent information. As one example, in-car human-machine interaction scenarios, domain information may include navigation, charging, media, phone calls, text messages, information, specific devices, searches, boring with human-machine dialogue systems, and so forth. It is to be noted that the domain information is not limited to the above-listed examples, and in fact, the kinds of preset domain information may be added or changed according to actual situations.
The intention information is used for representing the specific intention type of the requirement information, and is a detailed description of the field information. It is to be noted that the intention information is not limited to the examples listed above, and in fact, the kind of preset intention information may be added or changed according to actual circumstances.
The slot is used for recording the extracted specific element (such as specific short sentence, phrase, word or character) and the category of the specific element in the user demand information. The analysis of slots (slot extraction, slot recognition or slot filling) corresponds to extracting relevant elements (phrases, words, characters, etc.) from the input demand information, filling the slots according to the attributes of the elements, or filling labels into each element of the demand information, and can be regarded as sequence labels.
In fact, the class of a specific element may be taken as a slot class (also referred to as the name of a slot), and the content of the specific element may be filled into the slot as a specific parameter of the slot, so as to map an infinite specific element into a limited slot, for example, in the case that the specific element is a proper noun; or the content of a particular element may be considered as a slot class without parameters, for example, where the particular element is part of a verb. As an example, one input demand information contains the statement "from beijing to hangzhou", which includes two elements, namely "beijing" and "hangzhou", where the category of "beijing" is "departure place" (from_loc), the category of "hangzhou" is "destination" (to_loc), which is the slot in this example, and "beijing" is the content of the slot record of "departure place" and "hangzhou" is the content of the slot record of "destination".
Alternatively, the "slot class" may be used: the slot parameter "is in the form of recording slot information, wherein a slot category is used for recording the category of the element (word, phrase) in the requirement information sentence, and in fact, a slot category can be used as the name of such a slot, and a slot parameter is used for recording the content of the element (word, phrase) in the requirement information sentence. It should be noted that the slot information is not limited to the above-listed examples, and may be actually added or changed to a preset slot category according to actual situations.
The man-machine conversation semantic analysis system of the invention can further comprise a classification information type preset module and a slot position type preset module (not shown in the figure), wherein the classification information type preset module is used for presetting the types of the problem type information, the field information and the intention information, and the slot position type preset module is used for presetting the types of the slot positions. Further, the classification information category preset module and the slot category preset module can set the types of the feature information according to the interrelation among the problem type, the field, the intention and the slot. Specific:
for domain information and intent information:
Since the domain information is a generalized classification of the intention information, which is a detailed description of the domain information, the kinds of domains, intentions can be set to be interrelated:
some intents belong to one or more specific areas only, e.g. from somewhere to somewhere (from_to), to somewhere (to), generally only to the navigation area;
in addition, specific intention information included in the same type of intention may be different for different specific fields, for example, for an intention such as an execution action (action/action_xxx), specific intention may include an execution start, an execution stop, an execution pause, an execution continuation, a search for songs, a song switching, a play mode changing, etc. in the media field, and an intention such as an execution action may include an intention to change an air conditioning mode, a set temperature changing, a wind direction changing, etc. in addition to an execution start, an execution stop, an execution pause, an execution continuation, etc. in the air conditioning device field, but may not include an intention to search for songs, a song switching, a play mode changing, etc.
For the slot:
the correspondence between the slot category (slot name) and the question type, domain or intention may be set, for example, the question type, domain or intention corresponding to one slot category may be set, or the slot category included in one question type, one domain or one intention may be set, so that the slot information is more accurate. For example, the "volume" slot may correspond to a "turn_volume" intent, may correspond to a "media" field, or may also correspond to a "talk" field, and generally not correspond to a "go to somewhere (to)" intent, and not to a "navigate" field.
According to the relation rule among the problem types, the fields, the intentions and the slots, whether the semantic analysis is successful or not can be judged by judging whether each analyzed characteristic information accords with the relation rule, and when certain characteristic information cannot be identified, the relation rule can be used for supplementing (or predicting) the information which cannot be identified.
The first parsing module 310 may include a machine learning sub-module 311 for performing the first parsing using a machine learning model. For this reason, a large amount of data marked with characteristic information such as problem type, field, intention and slot position needs to be machine-learning trained in advance to obtain a machine-learning model, and when a piece of demand information is first analyzed, the demand information is input into the machine-learning model which is learning trained, and the machine-learning model outputs the problem type, field, intention and slot position corresponding to the piece of demand information.
Further, the machine learning sub-module 311 may be specifically configured to perform the first analysis by using a learning algorithm of combining a bidirectional cyclic neural network with an attention mechanism and a joint loss function co-learning algorithm, and consider the internal relation between the four when identifying the problem type, the field, the intention and the slot position, so as to improve the accuracy of the first analysis. Specifically, the machine learning sub-module 311 may convert the requirement information input by the user into a word vector matrix, learn the requirement information by combining a bidirectional cyclic neural network with an attention mechanism, so that the requirement information is represented as a word vector matrix shared by a domain recognition task, an intention recognition task, a problem type recognition task and a slot filling task, and then learn the domain recognition task, the intention recognition task, the problem type recognition task and the slot filling task together by using a joint loss function. In some embodiments, the machine learning sub-module 311 specifically includes:
The first unit is used for obtaining pre-training word vector representation of preset words (or words and phrases) based on large-scale corpus learning.
And the second unit is used for obtaining each word (or word or phrase) in the input demand information through word segmentation, and then, corresponding each word in the demand information to the pre-trained word vector obtained by the first unit so as to obtain a word vector matrix corresponding to the piece of demand information.
And a third unit, configured to learn, using the bidirectional recurrent neural network, the word vector matrix of the requirement information obtained by the second unit, and obtain, at each time of the bidirectional recurrent neural network, a representation ht_forward (corresponding to the forward recurrent neural network), ht_backward (corresponding to the backward recurrent neural network) of the requirement information, a global representation hu_forward, hu_backward of the requirement information, an output Ct of the attention mechanism, and a global representation Cu of the attention mechanism.
And a fourth unit, configured to use the output Ct of the requirement information obtained by the third unit, which is the representation ht_forward, ht_backward and attention mechanism of the bidirectional cyclic neural network at each moment, to predict the label of each slot, and use the global representation hu_forward, hu_backward and the global representation Cu of the attention mechanism obtained by the third unit, which is the representation of the requirement information, to predict the intention, the domain and the problem type of the requirement information, so that the input requirement information representation is shared by the domain recognition task, the intention recognition task, the problem type recognition task and the slot filling task.
And a fifth unit for learning the domain identification task, the intention identification task, the problem type identification task and the slot filling task together by using the joint loss function, and obtaining category labels of the domain identification task, the intention identification task, the problem type identification task and the slot filling task respectively.
Fig. 5 is a schematic block diagram of another embodiment of a human-machine dialog semantic parsing system of the present invention. Since the slots obtained by the first parsing module 310 may be short sentences or phrases containing one or more modifier words (e.g., idioms, scholars), the slots obtained by the first parsing module 310 may be referred to as first slots, and in order to obtain more accurate semantic representation, referring to fig. 5, in some embodiments, the man-machine interaction semantic parsing system of the present invention includes:
the aforementioned first parsing module 310 is configured to perform a first parsing on the requirement information (query) input by the user, to obtain a first parsing result, where the first parsing result includes problem type information, domain information, intention information and a first slot of the requirement information;
the second parsing module 330 performs a second parsing on the first slot of the requirement information (query) obtained by the first parsing module 310, to obtain a second parsing result, where the second parsing result includes each word (or phrase) included in the first slot, an attribute of each word (or phrase), and a relationship between each word (or phrase), so as to decompose and extract a core word and a modifier from the phrase or phrase of the first slot that is insufficiently decomposed, and fill each word of the first slot into a more specific refined second slot according to the relationship between the attribute of each word and each word in the phrase or phrase of the first slot, so as to more accurately represent the input requirement information. Specifically, the second parsing can be performed by means of composition of one or more modes of syntactic analysis, word segmentation, part-of-speech tagging and entity tagging;
The foregoing semantic representation determining module 320 is configured to combine the result of the first analysis and the result of the second analysis to obtain a semantic representation of the requirement information, where the semantic representation includes question type information, domain information, intention information, and a second slot of the requirement information.
As a specific example, for a requirement information sentence "coffee shops within 1 km of the inspection subway station have several houses", the first parsing module 310 obtains a first slot "poi" for coffee shops within 1 km of the inspection subway station. The second parsing module 330 specifically includes:
and a sixth unit for obtaining a syntax tree of specific elements (generally words or phrases) in the coffee hall within 1 km of the Beijing subway station through word segmentation and dependency syntax analysis, so as to determine core words and limiting words in the specific elements according to the syntax tree. Fig. 3 is a schematic block diagram of a syntax tree provided by an embodiment of the present invention. Referring to fig. 3, word nodes directly linked by tree roots in the syntax tree are core words, and qualifiers are on child nodes of the core words in the syntax tree. In this example, "coffee shop" is a core word, and "Beijing subway station" and "within one kilometer" are both qualifiers of "coffee shop".
And a seventh unit, configured to obtain the attribute of each core word and each qualifier through part-of-speech tagging and entity tagging, so as to determine the second slot category to which a specific element belongs through the attribute of the specific element and/or the relationship between the specific element and other specific elements. In this example, the "cafe" part of speech is a noun and the "Beijing" is a place name entity, so that the core word "cafe" is limited by the qualifier place name entity "Beijing".
As an example, the input demand information is "there are several coffee shops in a range of one kilometer of a Beijing subway station", and the semantic analysis result obtained by the human-computer dialogue semantic analysis system of the present invention may be:
{
ques_type:How_many;
domain:Nav;
intent:poi_lookup;
the slots are 'around_poi is a Beijing subway station', 'distance is within one kilometer', 'tag is a coffee shop';
}
the 'ques_type' is a question type of the requirement information, and the question type of the requirement information is a query quantity type; "domain: nav" is a domain type of the demand information, indicating that the domain of the demand information is navigation; "intent: poi_lookup" is the type of intent of the demand information, indicating that the intent of the demand information is a query point of interest (point of interest, poi); "slots: around_poi: wangjing subway station, distance: within one kilometer, tag: coffee hall" is the language slot of the demand information, which includes three language slots.
According to the semantic expression containing the question type information (ques_type) and the domain information (domain), the actual requirements of the user can be more clearly and accurately expressed, and the man-machine conversation system can be enabled to conduct more accurate judgment and finer subsequent processing.
Specifically, in an example that the requirement information input by the user is "a coffee shop within a kilometer range of a Beijing subway station", if the obtained intention information (intent) is "poi_lookup" (query poi), the obtained slot positions (slot) are three slot positions of "around_poi: the Beijing subway station", "distance: within a kilometer", and "tag: the coffee shop", and the requirement of the user can be obtained by combining the intention information and the slot positions: the user wants to search for the coffee shop within one kilometer of the Beijing subway station. However, the requirement information "there are several coffee shops within one kilometer of the Beijing subway station" is basically consistent with the intention of the two users in comparison with the requirement information "there are coffee shops within one kilometer of the Beijing subway station", but in fact, according to the difference of the details of the questions, the two requirement information should be answered differently to give a more pertinent reply. Therefore, the man-machine conversation semantic analysis system can distinguish user demands with similar intention information and slots by analyzing the problem type information (ques_type) of the user demand information, for example, the problem type of 'that a plurality of coffee shops exist in a range of one kilometer of a Beijing subway station' is a How_many type, and the problem type of 'that a plurality of coffee shops exist in a range of one kilometer of a Beijing subway station' is a YN type.
The domain information (domain) of the user demand information analyzed by the man-machine conversation semantic analysis system can play a role in correcting and preventing the user from getting in touch in the man-machine conversation process. When the intention information and the slot form contradiction and the man-machine interaction system cannot judge the requirement of the user, the intention information of the requirement can be supplemented or predicted by combining the domain information, the connection rule between the slot and the intention information, and the subsequent judgment and the response of the man-machine interaction system are carried out according to the corrected and supplemented semantic representation; or, some unified spam answers based on domain information (domain) can be designed, for example, for the navigation domain, "less understand your meaning, please ask where to go" can be used as default spam answer, and for the music domain, "less understand your meaning, please ask what music to listen" can be set as default spam answer, so that the man-machine dialogue system is more intelligent and accords with people's habit.
In some embodiments, the semantic analysis system of the man-machine conversation of the present invention further includes a semantic update module, configured to combine, in a multi-round conversation, semantic understanding representations of the demand information in the current round of conversation with semantic understanding representations of demand information input in previous rounds, so that, in the multi-round man-machine conversation, semantic understanding is updated, added, deleted round by round, and semantic understanding information of each round of interaction is maintained, so as to gradually define demands.
The embodiment of the invention further provides a vehicle-mounted man-machine conversation system, which comprises the man-machine conversation semantic analysis system.
Further, the embodiment of the invention also provides a controller, which comprises a memory and a processor, wherein the memory stores a computer program, and the program can realize the steps of any man-machine conversation semantic analysis method when being executed by the processor. It should be understood that the instructions stored in the memory correspond to the steps of a specific example of a human-machine dialog semantic parsing method that it is capable of implementing when executed by a processor.
Further, the embodiment of the invention also provides a computer readable storage medium for storing computer instructions which, when executed by a computer or a processor, implement the steps of any of the above-mentioned human-machine dialogue semantic parsing methods. It should be understood that the instructions stored in the computer-readable storage medium correspond to the steps of a specific example of a human-machine dialog semantic parsing method that it is capable of implementing when executed.
The present invention is not limited to the above-mentioned embodiments, but is intended to be limited to the following embodiments, and any modifications, equivalents and modifications can be made to the above-mentioned embodiments without departing from the scope of the invention.

Claims (18)

1. A man-machine dialogue semantic analysis method comprises the following steps:
carrying out first analysis on the input demand information to obtain characteristic information of the demand information, wherein the characteristic information comprises a first slot position and one or more kinds of classification information; the first slot is used for recording the attribute of a short sentence, phrase or word in the requirement information; the classification information is used for recording the category to which the demand information belongs; the classification information comprises intention information, wherein the intention information is used for recording an intention category of the requirement information, the classification information also comprises question type information and/or field information, the question type information is used for recording a question category of the requirement information, the field information is used for recording a field category of the requirement information, and the field information is a generalized classification of the intention information;
obtaining semantic representation of the demand information according to the first slot position and the classification information;
the method further comprises the steps of setting the types of the characteristic information in advance according to the mutual relations among the problem type information, the field information, the intention information and the first slot position, and supplementing or predicting the characteristic information which cannot be identified according to the mutual relations or carrying out a man-machine conversation process based on other analyzed characteristic information when certain characteristic information cannot be identified or when the analyzed characteristic information forms contradiction;
Wherein the first parsing comprises: the demand information is converted into a word vector matrix, learning is carried out through a bidirectional cyclic neural network and an attention mechanism, so that the demand information is expressed as the word vector matrix shared by a domain identification task, an intention identification task, a problem type identification task and a slot filling task, and then the domain identification task, the intention identification task, the problem type identification task and the slot filling task are learned together by using a joint loss function.
2. The human-machine dialog semantic parsing method of claim 1, further comprising: the type of the question type information, the type of the domain information and the type of the intention information are preset, and one or more intents are set for the corresponding one type of domain or one or more fields are set for the corresponding one type of intention.
3. The human-machine dialog semantic parsing method of claim 2, further comprising: the method comprises the steps of presetting the types of first slots, and correspondingly setting one or more first slots for the field of one type, or correspondingly setting one or more first slots for the intention of one type, or correspondingly setting one or more first slots for the problem type of one type.
4. The human-computer interaction semantic parsing method according to claim 1, wherein the first parsing specifically comprises the following steps:
obtaining a pre-training word vector representation of a preset phrase or a preset word based on large-scale corpus learning;
obtaining each phrase or word in the demand information through word segmentation, and corresponding each phrase or word of the demand information to the pre-training word vector to obtain a word vector matrix corresponding to the demand information;
the two-way circulation neural network is combined with the learning of the attention mechanism to acquire the representation of the demand information at each moment of the two-way circulation neural network, the global representation of the demand information, the output of the attention mechanism and the global representation of the attention mechanism;
predicting a label of the first slot of the demand information using a representation of the demand information at various times of a bi-directional recurrent neural network and the attention mechanism output, predicting the intent information, the domain information, and the question type information of the demand information using a global representation of the demand information and the attention mechanism global representation such that the demand information representation is shared by a domain identification task, an intent identification task, a question type identification task, and a slot filling task;
And jointly learning the domain identification task, the intention identification task, the problem type identification task and the slot filling task by using the joint loss function to respectively obtain category labels of the domain identification task, the intention identification task, the problem type identification task and the slot filling task.
5. The human-machine dialogue semantic parsing method according to claim 1, further comprising the steps of:
performing second analysis on the first slot to obtain each word contained in the first slot, obtaining the attribute of each word and/or the relation among the words, and filling each word into the second slot according to the attribute of each word and the relation among the words;
and obtaining semantic representation of the requirement information according to the second slot position, the problem type information, the field information and the intention information.
6. The human-machine dialogue semantic parsing method according to claim 5, wherein the second parsing of the first slot comprises the steps of:
performing word segmentation and dependency syntactic analysis on the first slot to obtain a syntactic tree of the first slot, and determining core words and limiting words in the first slot according to the syntactic tree;
And obtaining the attribute of the core word and the attribute of the limiting word through part-of-speech tagging and entity tagging, and determining a second slot corresponding to each word in the first slot through the attribute of the word and/or the relation between one word and other words in the first slot.
7. The human-machine dialog semantic parsing method of claim 1, further comprising: the semantic representation of the demand information in the dialog of the present round is combined with the semantic representation of the demand information entered in the previous round.
8. A human-machine dialog semantic parsing system, comprising:
the first analysis module is used for carrying out first analysis on the input demand information to obtain characteristic information of the demand information, wherein the characteristic information comprises a first slot position and one or more kinds of classification information; the first slot is used for recording the attribute of a short sentence, phrase or word in the requirement information; the classification information is used for recording the category to which the demand information belongs; the classification information comprises intention information, wherein the intention information is used for recording an intention category of the requirement information, the classification information also comprises question type information and/or field information, the question type information is used for recording a question category of the requirement information, the field information is used for recording a field category of the requirement information, and the field information is a generalized classification of the intention information;
The semantic representation determining module is used for obtaining semantic representation of the requirement information according to the first slot position and the classification information;
the system further comprises a classification information category preset module and a slot category preset module, which are used for presetting the category of corresponding characteristic information according to the mutual relation among the problem type information, the field information, the intention information and the first slot, and for supplementing or predicting the characteristic information which cannot be identified according to the mutual relation when the characteristic information which cannot be identified is not identified or when the analyzed characteristic information forms a contradiction, or carrying out a man-machine conversation process based on the analyzed other characteristic information;
wherein the first parsing module includes a machine learning sub-module for: the demand information is converted into a word vector matrix, learning is carried out through a bidirectional cyclic neural network and an attention mechanism, so that the demand information is expressed as the word vector matrix shared by a domain identification task, an intention identification task, a problem type identification task and a slot filling task, and then the domain identification task, the intention identification task, the problem type identification task and the slot filling task are learned together by using a joint loss function.
9. The human-machine dialog semantic parsing system of claim 8, further comprising:
the classification information category presetting module is used for presetting the category of the question type information, the category of the field information and the category of the intention information, and setting one or more intents for the corresponding field of one category or setting one or more fields for the corresponding intention of one category.
10. The human-machine dialog semantic parsing system of claim 9, further comprising:
the groove category presetting module is used for presetting the category of the first groove, correspondingly setting one or more first grooves for the field of one category, correspondingly setting one or more first grooves for the intention of one category, or correspondingly setting one or more first grooves for the problem type of one category.
11. The human-machine dialog semantic parsing system of claim 8, wherein the machine learning sub-module comprises:
the first unit is used for obtaining a pre-training word vector representation of a preset phrase or a preset word based on large-scale corpus learning;
the second unit is used for obtaining each phrase or word in the requirement information through word segmentation, and corresponding each phrase or word of the requirement information to the pre-training word vector to obtain a word vector matrix corresponding to the requirement information;
The third unit is used for learning the two-way circulation neural network combined with the attention mechanism for the demand information word vector matrix to obtain the representation of the demand information at each moment of the two-way circulation neural network, the global representation of the demand information, the output of the attention mechanism and the global representation of the attention mechanism;
a fourth unit configured to predict a label of the first slot of the demand information using a representation of the demand information at respective times of a bidirectional recurrent neural network and the attention mechanism output, and predict the intention information, the domain information, and the question type information of the demand information using a global representation of the demand information and the attention mechanism global representation such that the demand information representation is shared by a domain identification task, an intention identification task, a question type identification task, and a slot filling task;
and a fifth unit for jointly learning the domain identification task, the intention identification task, the problem type identification task and the slot filling task by using the joint loss function to respectively obtain category labels of the domain identification task, the intention identification task, the problem type identification task and the slot filling task.
12. The human-machine dialog semantic parsing system of claim 8, further comprising:
the second analysis module is used for carrying out second analysis on the first slot position to obtain each word contained in the first slot position, obtaining the attribute of each word and/or the relation among the words, and filling each word into the second slot position according to the attribute of each word and the relation among the words;
the semantic representation determining module is used for obtaining semantic representation of the requirement information according to the second slot position, the problem type information, the field information and the intention information.
13. The human-machine dialog semantic parsing system of claim 12, wherein the second parsing module comprises:
a sixth unit, configured to perform word segmentation and dependency syntax analysis on the first slot to obtain a syntax tree of the first slot, and determine a core word and a qualifier in the first slot according to the syntax tree;
and a seventh unit, configured to obtain, through part-of-speech tagging and entity tagging, an attribute of the core word and an attribute of the qualifier, and determine, through an attribute of each word in the first slot and/or a relationship between one word and other words in the first slot, a second slot corresponding to the word.
14. The human-machine dialog semantic parsing system of claim 8, further comprising a semantic update module for combining semantic representations of the demand information in the current round of dialog with semantic representations of demand information entered in previous rounds.
15. An in-vehicle human-machine dialogue method comprising the steps of the human-machine dialogue semantic parsing method according to any one of claims 1 to 7.
16. An in-vehicle human-machine dialog system comprising a human-machine dialog semantic parsing system as claimed in any one of claims 8 to 14.
17. A controller comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, is capable of carrying out the steps of the method of any one of claims 1 to 7.
18. A computer readable storage medium storing computer instructions which, when executed by a computer or processor, implement the steps of the method of any one of claims 1 to 7.
CN201810267052.3A 2018-03-28 2018-03-28 Man-machine conversation semantic analysis method and system, vehicle-mounted man-machine conversation method and system, controller and storage medium Active CN110309277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810267052.3A CN110309277B (en) 2018-03-28 2018-03-28 Man-machine conversation semantic analysis method and system, vehicle-mounted man-machine conversation method and system, controller and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810267052.3A CN110309277B (en) 2018-03-28 2018-03-28 Man-machine conversation semantic analysis method and system, vehicle-mounted man-machine conversation method and system, controller and storage medium

Publications (2)

Publication Number Publication Date
CN110309277A CN110309277A (en) 2019-10-08
CN110309277B true CN110309277B (en) 2023-08-18

Family

ID=68073813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810267052.3A Active CN110309277B (en) 2018-03-28 2018-03-28 Man-machine conversation semantic analysis method and system, vehicle-mounted man-machine conversation method and system, controller and storage medium

Country Status (1)

Country Link
CN (1) CN110309277B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110866090A (en) * 2019-11-14 2020-03-06 百度在线网络技术(北京)有限公司 Method, apparatus, electronic device and computer storage medium for voice interaction
CN111177310B (en) * 2019-12-06 2023-08-18 广西电网有限责任公司 Intelligent scene conversation method and device for power service robot
CN110931009A (en) * 2019-12-12 2020-03-27 贵州电力交易中心有限责任公司 System for rapidly improving conversation capacity of reception robot in electric power transaction hall
CN112543932A (en) * 2020-01-22 2021-03-23 华为技术有限公司 Semantic analysis method, device, equipment and storage medium
CN114186563A (en) * 2020-09-15 2022-03-15 华为技术有限公司 Electronic equipment and semantic analysis method and medium thereof and man-machine conversation system
CN113254610B (en) * 2021-05-14 2022-04-08 电子科技大学 Multi-round conversation generation method for patent consultation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004045900A (en) * 2002-07-12 2004-02-12 Toyota Central Res & Dev Lab Inc Voice interaction device and program
CN106156003A (en) * 2016-06-30 2016-11-23 北京大学 A kind of question sentence understanding method in question answering system
CN107315737A (en) * 2017-07-04 2017-11-03 北京奇艺世纪科技有限公司 A kind of semantic logic processing method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3400419A2 (en) * 2016-01-05 2018-11-14 Mobileye Vision Technologies Ltd. Trained navigational system with imposed constraints

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004045900A (en) * 2002-07-12 2004-02-12 Toyota Central Res & Dev Lab Inc Voice interaction device and program
CN106156003A (en) * 2016-06-30 2016-11-23 北京大学 A kind of question sentence understanding method in question answering system
CN107315737A (en) * 2017-07-04 2017-11-03 北京奇艺世纪科技有限公司 A kind of semantic logic processing method and system

Also Published As

Publication number Publication date
CN110309277A (en) 2019-10-08

Similar Documents

Publication Publication Date Title
CN110309277B (en) Man-machine conversation semantic analysis method and system, vehicle-mounted man-machine conversation method and system, controller and storage medium
CN109410927B (en) Voice recognition method, device and system combining offline command word and cloud analysis
CN111159385B (en) Template-free general intelligent question-answering method based on dynamic knowledge graph
CN109841212B (en) Speech recognition system and speech recognition method for analyzing commands with multiple intents
CN106601237B (en) Interactive voice response system and voice recognition method thereof
CN109284399B (en) Similarity prediction model training method and device and computer readable storage medium
CN106649825B (en) Voice interaction system and creation method and device thereof
CN112329467B (en) Address recognition method and device, electronic equipment and storage medium
CN109918673A (en) Semantic referee method, device, electronic equipment and computer readable storage medium
CN111081220B (en) Vehicle-mounted voice interaction method, full-duplex dialogue system, server and storage medium
CN111708869B (en) Processing method and device for man-machine conversation
CN108364646B (en) Embedded voice operation method, device and system
CN111062220B (en) End-to-end intention recognition system and method based on memory forgetting device
CN115064167B (en) Voice interaction method, server and storage medium
CN112836487A (en) Automatic comment method and device, computer equipment and storage medium
CN117216212A (en) Dialogue processing method, dialogue model training method, device, equipment and medium
CN112115244A (en) Dialogue interaction method and device, storage medium and electronic equipment
CN106705974B (en) Semantic role labeling and semantic extraction method for non-restricted path natural language
CN111737990A (en) Word slot filling method, device, equipment and storage medium
CN116959433B (en) Text processing method, device, electronic equipment and storage medium
CN116991875B (en) SQL sentence generation and alias mapping method and device based on big model
CN115017425B (en) Location search method, location search device, electronic device, and storage medium
CN108959387B (en) Information acquisition method and device
CN115952260A (en) Question and answer method and device in automobile field, electronic equipment and storage medium
CN106844448B (en) Chinese event factual identification method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200727

Address after: Susong Road West and Shenzhen Road North, Hefei Economic and Technological Development Zone, Anhui Province

Applicant after: Weilai (Anhui) Holding Co.,Ltd.

Address before: China Hong Kong

Applicant before: NIO NEXTEV Ltd.

TA01 Transfer of patent application right
CB02 Change of applicant information

Address after: 230601 Susong Road West, Shenzhen Road North, Hefei Economic and Technological Development Zone, Anhui Province

Applicant after: Weilai Holdings Ltd.

Address before: 230601 Susong Road West, Shenzhen Road North, Hefei Economic and Technological Development Zone, Anhui Province

Applicant before: Weilai (Anhui) Holding Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant