CN112256864B - Multi-intention recognition method, device, electronic equipment and readable storage medium - Google Patents

Multi-intention recognition method, device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112256864B
CN112256864B CN202011011080.2A CN202011011080A CN112256864B CN 112256864 B CN112256864 B CN 112256864B CN 202011011080 A CN202011011080 A CN 202011011080A CN 112256864 B CN112256864 B CN 112256864B
Authority
CN
China
Prior art keywords
semantic
vector
sub
intention
recognition
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
CN202011011080.2A
Other languages
Chinese (zh)
Other versions
CN112256864A (en
Inventor
周洪杰
李健
武卫东
陈明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sinovoice Technology Co Ltd
Original Assignee
Beijing Sinovoice Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sinovoice Technology Co Ltd filed Critical Beijing Sinovoice Technology Co Ltd
Priority to CN202011011080.2A priority Critical patent/CN112256864B/en
Publication of CN112256864A publication Critical patent/CN112256864A/en
Application granted granted Critical
Publication of CN112256864B publication Critical patent/CN112256864B/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/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)

Abstract

The embodiment of the application provides a method, a device, electronic equipment and a readable storage medium for multi-intention recognition, which aim at outputting sequences of standard questions and extended questions corresponding to a plurality of intentions contained in user input sentences in various application scenes. The method comprises the following steps: carrying out semantic recognition on a user input sentence to obtain a semantic vector corresponding to the user input sentence; identifying the intention contained in the semantic vector to obtain a semantic sub-vector sequence consisting of semantic sub-vectors corresponding to a plurality of disagreement pictures; and carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and a plurality of standard intention question vectors to obtain standard intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence, and outputting the standard intention question in sequence.

Description

Multi-intention recognition method, device, electronic equipment and readable storage medium
Technical Field
The embodiment of the application relates to the technical field of information processing, in particular to a method, a device, electronic equipment and a readable storage medium for multi-purpose identification.
Background
Along with the development of intelligent interactive systems, multi-intention recognition technology becomes the focus of attention, multi-intention recognition means that a plurality of intentions contained in user input sentences are recognized, and the accurate recognition of the plurality of intentions in the user input sentences is helpful for improving the efficiency of the intelligent interactive systems, providing more targeted services for users and optimizing the experience of the users. There are two types of intention recognition methods commonly used in the prior art, one is an encoder language model with a fixed number of classifications, and when a user inputs a sentence, n intentions with the highest confidence are taken as intention recognition results according to a fixed threshold. And the other is that the semantic vector model is combined with the similarity calculation module to carry out intention recognition, and when a user inputs a sentence, the intention with the highest similarity with the semantic vector of the user input sentence is taken as an intention recognition result.
The problem in the prior art is that the encoder language model using a fixed number of categories must know the set of intent categories in advance when training the model, and cannot be applied in a scenario where the number of intent categories cannot be determined in advance. The meaning vector model is combined with the similarity calculation module to perform meaning recognition, only the meaning with the highest similarity score can be selected as a meaning recognition result to be output, when the number of the meaning of user input is uncertain, only one meaning with the highest similarity of the meaning vector of the user input can still be output, and multi-meaning recognition of the sentence of the user input cannot be realized.
Disclosure of Invention
The embodiment of the application provides a method, a device, electronic equipment and a readable storage medium for multi-intention recognition, which aim at outputting sequences of all intents contained in user input sentences in various scenes.
An embodiment of the present application provides a method for multi-intent recognition, where the method includes:
Carrying out semantic recognition on a user input sentence to obtain a semantic vector corresponding to the user input sentence;
identifying the intention contained in the semantic vector to obtain a semantic sub-vector sequence consisting of semantic sub-vectors corresponding to a plurality of disagreement pictures;
performing similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and a plurality of standard intention question vectors to obtain a standard intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence;
and outputting the standard intention questions in sequence.
Optionally, performing semantic recognition on a user input sentence to obtain a semantic vector corresponding to the user input sentence, including:
language coding is carried out on the user input sentence, and a coded sentence is obtained;
inputting the encoded sentence into a pre-trained semantic model to obtain a semantic vector corresponding to the user input sentence.
Optionally, identifying the intention contained in the semantic vector to obtain a semantic sub-vector sequence composed of semantic sub-vectors corresponding to a plurality of disagreement graphs, including:
inputting the semantic vector into a pre-trained intention recognition sub-network;
The intention recognition sub-network generates a plurality of semantic sub-vectors corresponding to the disagreement graph according to the semantic vectors;
And arranging the semantic sub-vectors in sequence to obtain the semantic sub-vector sequence.
Optionally, performing similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and a plurality of standard intention question vectors to obtain a standard intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence, including:
inputting the semantic sub-vector sequence into a similarity calculation module;
And carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and each standard intention question vector, and taking the standard intention question vector with the highest similarity as the standard intention question vector corresponding to the semantic sub-vector.
Optionally, the semantic model and the intent recognition sub-network are trained according to the following steps:
collecting an intention sequence corresponding to the user input statement and the user input statement as a training sample;
adding the intention recognition sub-network to the rear end of the semantic vector model;
Inputting the training sample into the semantic vector model, and carrying out joint training on the semantic vector model and the intention recognition sub-network to obtain the trained semantic vector model and the trained intention recognition sub-network model.
A second aspect of an embodiment of the present application provides an apparatus for multi-purpose recognition, the apparatus including:
the semantic recognition module is used for carrying out semantic recognition on the user input sentence to obtain a semantic vector corresponding to the user input sentence;
the intention recognition module is used for recognizing the intention contained in the semantic vector to obtain a semantic sub-vector sequence consisting of semantic sub-vectors corresponding to a plurality of disagreement graphs;
the standard intention question determination module is used for carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and a plurality of standard intention question vectors to obtain a standard intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence;
And the standard intention question output module is used for outputting the standard intention questions in sequence.
Optionally, the semantic recognition module includes:
the input sentence coding sub-module is used for carrying out language coding on the user input sentence to obtain a coded sentence;
the semantic vector recognition sub-module is used for inputting the encoded sentence into a pre-trained semantic model to obtain a semantic vector corresponding to the user input sentence.
Optionally, the intention recognition module includes:
the semantic vector input sub-module is used for inputting the semantic vector into a pre-trained intention recognition sub-network;
the intention recognition sub-module is used for generating semantic sub-vectors corresponding to a plurality of disagreement graphs according to the semantic vectors by the intention recognition sub-network;
And the semantic sub-vector ordering sub-module is used for sequentially ordering the semantic sub-vectors to obtain the semantic sub-vector sequence.
Optionally, the standard intention question determination module includes:
the semantic sub-vector input module is used for inputting the semantic sub-vector sequence into the similarity calculation module;
And the standard intention question determination sub-module is used for carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and each standard intention question vector, and taking the standard intention question vector with the highest similarity as the standard intention question vector corresponding to the semantic sub-vector.
Optionally, the multi-intention recognition device further comprises a model training module, the model training module comprising:
The training sample collection sub-module is used for collecting the intention sequence corresponding to the user input statement and the user input statement as a training sample;
the model generation sub-module is used for adding the intention recognition sub-network to the rear end of the semantic vector model;
The model training sub-module is used for inputting the training sample into the semantic vector model, and carrying out joint training on the semantic vector model and the intention recognition sub-network to obtain the trained semantic vector model and the trained intention recognition sub-network model.
A third aspect of the embodiments of the present application provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method according to the first aspect of the present application.
A fourth aspect of the embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect of the application when the processor executes the computer program.
The method for identifying the multiple intentions of the user provided by the application comprises the steps of carrying out intent identification on user input sentences by using a pre-trained semantic identification model and an intent identification sub-network, outputting semantic vectors corresponding to the user input sentences by using the semantic identification model after the user input sentences are processed by the semantic identification model, wherein the semantic vectors are used as the input of the intent identification sub-network, the intent identification sub-network generates semantic sub-vectors with the same number according to the number of intentions in the input semantic vectors and forms a sequence, and after the semantic sub-vector sequence enters a similarity calculation module for calculation, the sequence outputs standard question sentences or extended question sentences corresponding to the user intentions.
According to the application, the user intention is output according to the sequence through the intention recognition sub-network, and then the standard question sentence or the extended question sentence corresponding to each user intention is obtained through the similarity calculation module, so that when a plurality of intentions are contained in the user input sentence, the standard question sentence and the extended question sentence corresponding to all intentions can be output in sequence.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a training flow diagram of a model for multi-intent recognition in accordance with one embodiment of the present application.
FIG. 2 is a flow chart of a method for multi-intent recognition in accordance with an embodiment of the present application.
Fig. 3 is a schematic diagram of an apparatus for multi-purpose recognition according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In the existing method for identifying intention based on neural network model, when the encoder language model with fixed classification number is used for multi-intention identification, N intentions with highest confidence are taken as the result of intention identification according to a fixed threshold, all intention classification sets are needed to be known during training, and the identification effect is poor in scenes with frequent change of the intention classification number. In the scheme, when single intention recognition is changed into multi-intention recognition, only the result with the highest score is selected as an intention recognition result, and all intentions cannot be recognized.
According to the application, the vector sequence corresponding to the user intention is output through the intention recognition sub-network, and then the standard question office or the extended question sentence is output through the similarity calculation sequence, so that the standard question sentence or the extended question sentence corresponding to all the intentions contained in the user input sentence can be output in sequence under various application scenes.
Referring to fig. 1, fig. 1 is a flowchart of a training method for semantic model and intention recognition sub-network according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
And S11, collecting an intention sequence corresponding to the user input statement and the user input statement as a training sample.
The purpose of user multi-intention recognition is to recognize the intention contained in the user input when the user inputs in various application scenes, for example, only if the intention of the user is accurately recognized in various scenes such as a question-answering system, a service system and the like, better service can be provided for the user, and the user experience is optimized. The user's intent may change in different scenes or in different time periods of the same scene, requiring the user intent recognition system to have the ability to accurately recognize the user's intent in different time periods of different scenes.
In this embodiment, the user intention recognition is implemented through a pre-trained model, and before training the model, training samples need to be collected, where the training samples include various user input sentences and intention sequences corresponding to the user input sentences. The user input sentence is a sentence with intention input by a user in various application scenes, and the intention sequence refers to a sequence formed by sequencing a plurality of intentions contained in the user input sentence, wherein the user sentence contains a plurality of intentions, and the sequence contains a plurality of elements. It should be noted that, in order to guarantee the performance of the model, attention should be paid to collecting training samples in multiple application scenarios as much as possible, and input sentences and corresponding intention sequences of the user are collected in different time periods. The intention sequence is obtained by extracting intention contained in the sentences after collecting the sentences input by the user, obtaining corresponding intention sentences and arranging the intention sentences in sequence.
In this embodiment, questions of a user in the network encyclopedia, questions of a user in a banking service page, questions of a user in an education and medical website may be collected, and intentions in the questions may be identified and arranged in sequence as training samples.
And S12, adding the intention recognition sub-network to the back end of the semantic vector model.
In this embodiment, the semantic vector model is a neural network model, which is used to perform semantic recognition on the user input sentence. The intent recognition sub-network is also a neural network model for intent recognition of input sentences and ordering of multiple intents.
In this embodiment, a neural network model with a multi-purpose recognition function is formed by a semantic vector model and an intent recognition sub-network, wherein the intent recognition sub-network is behind the semantic vector model, and the output of the semantic vector model is the input of the intent recognition sub-network.
In this embodiment, the semantic vector model and the intent recognition sub-network may be any neural network model for semantic recognition, which is not particularly limited herein. RNN, LSTM, CNN, etc. can be used as semantic recognition models and intent recognition subnetworks. For example, using an RNN network as a semantic recognition network, the RNN performs semantic recognition according to context association, which works well in sentence semantic recognition. The NNLM model is used as an intention recognition sub-network, and the NNLM model has good effect on semantic classification recognition tasks and is suitable for the intention classification sub-network.
And S13, inputting the training sample into the semantic vector model, and carrying out joint training on the semantic vector model and the intention recognition sub-network to obtain the trained semantic vector model and the trained intention recognition sub-network model.
In this embodiment, the training samples collected in S11 are used to train the semantic vector model and the intention recognition sub-network in S12, and the training samples are processed and input into the semantic vector model, so as to train the semantic vector model and the intention recognition sub-network.
In this embodiment, the semantic vector model and the intention recognition sub-network continuously adjust their own parameters in multiple rounds of training, and when the own parameters are adjusted to be optimal, a trained semantic vector model and intention recognition sub-network are obtained.
Through the training steps from S11 to S13, a trained semantic vector model and an intention recognition sub-network are obtained, a multi-intention recognition model is obtained, and the output of the semantic vector model is used as the input of the intention recognition sub-network and is used for carrying out intention classification on user input sentences and outputting sequences.
Referring to fig. 2, fig. 2 is a flowchart of a method for identifying multiple intents of a user according to an embodiment of the present application. As shown in fig. 2, the method comprises the steps of:
And S21, carrying out semantic recognition on the user input sentence to obtain a semantic vector corresponding to the user input sentence.
In this embodiment, the semantic recognition may be understood as that the trained model can "read and understand" the sentence input by the user, and in essence, after the semantic model is trained by a large number of samples, a key word or phrase with a main meaning in a sentence may be selected according to the samples during training. The semantic vector is a vector which is generated after the ordinary vector is processed by the semantic recognition model and contains important information in sentences.
The following is the step of converting the user input statement into a semantic vector:
s21-1, carrying out language coding on the sentence input by the user to obtain a coded sentence.
In this embodiment, the user inputs the sentence to be encoded, converts the text form into the vector form, and then inputs the sentence to the semantic model for semantic recognition.
In this embodiment, the method for encoding the user input sentence is not particularly limited herein, and for example, word2Vec or Sentence Embedding may be used to convert the user input sentence into a sentence vector.
S21-2, inputting the encoded sentence into a pre-trained semantic model to obtain a semantic vector corresponding to the user input sentence.
In this embodiment, after each sentence vector corresponding to each user input sentence enters the semantic model, the semantic recognition model generates a semantic vector corresponding to the sentence according to the sentence vector.
In this embodiment, after a sentence vector enters a semantic model, the semantic model analyzes the sentence vector according to the sentence vector feature arrangement learned during training, identifies the meaning of the sentence, and generates the semantic vector.
In this embodiment, for example, in RNN, the user input statement is "please ask the restaurant about how is being operated? Is it necessary to wear the bag being fitted? Is my pet able to take a meal hall? The semantic model identifies words such as restaurant, business, forward dress, pet and the like in the sentence, and generates semantic vectors corresponding to the words.
And S22, identifying the intention contained in the semantic vector to obtain a semantic sub-vector sequence consisting of a plurality of semantic sub-vectors corresponding to the disagreement graph.
In this embodiment, the semantic sub-vector is a vector generated according to the semantic vector in S21, and the semantic sub-vector sequence is formed by ordering a plurality of semantic sub-vectors.
The following is the step of generating a sequence of semantic sub-vectors intended for the recognition sub-network:
S22-1: and inputting the semantic vector into a pre-trained intention recognition sub-network.
The semantic vectors output by the semantic model enter a trained intention recognition word network, the intention recognition sub-network generates corresponding semantic sub-vectors according to the intention contained in the input semantic vectors, and a plurality of semantic sub-vectors are output in a sequence mode.
And S22-2, the intention recognition sub-network generates a plurality of semantic sub-vectors corresponding to the disagreement graphs according to the semantic vectors.
In this embodiment, the intent recognition sub-network analyzes a plurality of semantic vectors and semantic sub-vector sequences corresponding to the semantic vectors in the training process, so that a general rule of semantic vector intent classification can be learned, and when a new semantic vector is input, the new semantic vector can be processed according to the content of previous training.
S22-3: and arranging the semantic sub-vectors in sequence to obtain the semantic sub-vector sequence.
In this embodiment, all the sub-vectors in the sub-vector sequence are arranged according to the generating order, and the first generated sub-vector is the first sub-vector output in the sub-vector sequence. The most common problems in training are generated first, as the most common problems in general are also more important problems. The generation order rule may be set as needed, and is not limited here.
In this embodiment, for example, in NNLM, the semantic vector output by the semantic model includes key words such as "restaurant", "business", "forward-installed", "pet", etc., and when NNLM receives the semantic vector including the key words, it generates an intention question according to "restaurant", "business", and what is being done in the restaurant? "corresponding semantic sub-vectors, generating intent questions from" restaurant "," forward dress "whether the restaurant requires that forward dress must be worn? "corresponding semantic sub-vectors, generating intent questions from" restaurant "," pet "whether the restaurant can hold the pet? "corresponding semantic sub-vectors". And arranging the sub-vectors corresponding to the intention questions according to the generation sequence to obtain a sub-vector sequence and outputting the sub-vector sequence.
S23, carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and a plurality of standard intention question vectors to obtain a standard intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence.
In this embodiment, the intention question in the semantic sub-vector sequence output by the intention recognition sub-network usually has different word numbers, and the questions in different forms actually express a meaning, so that in order to normalize the same output of the question, the subsequent processing is convenient, a similarity calculation module is added after the semantic model and the intention recognition sub-network, and the similarity calculation module outputs a standard intention question corresponding to each semantic sub-vector.
The following is the step of outputting a standard intent question corresponding to each semantic sub-vector in the sequence of semantic sub-vectors:
s23-1: and inputting the semantic sub-vector sequence into a similarity calculation module.
S23-2: and carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and each standard intention question vector, and taking the standard intention question vector with the highest similarity as the standard intention question vector corresponding to the semantic sub-vector.
In this embodiment, standard questions under each intention category are stored in advance in the system, and have the characteristics of simplified word numbers as much as possible, simplicity, straightness, easy understanding and difficult ambiguity generation, and the standard questions are stored in the form of semantic vectors, and the semantic vectors corresponding to the standard questions are called when similarity calculation is performed.
In this embodiment, after a semantic sub-vector sequence enters a similarity calculation module, the similarity calculation module invokes a pre-stored standard intention question vector, performs similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and each standard intention question vector, and arranges the standard intention questions corresponding to each semantic sub-vector according to the sequence of the semantic sub-vectors in the semantic sub-vector sequence to obtain a sequence composed of standard question semantic vectors.
In this embodiment, the similarity calculation module may use calculation methods such as TF calculation, TFIDF coefficient calculation, word2Vec calculation, etc. for calculation, which are not limited herein.
In this embodiment, the similarity calculation module receives the intention question "how is the restaurant now open? "how does the restaurant need to wear a normal dress to go in? "," can the restaurant bring the pet into? When the corresponding semantic vector is, the standard question outputted according to the similarity calculation is "whether the restaurant is in business? "," whether the restaurant must be being filled? "," does the restaurant refuse the pet to go inside? ".
In another embodiment of the present application, the system stores semantic vectors corresponding to a plurality of extended questions of intent classification in advance, the extended questions mean questions having meanings similar to those of standard questions, and the questions can be obtained by extending standard questions, for example, an extended question of a standard question "whether the restaurant is open" may be "what is the restaurant open period? And outputting the extended question corresponding to the extended question semantic vector when the intended question semantic vector is more similar to the extended question semantic vector.
And S24, outputting the standard intention questions in sequence.
In this embodiment, after the standard question semantic vector sequence is obtained in S23, the standard question corresponding to the pre-stored standard question semantic vector is output according to the order of the standard question semantic vectors in the standard question semantic vector sequence.
By executing the multi-user intention recognition method from S21 to S24, carrying out semantic recognition on the user input sentence to obtain a semantic vector corresponding to the user input sentence, carrying out recognition on the intention contained in the semantic vector to obtain a semantic sub-vector sequence consisting of a plurality of semantic sub-vectors corresponding to different graphs, carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and a plurality of standard intention question vectors to obtain a standard intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence, and outputting the standard intention question in sequence. The method and the device can realize the purpose of outputting the standard question sentence and the extended question sentence which are corresponding to the intention and are contained in the user input sentence under various application scenes, are beneficial to providing more targeted service for the user, and are really needed by the user, so that the user experience is optimized.
Based on the same inventive concept, an embodiment of the present application provides a multi-purpose recognition apparatus. Referring to fig. 3, fig. 3 is a schematic diagram of an apparatus for multi-purpose recognition of a user according to an embodiment of the present application. As shown in fig. 3, the apparatus includes:
the semantic recognition module 301 is configured to perform semantic recognition on a user input sentence, so as to obtain a semantic vector corresponding to the user input sentence;
The intention recognition module 302 is configured to recognize an intention included in the semantic vector to obtain a semantic sub-vector sequence composed of semantic sub-vectors corresponding to a plurality of disagreeable graphs;
The standard intention question determination module 303 is configured to perform similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and a plurality of standard intention question vectors, so as to obtain a standard intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence;
and the standard intention question output module 304 is used for outputting the standard intention questions in sequence.
Optionally, the semantic recognition module includes:
the input sentence coding sub-module is used for carrying out language coding on the user input sentence to obtain a coded sentence;
the semantic vector recognition sub-module is used for inputting the encoded sentence into a pre-trained semantic model to obtain a semantic vector corresponding to the user input sentence.
Optionally, the intention recognition module includes:
the semantic vector input sub-module is used for inputting the semantic vector into a pre-trained intention recognition sub-network;
the intention recognition sub-module is used for generating semantic sub-vectors corresponding to a plurality of disagreement graphs according to the semantic vectors by the intention recognition sub-network;
And the semantic sub-vector ordering sub-module is used for sequentially ordering the semantic sub-vectors to obtain the semantic sub-vector sequence.
Optionally, the standard intention question determination module includes:
the semantic sub-vector input module is used for inputting the semantic sub-vector sequence into the similarity calculation module;
And the standard intention question determination sub-module is used for carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and each standard intention question vector, and taking the standard intention question vector with the highest similarity as the standard intention question vector corresponding to the semantic sub-vector.
Optionally, the multi-intention recognition device further comprises a model training module, the model training module comprising:
The training sample collection sub-module is used for collecting the intention sequence corresponding to the user input statement and the user input statement as a training sample;
the model generation sub-module is used for adding the intention recognition sub-network to the rear end of the semantic vector model;
The model training sub-module is used for inputting the training sample into the semantic vector model, and carrying out joint training on the semantic vector model and the intention recognition sub-network to obtain the trained semantic vector model and the trained intention recognition sub-network model.
Based on the same inventive concept, another embodiment of the present application provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for multi-purpose recognition of a user according to any of the above embodiments of the present application.
Based on the same inventive concept, another embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor performs the steps in the method for multi-purpose recognition of a user according to any one of the above embodiments of the present application.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or terminal device that comprises the element.
The above detailed description of the method, the device, the electronic equipment and the readable storage medium for multi-purpose recognition provided by the application applies specific examples to illustrate the principles and the implementation of the application, and the above examples are only used for helping to understand the method and the core idea of the application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (6)

1. A method of multi-intent recognition, comprising:
Carrying out semantic recognition on a user input sentence to obtain a semantic vector corresponding to the user input sentence;
identifying the intention contained in the semantic vector to obtain a semantic sub-vector sequence consisting of semantic sub-vectors corresponding to a plurality of disagreement pictures;
performing similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and a plurality of standard intention question vectors to obtain a standard intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence;
Outputting the standard intention questions in sequence;
carrying out semantic recognition on a user input sentence to obtain a semantic vector corresponding to the user input sentence, wherein the semantic recognition comprises the following steps:
language coding is carried out on the user input sentence, and a coded sentence is obtained;
inputting the encoded sentence into a pre-trained semantic model to obtain a semantic vector corresponding to the user input sentence;
Identifying the intention contained in the semantic vector to obtain a semantic sub-vector sequence consisting of a plurality of semantic sub-vectors corresponding to different graphs, wherein the semantic sub-vector sequence comprises the following components:
inputting the semantic vector into a pre-trained intention recognition sub-network;
The intention recognition sub-network generates a plurality of semantic sub-vectors corresponding to the disagreement graph according to the semantic vectors;
sequentially arranging the semantic sub-vectors to obtain the semantic sub-vector sequence;
Similarity calculation is carried out on each semantic sub-vector in the semantic sub-vector sequence and a plurality of standard intention question vectors to obtain a standard intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence, and the method comprises the following steps:
inputting the semantic sub-vector sequence into a similarity calculation module;
And carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and each standard intention question vector, and taking the standard intention question vector with the highest similarity as the standard intention question vector corresponding to the semantic sub-vector.
2. The method according to claim 1, wherein the method further comprises:
And carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and a plurality of expansion intention question vectors to obtain expansion intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence.
3. The method of claim 1, wherein the semantic model and the intent recognition sub-network are trained in accordance with the following steps:
collecting an intention sequence corresponding to the user input statement and the user input statement as a training sample;
Adding the intention recognition sub-network to the back end of the semantic model;
Inputting the training sample into the semantic model, and carrying out joint training on the semantic model and the intention recognition sub-network to obtain the trained semantic model and the trained intention recognition sub-network model.
4. An apparatus for multi-purpose recognition, the apparatus comprising:
the semantic recognition module is used for carrying out semantic recognition on the user input sentence to obtain a semantic vector corresponding to the user input sentence;
the intention recognition module is used for recognizing the intention contained in the semantic vector to obtain a semantic sub-vector sequence consisting of semantic sub-vectors corresponding to a plurality of disagreement graphs;
the standard intention question determination module is used for carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and a plurality of standard intention question vectors to obtain a standard intention question corresponding to each semantic sub-vector in the semantic sub-vector sequence;
The standard intention question output module is used for outputting the standard intention questions in sequence;
The semantic recognition module comprises:
the input sentence coding sub-module is used for carrying out language coding on the user input sentence to obtain a coded sentence;
The semantic vector recognition sub-module is used for inputting the encoded sentence into a pre-trained semantic model to obtain a semantic vector corresponding to the user input sentence;
the intention recognition module includes:
the semantic vector input sub-module is used for inputting the semantic vector into a pre-trained intention recognition sub-network;
the intention recognition sub-module is used for generating semantic sub-vectors corresponding to a plurality of disagreement graphs according to the semantic vectors by the intention recognition sub-network;
the semantic sub-vector ordering sub-module is used for sequentially ordering the semantic sub-vectors to obtain the semantic sub-vector sequence;
the standard intention question determination module comprises:
the semantic sub-vector input module is used for inputting the semantic sub-vector sequence into the similarity calculation module;
And the standard intention question determination sub-module is used for carrying out similarity calculation on each semantic sub-vector in the semantic sub-vector sequence and each standard intention question vector, and taking the standard intention question vector with the highest similarity as the standard intention question vector corresponding to the semantic sub-vector.
5. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 3.
6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 3 when executing the computer program.
CN202011011080.2A 2020-09-23 2020-09-23 Multi-intention recognition method, device, electronic equipment and readable storage medium Active CN112256864B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011011080.2A CN112256864B (en) 2020-09-23 2020-09-23 Multi-intention recognition method, device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011011080.2A CN112256864B (en) 2020-09-23 2020-09-23 Multi-intention recognition method, device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112256864A CN112256864A (en) 2021-01-22
CN112256864B true CN112256864B (en) 2024-05-14

Family

ID=74231940

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011011080.2A Active CN112256864B (en) 2020-09-23 2020-09-23 Multi-intention recognition method, device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112256864B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843897A (en) * 2016-03-23 2016-08-10 青岛海尔软件有限公司 Vertical domain-oriented intelligent question and answer system
CN107704563A (en) * 2017-09-29 2018-02-16 广州多益网络股份有限公司 A kind of question sentence recommends method and system
CN109543012A (en) * 2018-10-25 2019-03-29 苏宁易购集团股份有限公司 A kind of user's intension recognizing method and device based on Word2Vec and RNN
CN110069709A (en) * 2019-04-10 2019-07-30 腾讯科技(深圳)有限公司 Intension recognizing method, device, computer-readable medium and electronic equipment
CN110210036A (en) * 2019-06-05 2019-09-06 上海云绅智能科技有限公司 A kind of intension recognizing method and device
CN110232114A (en) * 2019-05-06 2019-09-13 平安科技(深圳)有限公司 Sentence intension recognizing method, device and computer readable storage medium
CN110532558A (en) * 2019-08-29 2019-12-03 杭州涂鸦信息技术有限公司 A kind of more intension recognizing methods and system based on the parsing of sentence structure deep layer
CN110928997A (en) * 2019-12-04 2020-03-27 北京文思海辉金信软件有限公司 Intention recognition method and device, electronic equipment and readable storage medium
CN111081219A (en) * 2020-01-19 2020-04-28 南京硅基智能科技有限公司 End-to-end voice intention recognition method
CN111159332A (en) * 2019-12-03 2020-05-15 厦门快商通科技股份有限公司 Text multi-intention identification method based on bert
CN111444324A (en) * 2020-03-05 2020-07-24 中国平安人寿保险股份有限公司 Sentence-break-based multi-purpose recognition method, device, equipment and storage medium
CN111475632A (en) * 2020-04-09 2020-07-31 深圳追一科技有限公司 Question processing method and device, electronic equipment and storage medium
CN111597320A (en) * 2020-05-26 2020-08-28 成都晓多科技有限公司 Intention recognition device, method, equipment and storage medium based on hierarchical classification
KR20200103165A (en) * 2019-02-12 2020-09-02 주식회사 자이냅스 A program of classificating semantic relations between sentences for providing conversation services
KR20200103156A (en) * 2019-02-12 2020-09-02 주식회사 자이냅스 A program of learning semantic relations between sentences for providing conversation services
CN111683175A (en) * 2020-04-22 2020-09-18 北京捷通华声科技股份有限公司 Method, device, equipment and storage medium for automatically answering incoming call

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843897A (en) * 2016-03-23 2016-08-10 青岛海尔软件有限公司 Vertical domain-oriented intelligent question and answer system
CN107704563A (en) * 2017-09-29 2018-02-16 广州多益网络股份有限公司 A kind of question sentence recommends method and system
CN109543012A (en) * 2018-10-25 2019-03-29 苏宁易购集团股份有限公司 A kind of user's intension recognizing method and device based on Word2Vec and RNN
KR20200103165A (en) * 2019-02-12 2020-09-02 주식회사 자이냅스 A program of classificating semantic relations between sentences for providing conversation services
KR20200103156A (en) * 2019-02-12 2020-09-02 주식회사 자이냅스 A program of learning semantic relations between sentences for providing conversation services
CN110069709A (en) * 2019-04-10 2019-07-30 腾讯科技(深圳)有限公司 Intension recognizing method, device, computer-readable medium and electronic equipment
CN110232114A (en) * 2019-05-06 2019-09-13 平安科技(深圳)有限公司 Sentence intension recognizing method, device and computer readable storage medium
CN110210036A (en) * 2019-06-05 2019-09-06 上海云绅智能科技有限公司 A kind of intension recognizing method and device
CN110532558A (en) * 2019-08-29 2019-12-03 杭州涂鸦信息技术有限公司 A kind of more intension recognizing methods and system based on the parsing of sentence structure deep layer
CN111159332A (en) * 2019-12-03 2020-05-15 厦门快商通科技股份有限公司 Text multi-intention identification method based on bert
CN110928997A (en) * 2019-12-04 2020-03-27 北京文思海辉金信软件有限公司 Intention recognition method and device, electronic equipment and readable storage medium
CN111081219A (en) * 2020-01-19 2020-04-28 南京硅基智能科技有限公司 End-to-end voice intention recognition method
CN111444324A (en) * 2020-03-05 2020-07-24 中国平安人寿保险股份有限公司 Sentence-break-based multi-purpose recognition method, device, equipment and storage medium
CN111475632A (en) * 2020-04-09 2020-07-31 深圳追一科技有限公司 Question processing method and device, electronic equipment and storage medium
CN111683175A (en) * 2020-04-22 2020-09-18 北京捷通华声科技股份有限公司 Method, device, equipment and storage medium for automatically answering incoming call
CN111597320A (en) * 2020-05-26 2020-08-28 成都晓多科技有限公司 Intention recognition device, method, equipment and storage medium based on hierarchical classification

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于问句语料库的受限领域自动应答系统;余正涛等;《计算机工程与应用》;20031221(第36期);全文 *
结合句法特征和卷积神经网络的多意图识别模型;杨春妮等;《计算机应用》;20180710;第38卷(第7期);全文 *

Also Published As

Publication number Publication date
CN112256864A (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN110427617B (en) Push information generation method and device
CN106328147B (en) Speech recognition method and device
CN110097085B (en) Lyric text generation method, training method, device, server and storage medium
CN110516253B (en) Chinese spoken language semantic understanding method and system
CN108920648B (en) Cross-modal matching method based on music-image semantic relation
Chi et al. Speaker role contextual modeling for language understanding and dialogue policy learning
CN115662435B (en) Virtual teacher simulation voice generation method and terminal
CN113705315B (en) Video processing method, device, equipment and storage medium
CN112463942A (en) Text processing method and device, electronic equipment and computer readable storage medium
CN114911932A (en) Heterogeneous graph structure multi-conversation person emotion analysis method based on theme semantic enhancement
CN110942774A (en) Man-machine interaction system, and dialogue method, medium and equipment thereof
CN113505198A (en) Keyword-driven generating type dialogue reply method and device and electronic equipment
CN114339450A (en) Video comment generation method, system, device and storage medium
CN112199486A (en) Task type multi-turn conversation method and system for office scene
CN111563161A (en) Sentence recognition method, sentence recognition device and intelligent equipment
CN112256864B (en) Multi-intention recognition method, device, electronic equipment and readable storage medium
CN111680514B (en) Information processing and model training method, device, equipment and storage medium
CN112686059B (en) Text translation method, device, electronic equipment and storage medium
CN114358019A (en) Method and system for training intention prediction model
CN113763934A (en) Training method and device of audio recognition model, storage medium and electronic equipment
CN114492462A (en) Dialogue generation method and system based on emotion analysis and generation type confrontation network
CN112686060A (en) Text translation method and device, electronic equipment and storage medium
CN111428005A (en) Standard question and answer pair determining method and device and electronic equipment
CN111046674B (en) Semantic understanding method and device, electronic equipment and storage medium
CN113421551B (en) Speech recognition method, speech recognition device, computer readable medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant