CN110069709B - Intention recognition method, device, computer readable medium and electronic equipment - Google Patents
Intention recognition method, device, computer readable medium and electronic equipment Download PDFInfo
- Publication number
- CN110069709B CN110069709B CN201910284684.5A CN201910284684A CN110069709B CN 110069709 B CN110069709 B CN 110069709B CN 201910284684 A CN201910284684 A CN 201910284684A CN 110069709 B CN110069709 B CN 110069709B
- Authority
- CN
- China
- Prior art keywords
- query
- intention
- query language
- intent
- word
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application provides an intention recognition method, an intention recognition device, a computer readable medium and electronic equipment. The intention recognition method comprises the following steps: acquiring a query language input by a user; acquiring word vector features of the query language according to the query language, and acquiring discrete features associated with the query language; generating a multi-channel feature vector of the query language according to the word vector features and the discrete features; and inputting the multichannel feature vector into an intention recognition model to obtain intention information output by the intention recognition model. The technical scheme of the embodiment of the application can ensure the accuracy of intention recognition through the multichannel feature vector.
Description
Technical Field
The present application relates to the field of computers and communication technologies, and in particular, to an intention recognition method, an intention recognition device, a computer readable medium, and an electronic device.
Background
The intention recognition refers to a process of analyzing and understanding a query search string input by a user and analyzing the intention of the user so as to help meet the search requirement of the user. The accuracy of intention recognition influences the result of response to the query, however, the intention recognition scheme proposed in the related art often has the problem of low accuracy of intention recognition.
Disclosure of Invention
The embodiment of the application provides an intention recognition method, an intention recognition device, a computer readable medium and electronic equipment, and further can improve the accuracy of intention recognition at least to a certain extent.
Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the practice of the application.
According to an aspect of an embodiment of the present application, there is provided an intention recognition method including: acquiring a query language input by a user; acquiring word vector features of the query language according to the query language, and acquiring discrete features associated with the query language; generating a multi-channel feature vector of the query language according to the word vector features and the discrete features; and inputting the multichannel feature vector into an intention recognition model to obtain intention information output by the intention recognition model.
According to an aspect of an embodiment of the present application, there is provided an intention recognition apparatus including: the first acquisition unit is used for acquiring a query language input by a user; the second acquisition unit is used for acquiring word vector features of the query language according to the query language and acquiring discrete features associated with the query language; the first generation unit is used for generating a multichannel feature vector of the query language according to the word vector features and the discrete features; and the processing unit is used for inputting the multichannel feature vector into an intention recognition model to obtain intention information output by the intention recognition model.
In some embodiments of the present application, based on the foregoing scheme, the second obtaining unit is configured to: acquiring historical user feedback information associated with the query language; according to the historical user feedback information, counting the distribution condition of each historical user feedback information associated with the query language; and generating the discrete features according to the distribution condition of the feedback information of each historical user.
In some embodiments of the present application, based on the foregoing scheme, the second obtaining unit is configured to: identifying whether the intent of the query is a precise intent or a ambiguous intent; discrete features of the query are generated based on whether the intent of the query is a precise intent or a ambiguous intent.
In some embodiments of the present application, based on the foregoing, the second obtaining unit is configured to identify whether the intention of the query term is a precise intention or a ambiguous intention according to at least one of the following factors: text similarity between the query and predetermined intent information, semantic similarity between the query and predetermined intent information, and distribution of historical user feedback information associated with the query.
In some embodiments of the present application, based on the foregoing scheme, the second obtaining unit is configured to: word segmentation processing is carried out on the query language to obtain at least one target word; carrying out importance analysis on the at least one target word to obtain an importance score of each target word; and generating discrete features of the query according to the importance scores of the target words.
In some embodiments of the present application, based on the foregoing, the second obtaining unit is configured to perform importance analysis on each of the target words by at least one of the following factors: the part-of-speech analysis results of each target word, the dependency syntax analysis results between each target word and other target words in the query word, the compactness analysis results of each target word, the reverse document frequency of each target word, whether each target word is a set entity word, and whether each target word is a stop word.
In some embodiments of the present application, based on the foregoing scheme, the second obtaining unit is configured to: and inputting the query language into a pre-trained word vector extraction model to obtain word vector features output by the word vector extraction model.
In some embodiments of the present application, based on the foregoing scheme, the second obtaining unit is configured to: extracting word vector features of the query language through a feature extraction network, wherein the feature extraction network extracts the word vector features of the query language through convolution kernels with different sizes respectively.
In some embodiments of the application, based on the foregoing, the intention recognition apparatus further includes: the third acquisition unit is used for acquiring a query language sample; a fourth obtaining unit, configured to obtain, according to the query term sample, a word vector feature of the query term sample and a discrete feature associated with the query term sample; the second generation unit is used for generating a training sample according to the word vector characteristics of the query language sample and the discrete characteristics associated with the query language sample; and the training unit is used for training the intention recognition model based on the training sample.
In some embodiments of the present application, based on the foregoing, the intent recognition model includes a multi-task machine learning model for outputting multi-level intents, the multi-task machine learning model including fully connected layers and output layers corresponding to respective levels of intents, wherein the output layer corresponding to a first intention in the multi-level intention information is connected to the fully connected layer corresponding to a second intention, and a hierarchy of the first intention is higher than a hierarchy of the second intention.
In some embodiments of the application, based on the foregoing, the intent recognition model comprises a multi-tasking machine learning model having a loss function of:
Loss=∑(c i ×loss i )+λ
wherein Loss represents a Loss function of the multitasking machine learning model; loss of loss i Representing a loss function corresponding to the i-th level intention; c i Is a super parameter and is used for representing the importance of a loss function corresponding to the ith level intention; lambda represents a regularization term.
In some embodiments of the application, based on the foregoing, the intent recognition model includes a multitasking machine learning model, the intent recognition device further including: the response unit is used for responding to the query language through the lowest-level intention in the intention information after the intention information output by the intention recognition model is obtained, so as to obtain a response result; and if the response result can not meet the response requirement, responding to the query language sequentially through the intention of the upper layer until the obtained response result meets the response requirement.
According to an aspect of an embodiment of the present application, there is provided a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements the intention recognition method as described in the above embodiment.
According to an aspect of an embodiment of the present application, there is provided an electronic apparatus including: one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the intent recognition method as described in the above embodiments.
According to the technical scheme provided by the embodiments of the application, the word vector characteristics of the query language and the discrete characteristics associated with the query language are obtained, the multi-channel characteristic vector of the query language is generated according to the word vector characteristics and the discrete characteristics, and the multi-channel characteristic vector is input into the intention recognition model to obtain intention information, so that the word vector characteristics of the query language are considered when the intention of the query language is recognized, the discrete characteristics associated with the query language are considered, and the accuracy of the intention recognition can be ensured through the multi-channel characteristic vector.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the drawings:
FIG. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of an embodiment of the application may be applied;
FIG. 2 illustrates a flow chart of an intent recognition method in accordance with an embodiment of the present application;
FIG. 3 illustrates a flow chart for obtaining discrete features associated with a query in accordance with one embodiment of the present application;
FIG. 4 illustrates a flow chart for obtaining discrete features associated with a query in accordance with one embodiment of the present application;
FIG. 5 illustrates a flow chart for obtaining discrete features associated with a query in accordance with one embodiment of the present application;
FIG. 6 illustrates a training flow diagram of an intent recognition model in accordance with one embodiment of the present application;
FIG. 7 shows a schematic diagram of the structure of an intent recognition model in accordance with an embodiment of the application;
FIG. 8 shows a flow chart of an intent recognition process in accordance with one embodiment of the present application;
FIG. 9 shows a schematic diagram of search results based on intent recognition in the related art;
FIG. 10 illustrates a schematic diagram of intent recognition results in accordance with one embodiment of the present application;
FIG. 11 illustrates a search result schematic based on intent recognition in accordance with one embodiment of the present application;
FIG. 12 is a diagram showing the comparative effect between the intent identified by the related art and the intent identified by the present solution;
FIG. 13 shows a block diagram of an intent recognition device in accordance with an embodiment of the application;
fig. 14 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the application may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the application.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of an embodiment of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices (such as one or more of the smart phone 101, tablet 102, and portable computer 103 shown in fig. 1, but of course desktop computers, etc.), a network 104, and a server 105. The network 104 is the medium used to provide communication links between the terminal devices and the server 105. The network 104 may include various connection types, such as wired communication links, wireless communication links, and the like.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 105 may be a server cluster formed by a plurality of servers.
In one embodiment of the present application, a user may input a query through a terminal device, which may be, for example, a sentence searching for an object (e.g., an application, a person name, etc.). After obtaining the query language input by the user, the server 105 may obtain the word vector feature of the query language according to the query language, and obtain the discrete feature associated with the query language (such as the search behavior feedback feature of other users, the importance score of each word after the word segmentation of the query language, etc.), and then generate the multi-channel feature vector of the query language according to the word vector feature and the discrete feature, and input the multi-channel feature vector to the intent recognition model, so as to obtain the intent information output by the intent recognition model. Therefore, in the embodiment of the application, not only the word vector characteristics of the query language are considered when the intention of the query language is recognized, but also the discrete characteristics associated with the query language can be considered, so that the accuracy of the intention recognition can be ensured through the multi-channel characteristic vector.
In one embodiment of the present application, after identifying the intent information of the query, the server 105 may respond to the query of the user according to the intent information, and further return the response result to the terminal device, so that the terminal device feeds back the response result to the user.
It should be noted that, the method for identifying intent provided in the embodiment of the present application is generally executed by the server 105, and accordingly, the intent identifying device is generally disposed in the server 105. However, in other embodiments of the present application, the terminal device may also have a similar function to the server, so as to perform the intention recognition method provided by the embodiments of the present application.
The implementation details of the technical scheme of the embodiment of the application are described in detail below:
fig. 2 illustrates a flowchart of an intent recognition method according to an embodiment of the present application, which may be performed by a server, which may be the server illustrated in fig. 1. Referring to fig. 2, the intention recognition method at least includes steps S210 to S240, and is described in detail as follows:
in step S210, a query input by a user is acquired.
In one embodiment of the application, a query term may refer to any content that can be used as a reference for information query, retrieval, or search, and the query term may be text content, which may include one or more words, symbols, or a combination thereof. For example, a query may be a sentence that searches for an object (e.g., an application, a person name, etc.). The query language input by the user can be input through voice or input through input devices such as a keyboard, a touch screen and the like.
In step S220, word vector features of the query are obtained from the query, and discrete features associated with the query are obtained.
In one embodiment of the application, the query language can be input into a pre-trained word vector extraction model, so as to obtain the word vector characteristics output by the word vector extraction model. The pre-trained word vector extraction model may be fasttet (an open-source word vector and text classification tool) model, word2vec (a model for generating word vectors), gloVe (Global Vectors for Word Representation) model, and the like. The GloVe model is a word characterization tool based on global word frequency statistics that can represent a word as a vector of real numbers that captures some semantic characteristics between words, such as similarity, analogies, etc.
In one embodiment of the application, the word vector features of the query may be extracted through a feature extraction network, where the feature extraction network extracts the word vector features of the query through convolution kernels of a plurality of different sizes, respectively. Specifically, the feature extraction network may use convolution kernels of different sizes to extract the word vector features of the query language at the same time, so that the word vector features extracted by the convolution kernels of different sizes may be obtained, for example, 1×1, 2×2, 3×3, and 4×4 convolution kernels may be used to extract the word vector features of the query language respectively. The feature extraction network may be a convolutional neural network.
In one embodiment of the present application, as shown in fig. 3, the process of acquiring the discrete type feature associated with the query term may include the following steps S310 to S330:
in step S310, historical user feedback information associated with the query is obtained.
In one embodiment of the application, historical user feedback information associated with the query is used to represent historical user feedback on query response information. For example, the query is a statement that searches for an application, and the historical user feedback information associated with the query may be information of the application that the user downloaded based on the query response information. More specifically, assuming that the query is "game suitable for girls", the user may download game 1, game 2, game 3, etc. after searching according to the query, wherein the specific game downloaded by the user is feedback information of the query "game suitable for girls".
In step S320, according to the historical user feedback information, the distribution of the historical user feedback information associated with the query is counted.
In one embodiment of the present application, the statistics of the distribution of the feedback information of each historical user associated with the query term is that of the feedback information of the user aiming at the response information of the query term. For example, the query is a sentence of the search application, and the distribution of the statistics of the respective historical user feedback information associated with the query may be the distribution of the application downloaded by the statistics user based on the response information of the query. More specifically, assuming that the query is "game suitable for girl", the user may download game 1, game 2, game 3, and the like after searching according to the query, the download duty ratio of game 1, the download duty ratio of game 2, the download duty ratio of game 3, and the like may be counted.
In step S330, the discrete feature is generated according to the distribution of the feedback information of each historical user.
In one embodiment of the present application, feature vectors may be generated as discrete features based on the distribution of the individual historical user feedback information.
In one embodiment of the present application, as shown in fig. 4, the process of obtaining discrete type features associated with a query may include the following steps S410 and S420:
in step S410, whether the intention of the query is a precise intention or a fuzzy intention is identified.
In one embodiment of the application, a precise intent is to indicate that there are explicit objects, and a ambiguous intent is to indicate that there are no explicit objects. For example, the query is "game suitable for girl", and since the query does not explicitly download the game, the intent of the query may be a fuzzy intent; while the query term "the king' is glowing, as it is specific to a particular game, the intent of the query term may be a precise intent.
In one embodiment of the application, whether the intent of the query is a precise intent or a ambiguous intent may be identified based on at least one of the following factors: text similarity between the query and the predetermined intent information, semantic similarity between the query and the predetermined intent information, distribution of historical user feedback information associated with the query.
In one embodiment of the present application, if whether the intention of the query is a precise intention or a fuzzy intention is recognized according to the text similarity between the query and the predetermined intention information, it may be determined that the intention of the query is a precise intention when the text similarity is higher than a set threshold. For example, the query is "download jotting", and since the text similarity between the query and the predetermined intention information "jotting" is high, it can be determined that the intention of the query is a precise intention.
In one embodiment of the present application, if whether the intention of the query is a precise intention or a fuzzy intention is identified according to the semantic similarity between the query and predetermined intention information, it may be determined that the intention of the query is a precise intention when the semantic similarity is higher than a set threshold. For example, the query is "download button", and since the semantic similarity between the query and the predetermined intention information "QQ" is high, it can be determined that the intention of the query is a precise intention.
In one embodiment of the present application, if the intention of the query is a precise intention or a fuzzy intention is identified according to the distribution condition of the historical user feedback information associated with the query, the intention of the query can be determined to be a precise intention when the occupation ratio of a certain historical user feedback information is high; if the duty ratio of the historical user feedback information is not different, the intention of the query language can be determined to be a fuzzy intention. For example, if the query is "queen" and the ratio of "queen" apps downloaded by the user after searching according to the query is 80%, the ratio of "queen" apps downloaded by the user is 11%, and the ratio of other applications downloaded is 9%, then the query can be considered to be a precise intention for downloading the "queen" apps because the ratio of game "queen" apps downloaded by the user is high.
In one embodiment of the present application, if the intention of the query is a precise intention or a fuzzy intention is identified according to two factors in the distribution of the historical user feedback information associated with the query, which are the text similarity between the query and the predetermined intention information, the semantic similarity between the query and the predetermined intention information, the query's intention is determined by integrating the identification results of the two factors, for example, if the identification results of the two factors are both precise intention, the intention of the query is determined to be a precise intention; if the recognition results of the two factors are fuzzy intentions, determining that the intention of the query language is fuzzy intention; if the recognition results of the two factors are different, the intention of the query language can be determined according to the possibility of the recognition results corresponding to the two factors. If the intention of the query is determined to be a precise intention according to the text similarity between the query and the predetermined intention information, and the intention of the query is determined to be a fuzzy intention according to the semantic similarity between the query and the predetermined intention information, if the text similarity between the query and the predetermined intention information is close to 1, the intention of the query can be determined to be a precise intention.
In one embodiment of the present application, if the intention of the query is a precise intention or a fuzzy intention is identified according to all factors in the distribution of the historical user feedback information associated with the query, which are the text similarity between the query and the predetermined intention information, the semantic similarity between the query and the predetermined intention information, the intention of the query is determined by integrating the identification results of all factors, for example, if more than half of the identification results of the factors are precise intention, the intention of the query is determined to be the precise intention; if more than half of the recognition results of the factors are fuzzy intentions, determining that the intention of the query is fuzzy intention.
With continued reference to FIG. 4, in step S420, discrete features of the query are generated based on whether the intent of the query is a precise intent or a ambiguous intent.
In one embodiment of the application, whether the intent of the query is a precise intent or a fuzzy intent may be used as a feature vector to derive discrete features.
In one embodiment of the present application, as shown in fig. 5, the process of acquiring the discrete type feature associated with the query term may include the following steps S510 to S530:
In step S510, the query is subjected to word segmentation to obtain at least one target term.
In one embodiment of the application, the query term may be processed based on a word segmentation method of string matching, an understanding-based word segmentation method, or a statistical-based word segmentation method.
In step S520, importance analysis is performed on the at least one target word, so as to obtain an importance score of each target word.
In one embodiment of the application, because the importance degrees of different words in a sentence are different, the importance score of each word for understanding the query language can be determined by carrying out importance analysis on the words obtained after the query language is segmented.
In one embodiment of the application, the importance analysis of each target word may be performed by at least one of the following factors: the part-of-speech analysis results of each target word, the dependency syntax analysis results between each target word and other target words in the query word, the compactness analysis results of each target word, the reverse document frequency of each target word, whether each target word is a set entity word, and whether each target word is a stop word.
In one embodiment of the present application, the above factors may be used as features to generate feature vectors, and then a machine learning model is trained, so that importance scores of the words may be determined through the trained machine learning model.
In one embodiment of the present application, the above-mentioned factors may be quantized, and weights of the factors may be set, so as to determine importance scores of the words based on the weights of the factors and the quantization results of the factors.
In step S530, discrete features of the query are generated according to the importance scores of the respective target terms.
In one embodiment of the application, feature vectors may be generated as discrete features based on the importance scores of the individual target terms.
With continued reference to FIG. 2, in step S230, a multi-channel feature vector for the query term is generated from the word vector features and the discrete features.
In one embodiment of the present application, a plurality of channel feature vectors may be generated with each word vector feature as a channel feature and each discrete feature as a channel feature.
In step S240, the multi-channel feature vector is input to an intention recognition model, so as to obtain intention information output by the intention recognition model.
In one embodiment of the present application, the intention recognition model is trained in advance, and the training process thereof may be as shown in fig. 6, and includes the following steps:
in step S610, a query term sample is obtained.
Step S620, obtaining, according to the query language sample, a word vector feature of the query language sample and a discrete feature associated with the query language sample.
In one embodiment of the present application, the process of obtaining the word vector feature of the query term sample and the discrete feature associated with the query term sample is the same as the process of obtaining the word vector feature of the query term and the discrete feature associated with the query term, and will not be described in detail.
Step S630, generating a training sample according to the word vector feature of the query language sample and the discrete feature associated with the query language sample.
In one embodiment of the present application, each word vector feature of the query term sample may be used as a feature of one channel, each discrete feature of the query term sample may be used as a feature of one channel to generate a plurality of channel feature vectors, and then the intention information of the query term sample may be used as a tag to generate a training sample.
Step S640, training the intent recognition model based on the training sample.
In one embodiment of the present application, the intent recognition model may be a multi-task machine learning model for outputting multi-level intents, the multi-task machine learning model including fully connected layers corresponding to each level of intents and output layers, wherein the output layer corresponding to a first intention in the multi-level intention information is connected to the fully connected layer corresponding to a second intention, and a level of the first intention is higher than a level of the second intention. According to the technical scheme, the output layer corresponding to the intention of the higher level is connected to the full connection layer corresponding to the intention of the lower level, so that the supervision information of the intention label of the higher level can well assist fitting learning of the intention label of the lower level, and further accuracy of intention recognition can be improved. For example, if the query is the statement "download King glory" of the search application, then the primary intent may be "game", the secondary intent may be "game-athletic class", and the tertiary intent may be a specific application name.
In one embodiment of the application, the intent recognition model comprises a multi-tasking machine learning model having a loss function of:
Loss=∑(c i ×loss i )+λ
Wherein Loss represents a Loss function of the multi-task machine learning model; loss of loss i Representing a loss function corresponding to the i-th level intention; c i Is a super parameter and is used for representing the importance of a loss function corresponding to the ith level intention; lambda represents a regularization term.
The loss function constructed in the embodiment is a multi-label classification loss function, so that multi-intention distribution of a user can be better captured, and accuracy of intention recognition is improved.
In one embodiment of the present application, in the case where the intent recognition model includes a multi-task machine learning model, after the intent information output by the intent recognition model is obtained, a response result may be obtained by responding to the query language with the intent of the lowest level in the intent information; if the response result can not meet the response requirement, the query language is sequentially responded through the intention of the upper layer until the obtained response result meets the response requirement.
In one embodiment of the application, since the lowest level of intent is the finest intent, the lowest level of intent may be preferentially employed in response to a query entered by a user. The response requirements may be the number of response results according to the query recall, the satisfaction of the user with the response results according to the query recall, and the like. For example, if the primary intention output according to the query is "game", the secondary intention is "game-competitive", and the tertiary intention is a specific application name, if the number of applications recalled according to the tertiary intention is small or cannot meet the requirement of the user, recall can be continued through the secondary intention "game-competitive", and if the number of applications recalled is still small or cannot meet the requirement of the user, recall is performed through the intention "game".
The technical scheme of the embodiment of the application ensures that not only the word vector characteristics of the query language are considered when the intention of the query language is recognized, but also the discrete characteristics associated with the query language are considered, and further the accuracy of the intention recognition can be ensured through the multi-channel characteristic vector.
The following describes in detail the technical solution of the embodiment of the present application, taking a query (query) input by a user to search an application program as an example:
in one embodiment of the present application, the process of intent recognition is mainly a process of intent multi-classification, and after the query input by the user is obtained, the recognized intent tag is obtained by processing the query. Specifically, the technical scheme of the embodiment of the application mainly comprises a plurality of parts including multichannel feature fusion, model training and model prediction, and the following parts are respectively described in detail.
1. Multichannel feature fusion:
in one embodiment of the present application, the multi-channel feature fusion mainly fuses an embedded vector feature, a user-side search behavior feedback feature, and a query-side related feature.
In one embodiment of the present application, the Embedding vector feature may be obtained by:
(1) The word vectors extracted by the pretrained fasttet model are adopted, and a CBOW (continuous bag of words) model of the fasttet model is a supervised learning model, so that more reasonable query vector representation is obtained through supervised pretraining, and the accuracy of meaning label classification is higher.
In one embodiment of the present application, the parameters adopted by the fasttext model may be as follows: the minimum word frequency may be 5; the word vector dimension may be 128; the number of iteration cycles may be 150; the training window size may be 5; n-gram (n-gram) may be set to 4; and a negative sampling (negative sampling) algorithm can be used to construct a loss function to ensure that the resulting pre-training word vector better represents the term of the query (representing words, terms), accelerating the convergence of the training network.
(2) Randomly initializing word vectors, performing fine-tune (adjustment) along with training of a convolutional neural network, capturing local information of a plurality of different n-grams in a query by adopting convolution kernels with different sizes (such as 1×1, 2×2, 3×3 and 4×4) at the same time, and further abstracting high-order vector representation of a word- (word-) sentence by training of the convolutional neural network unlike a common shallow neural network.
In addition, word bag models such as word2vec, gloVe, and the like can also be used to obtain word vectors for queries in one embodiment of the application.
In one embodiment of the present application, the user-side search behavior feedback feature mainly includes a download distribution condition corresponding to the query. Specifically, each query has a different download distribution for all app_ids (application names), and the download amount for each app can be normalized to the download duty ratio, so a query-app download distribution multi-hot feature can be constructed. For example, the download duty cycle distribution of query "prince glory" is: "King glory: 0.8496"," prince glory assistant: 0.1297"," edge of soul: 0.0025".
In one embodiment of the present application, the query-side related features may include: features such as accuracy and fuzzy identification of the query, term importance after the query word segmentation, and the like.
In one embodiment of the application, the query precision and ambiguity identification is used to indicate whether the intent of the query is a precision intent or an ambiguity intent. The accurate query refers to that a user has an intention of explicitly downloading a certain app, the fuzzy query refers to that the user does not explicitly download a specific app, and only one kind of app is likely to be downloaded, and the specific app to be downloaded is uncertain. When determining whether the query is an accurate query or a fuzzy query, decision judgment can be performed by comprehensively considering a plurality of factors such as user downloading entropy (namely app downloading distribution related to the query), text similarity of the query and app names, semantic similarity of the query and app names and the like. If the query is determined to be an accurate query, the model should give the accurate query more trends for its corresponding intent; if the query is determined to be a fuzzy query, the multi-intent distribution corresponding to the fuzzy query can be focused more. The features of the construction here are: if the query is an exact query, the eigenvalue may be 1, otherwise it may be set to 0.
In one embodiment of the application, the term importance feature after query word segmentation is that a term classification model is trained by a plurality of dimension construction features such as part-of-speech analysis, dependency syntax analysis, term compactness analysis, IDF (Inverse Document Frequency, reverse file frequency), app name word, stop word and the like to analyze the importance of the term after query word segmentation and give a weight score corresponding to each term. For example, if the query input by the user is "download game suitable for girls", the final term importance analysis result may be: "download: 0.126; is suitable for: 0.135; girl: 0.452; playing: 0.03; is a combination of the above: 0.01; and (3) game: 0.504".
2. Model training
In one embodiment of the application, the intent recognition model may employ a Multi-TextCNN (Multi-channel TextCNN) model, where the TextCNN model is a convolutional neural network model for text classification. As shown in fig. 7, in one embodiment of the present application, the Multi-TextCNN model mainly includes: a multi-channel input layer, a convolution layer, a max pooling layer, a full connection layer and a multi-task softmax probability output layer. The multi-channel input layer comprises static channel characteristics (such as an Embedding vector characteristic) and non-static channel characteristics (such as a user side search behavior feedback characteristic and a query side related characteristic) of the query.
In one embodiment of the application, to further reduce the probability of overfitting during training of the Multi-TextCNN model, a batch normalization layer is also introduced into the model, and a dropout mechanism can also be introduced at the full connectivity layer.
In one embodiment of the present application, as shown in fig. 7, assuming that the Multi-TextCNN model outputs three levels of intentions (e.g., the first level of intentions is "game", the second level of intentions is "game_chess and card center", and the third level of intentions is "game_chess and card center_player"), the probability output vector level of the first level of intentions in the Multi-TextCNN model may be connected to the full connection layer of the second and third levels of intentions, and the probability output vector level of the second level of intentions may be connected to the full connection layer of the third level of intentions, so that the supervision information of the first level of intentions may be fed back to the training of the second and third levels of intentions, and the supervision information of the second level of intentions may be fed back to the training of the third level of intentions, thereby further improving accuracy of intention prediction.
In one embodiment of the present application, since the classification problem of the hierarchical intent is involved in the embodiment of the present application, a loss function of multitlabel & MultiTask (multi-label & multi-task) may be constructed, for example, the formula of the loss function may be as follows:
Loss=α×loss 1 +β×loss 2 +γ×loss 3 +λ||Θ|| 2
wherein alpha, beta and gamma represent model super parameters which are respectively used for measuring the primary label,The relative importance of the secondary and tertiary labels, such as α=0.5, β=0.3, γ=0.2; lambda theta 2 Representing regularization terms.
In one embodiment of the application, loss 1 、loss 2 Loss of loss 3 May be a two-class cross entropy loss function, such asWhere n represents the number of training samples, x represents a sample, y represents the true label of the sample, σ () function represents the sigmoid activation function, and logits represents the feedforward output value of the network output layer: logits=wx+b, W is an output layer weight parameter, and b is an output layer bias parameter.
3. Model prediction
In one embodiment of the present application, after model training is completed, if a query input by a user is received, a multi-channel feature of the query may be extracted, where the multi-channel feature is also fused with an Embedding vector feature, a user-side search behavior feedback feature, and a query-side related feature, and then the multi-channel feature of the query is input into the trained model to obtain intent information output by the model. In one embodiment of the present application, as shown in FIG. 8, the intent recognition process may include the steps of:
Pretreatment: the method mainly comprises the steps of performing normalization processing such as case-case conversion, full-angle conversion, complex-simplified conversion, special symbol filtering and the like on a query input by a user.
Slot position analysis: the method mainly comprises the process of carrying out intention analysis on the query through a preset rule template, and aims to extract corresponding intention slot positions and slot position values from the query. For example, the query input by the user is "download game suitable for girl playing", and "[ D: user ]: girl" and "[ D: type ]: the game "two intended slots".
query error correction: the error query input by the user is mainly subjected to error detection and correction.
query word segmentation: the method mainly comprises the step of carrying out word level segmentation on a query sentence sequence input by a user. After the query word segmentation process, the query error correction process may be performed again.
query extension: the processing of semantic related query recommendation is mainly performed on the query input by the user, for example: "King glowing" expands related queries such as "King glowing assistant", "moba game" and so on, thereby helping users to search for interests and expand the number of recalls.
Term importance analysis: the importance of each term after the query word segmentation is mainly measured, and the importance contribution degree of different terms in the query is different when text recall is carried out, so that the important terms should be distinguished.
And (5) intention recognition: the query intention is identified by an intention identification model based on a term importance analysis result and other features of the query (such as an Embedding vector feature, a user side search behavior feedback feature and a query side related feature).
After the intention recognition, the yellow counter recognition can be performed, namely, the offensive intention such as yellow is recognized, and manual intervention adjustment can be performed.
In one embodiment of the application, after identifying the intent information of the query, the user's query may be responded to based on the identified intent information.
In one embodiment of the present application, as shown in fig. 9, after the user inputs the query "big help" in the app search field 901, the result obtained by recognizing the intention and responding to the query according to the related art scheme is less relevant to the query input by the user. The result of the intention recognition of the query according to the technical scheme of the embodiment of the application is shown in fig. 10, wherein the accurate fuzzy judgment result of the query is an accurate query; the importance score of the large tertiary obtained by fine-granularity word segmentation is 0.5556, and the importance score of the help is 0.4444; the result of coarse granularity word segmentation is 'large tertiary help'; the probability of identifying the query as intended "social_marriage_affinity/appointment" is 0.4256 and the probability of intended "social_chat friend-making_chat tool" is 0.1863. Further, the associated APP results of the identified intent recall are shown in fig. 11, so that by adopting the technical scheme of the embodiment of the application, more accurate intent can be identified, and APP which is more in line with the intent of the user can be recalled, thereby being beneficial to improving the search experience of the user.
In another embodiment of the application, as shown in FIG. 12, for query: the probability of the intention of "video_online video_integrated video" identified in the related art is 0.6094, and the probability of the intention of "life_buyer_information/attack" is 0.1992; the probability that the intention identified by the technical scheme of the embodiment of the application is 'trip_trip service_trip record' is 0.9540. For query: how do the latter go out of the suit? The game attack asks it, and the probability that the intention identified in the related art is "game_action adventure_cool" is 0.1699; the probability of the game-game surrounding-game community identified by the technical scheme of the embodiment of the application is 0.5001, and the probability of the game-game surrounding-game attack is 0.1289. For query: software that can make the blurred picture clear, and the probability of the intention identified in the related art as "photograph_picture sharing_beauty" is 0.5645; the probability that the intention identified by the technical scheme of the embodiment of the application is 'photograph_edit beautification_edit beautification' is 0.8348. For query: the probability of the intention of "communication_business hall_communication business hall" identified in the related art is 0.2671, and the probability of the intention of "shopping_shopping payment_payment" is 0.2599; the probability of intent to "financing_invest_stock" identified by the technical scheme of the embodiment of the application is 0.2452, and the probability of intent to "communication_business hall_integrated business" is 0.2377. Therefore, the intention identified by the technical scheme of the embodiment of the application is more accurate.
In summary, the technical scheme of the embodiment of the application has the following advantages:
1. end-to-end learning:
the multi-fusion features proposed by the technical scheme of the embodiment of the application do not need to undergo too complex feature engineering.
2. Multichannel input:
the technical scheme of the embodiment of the application considers other channel characteristics besides adopting the word vector characteristics of random initialization and fine-tune: (1) By using word vectors extracted from the pretrained fasttet, the model can learn more reasonable term vector characterization from query input and corresponding intention label supervision information. (2) Some discrete features are used as input, including user search behavior feedback features (such as app download distribution information corresponding to query) at the user side, and features such as precise fuzzy judgment identification, term importance, keywords and the like at the query side. The technical scheme of the embodiment of the application adopts the characteristic of fusion of a plurality of channels for training.
3. Multi-label Multi-tag classification:
since the intent behind the user input query may be varied, such as: the Chu fragrance can correspond to various intentions such as a game of the fairy knight-errant class, a novel class, a video class and the like, so that the prediction of the intentions by adopting a general Multi-class Multi-classification method is exclusive, and the Multi-intention distribution of a user cannot be captured well. Therefore, the technical scheme of the embodiment of the application provides a multi-label classification loss function based on multi-label.
4. Multitasking learning:
because there is a certain difference in the number of samples covered by different three-level intent labels, for example, the number of samples of three-level intent labels is smaller, it may result in insufficient three-level intent learning and inaccurate prediction. According to the embodiment of the application, the multi-task learning framework is introduced, and the supervision signals for learning the primary intention labels and the secondary intention labels can well assist the fitting learning of the tertiary intention labels, so that the accuracy of intention recognition can be improved.
It should be noted that, the technical solution of the embodiment of the present application is applicable to not only the scenario of searching an application program, but also any other scenario in which the intention of a user needs to be identified, such as a web search scenario, a man-machine intelligent dialogue, a voice control scenario, and the like.
The following describes embodiments of the apparatus of the present application that may be used to perform the intent recognition method in the above-described embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the above-described embodiments of the intention recognition method of the present application.
FIG. 13 shows a block diagram of an intent recognition device in accordance with one embodiment of the application.
Referring to fig. 13, an intention recognition apparatus 1300 according to an embodiment of the present application includes: a first acquisition unit 1302, a second acquisition unit 1304, a first generation unit 1306, and a processing unit 1308.
The first obtaining unit 1302 is configured to obtain a query input by a user; the second obtaining unit 1304 is configured to obtain a word vector feature of the query according to the query, and obtain a discrete feature associated with the query; the first generating unit 1306 is configured to generate a multi-channel feature vector of the query term according to the word vector feature and the discrete feature; the processing unit 1308 is configured to input the multi-channel feature vector to an intention recognition model, and obtain intention information output by the intention recognition model.
In some embodiments of the present application, based on the foregoing scheme, the second acquisition unit 1304 is configured to: acquiring historical user feedback information associated with the query language; according to the historical user feedback information, counting the distribution condition of each historical user feedback information associated with the query language; and generating the discrete features according to the distribution condition of the feedback information of each historical user.
In some embodiments of the present application, based on the foregoing scheme, the second acquisition unit 1304 is configured to: identifying whether the intent of the query is a precise intent or a ambiguous intent; discrete features of the query are generated based on whether the intent of the query is a precise intent or a ambiguous intent.
In some embodiments of the present application, based on the foregoing scheme, the second obtaining unit 1304 is configured to identify whether the intention of the query is a precise intention or a ambiguous intention according to at least one of the following factors: text similarity between the query and predetermined intent information, semantic similarity between the query and predetermined intent information, and distribution of historical user feedback information associated with the query.
In some embodiments of the present application, based on the foregoing scheme, the second acquisition unit 1304 is configured to: word segmentation processing is carried out on the query language to obtain at least one target word; carrying out importance analysis on the at least one target word to obtain an importance score of each target word; and generating discrete features of the query according to the importance scores of the target words.
In some embodiments of the present application, based on the foregoing, the second obtaining unit 1304 is configured to perform importance analysis on each of the target words by at least one of the following factors: the part-of-speech analysis results of each target word, the dependency syntax analysis results between each target word and other target words in the query word, the compactness analysis results of each target word, the reverse document frequency of each target word, whether each target word is a set entity word, and whether each target word is a stop word.
In some embodiments of the present application, based on the foregoing scheme, the second acquisition unit 1304 is configured to: and inputting the query language into a pre-trained word vector extraction model to obtain word vector features output by the word vector extraction model.
In some embodiments of the present application, based on the foregoing scheme, the second acquisition unit 1304 is configured to: extracting word vector features of the query language through a feature extraction network, wherein the feature extraction network extracts the word vector features of the query language through convolution kernels with different sizes respectively.
In some embodiments of the present application, based on the foregoing, the intention recognition apparatus 1300 further includes: the third acquisition unit is used for acquiring a query language sample; a fourth obtaining unit, configured to obtain, according to the query term sample, a word vector feature of the query term sample and a discrete feature associated with the query term sample; the second generation unit is used for generating a training sample according to the word vector characteristics of the query language sample and the discrete characteristics associated with the query language sample; and the training unit is used for training the intention recognition model based on the training sample.
In some embodiments of the present application, based on the foregoing, the intent recognition model includes a multi-task machine learning model for outputting multi-level intents, the multi-task machine learning model including fully connected layers and output layers corresponding to respective levels of intents, wherein the output layer corresponding to a first intention in the multi-level intention information is connected to the fully connected layer corresponding to a second intention, and a hierarchy of the first intention is higher than a hierarchy of the second intention.
In some embodiments of the application, based on the foregoing, the intent recognition model comprises a multi-tasking machine learning model having a loss function of:
Loss=∑(c i ×loss i )+λ
wherein Loss represents a Loss function of the multitasking machine learning model; loss of loss i Representing a loss function corresponding to the i-th level intention; c i Is a super parameter and is used for representing the importance of a loss function corresponding to the ith level intention; lambda represents a regularization term.
In some embodiments of the application, based on the foregoing, the intent recognition model includes a multitasking machine learning model, and the intent recognition device 1300 further includes: the response unit is used for responding to the query language through the lowest-level intention in the intention information after the intention information output by the intention recognition model is obtained, so as to obtain a response result; and if the response result can not meet the response requirement, responding to the query language sequentially through the intention of the upper layer until the obtained response result meets the response requirement.
Fig. 14 shows a schematic diagram of a computer system suitable for use in implementing an embodiment of the application.
It should be noted that, the computer system 1400 of the electronic device shown in fig. 14 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 14, the computer system 1400 includes a central processing unit (Central Processing Unit, CPU) 1401, which can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 1402 or a program loaded from a storage section 1408 into a random access Memory (Random Access Memory, RAM) 1403, for example, performing the methods described in the above embodiments. In the RAM 1403, various programs and data required for system operation are also stored. The CPU 1401, ROM 1402, and RAM 1403 are connected to each other through a bus 1404. An Input/Output (I/O) interface 1405 is also connected to bus 1404.
The following components are connected to the I/O interface 1405: an input section 1406 including a keyboard, a mouse, and the like; an output portion 1407 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and a speaker; a storage section 1408 including a hard disk or the like; and a communication section 1409 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section 1409 performs communication processing via a network such as the internet. The drive 1410 is also connected to the I/O interface 1405 as needed. Removable media 1411, such as magnetic disks, optical disks, magneto-optical disks, semiconductor memory, and the like, is installed as needed on drive 1410 so that a computer program read therefrom is installed as needed into storage portion 1408.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1409 and/or installed from the removable medium 1411. When executed by a Central Processing Unit (CPU) 1401, performs the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
As another aspect, the present application also provides a computer-readable medium that may be contained in the electronic device described in the above embodiment; or may exist alone without being incorporated into the electronic device. The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the methods described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (14)
1. An intent recognition method, comprising:
acquiring a query language input by a user;
acquiring word vector features of the query language according to the query language, and acquiring discrete features associated with the query language; wherein the discrete features associated with the query are generated by at least one of: aiming at the distribution condition of historical user feedback information of the query language, whether the query language is accurate intention or fuzzy intention, and importance scores of all target words obtained by word segmentation of the query language;
Generating a multi-channel feature vector of the query language according to the word vector features and the discrete features;
inputting the multichannel feature vector into an intention recognition model to obtain intention information output by the intention recognition model; the intention recognition model comprises a multi-task machine learning model which is used for outputting multi-level intents, the multi-task machine learning model comprises a full-connection layer and an output layer which correspond to each level of intents, and the output layer which corresponds to the intention of the higher level in the multi-level intention information is connected to the full-connection layer which corresponds to the intention of the lower level.
2. The intent recognition method of claim 1, wherein obtaining discrete type features associated with the query comprises:
acquiring historical user feedback information associated with the query language;
according to the historical user feedback information, counting the distribution condition of each historical user feedback information associated with the query language;
and generating the discrete features according to the distribution condition of the feedback information of each historical user.
3. The intent recognition method of claim 1, wherein obtaining discrete type features associated with the query comprises:
Identifying whether the intent of the query is a precise intent or a ambiguous intent;
discrete features of the query are generated based on whether the intent of the query is a precise intent or a ambiguous intent.
4. The intention recognition method of claim 3, wherein the intention of the query is a precise intention or a ambiguous intention is recognized based on at least one of:
text similarity between the query and predetermined intent information, semantic similarity between the query and predetermined intent information, and distribution of historical user feedback information associated with the query.
5. The intent recognition method of claim 1, wherein obtaining discrete type features associated with the query comprises:
word segmentation processing is carried out on the query language to obtain at least one target word;
carrying out importance analysis on the at least one target word to obtain an importance score of each target word;
and generating discrete features of the query according to the importance scores of the target words.
6. The intention recognition method of claim 5, wherein each of the target words is analyzed for importance by at least one of the following factors:
The part-of-speech analysis results of each target word, the dependency syntax analysis results between each target word and other target words in the query word, the compactness analysis results of each target word, the reverse document frequency of each target word, whether each target word is a set entity word, and whether each target word is a stop word.
7. The method of claim 1, wherein obtaining word vector features of the query from the query comprises:
and inputting the query language into a pre-trained word vector extraction model to obtain word vector features output by the word vector extraction model.
8. The method of claim 1, wherein obtaining word vector features of the query from the query comprises:
extracting word vector features of the query language through a feature extraction network, wherein the feature extraction network extracts the word vector features of the query language through convolution kernels with different sizes respectively.
9. The intention recognition method according to claim 1, characterized by further comprising:
obtaining a query language sample;
acquiring word vector features of the query language sample and discrete features associated with the query language sample according to the query language sample;
Generating a training sample according to the word vector characteristics of the query language sample and the discrete characteristics associated with the query language sample;
training the intention recognition model based on the training sample.
10. The intent recognition method as claimed in claim 9, wherein the intent recognition model comprises a multi-task machine learning model having a loss function of:
Loss=∑(c i ×loss i )+λ
wherein Loss represents a Loss function of the multitasking machine learning model; loss of loss i Representing a loss function corresponding to the i-th level intention; c i Is a super parameter and is used for representing the importance of a loss function corresponding to the ith level intention; lambda represents a regularization term.
11. The intent recognition method as claimed in any one of claims 1 to 10, wherein the intent recognition model comprises a multitasking machine learning model, the intent recognition method further comprising:
after the intention information output by the intention recognition model is obtained, responding to the query language through the lowest-level intention in the intention information, and obtaining a response result;
and if the response result can not meet the response requirement, responding to the query language sequentially through the intention of the upper layer until the obtained response result meets the response requirement.
12. An intent recognition device, comprising:
the first acquisition unit is used for acquiring a query language input by a user;
the second acquisition unit is used for acquiring word vector features of the query language according to the query language and acquiring discrete features associated with the query language; wherein the discrete features associated with the query are generated by at least one of: aiming at the distribution condition of historical user feedback information of the query language, whether the query language is accurate intention or fuzzy intention, and importance scores of all target words obtained by word segmentation of the query language;
the generating unit is used for generating a multichannel feature vector of the query language according to the word vector features and the discrete features;
the processing unit is used for inputting the multichannel feature vector into an intention recognition model to obtain intention information output by the intention recognition model; the intention recognition model comprises a multi-task machine learning model which is used for outputting multi-level intents, the multi-task machine learning model comprises a full-connection layer and an output layer which correspond to each level of intents, and the output layer which corresponds to the intention of the higher level in the multi-level intention information is connected to the full-connection layer which corresponds to the intention of the lower level.
13. A computer readable medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the intention recognition method according to any one of claims 1 to 11.
14. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs that when executed by the one or more processors cause the one or more processors to implement the intent recognition method as claimed in any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910284684.5A CN110069709B (en) | 2019-04-10 | 2019-04-10 | Intention recognition method, device, computer readable medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910284684.5A CN110069709B (en) | 2019-04-10 | 2019-04-10 | Intention recognition method, device, computer readable medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110069709A CN110069709A (en) | 2019-07-30 |
CN110069709B true CN110069709B (en) | 2023-10-20 |
Family
ID=67367356
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910284684.5A Active CN110069709B (en) | 2019-04-10 | 2019-04-10 | Intention recognition method, device, computer readable medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110069709B (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110503143B (en) * | 2019-08-14 | 2024-03-19 | 平安科技(深圳)有限公司 | Threshold selection method, device, storage medium and device based on intention recognition |
CN110543592B (en) * | 2019-08-27 | 2022-04-01 | 北京百度网讯科技有限公司 | Information searching method and device and computer equipment |
CN111008309B (en) * | 2019-12-06 | 2023-08-08 | 北京百度网讯科技有限公司 | Query method and device |
CN111062200B (en) * | 2019-12-12 | 2024-03-05 | 北京声智科技有限公司 | Speaking generalization method, speaking recognition device and electronic equipment |
US11308944B2 (en) * | 2020-03-12 | 2022-04-19 | International Business Machines Corporation | Intent boundary segmentation for multi-intent utterances |
CN111813532B (en) * | 2020-09-04 | 2020-12-18 | 腾讯科技(深圳)有限公司 | Image management method and device based on multitask machine learning model |
CN112256864B (en) * | 2020-09-23 | 2024-05-14 | 北京捷通华声科技股份有限公司 | Multi-intention recognition method, device, electronic equipment and readable storage medium |
CN112182176A (en) * | 2020-09-25 | 2021-01-05 | 北京字节跳动网络技术有限公司 | Intelligent question answering method, device, equipment and readable storage medium |
CN113011503B (en) * | 2021-03-17 | 2021-11-23 | 彭黎文 | Data evidence obtaining method of electronic equipment, storage medium and terminal |
CN114385933B (en) * | 2022-03-22 | 2022-06-07 | 武汉大学 | Semantic-considered geographic information resource retrieval intention identification method |
CN114818703B (en) * | 2022-06-28 | 2022-09-16 | 珠海金智维信息科技有限公司 | Multi-intention recognition method and system based on BERT language model and TextCNN model |
CN115423485B (en) * | 2022-11-03 | 2023-03-21 | 支付宝(杭州)信息技术有限公司 | Data processing method, device and equipment |
CN117725209A (en) * | 2023-09-27 | 2024-03-19 | 书行科技(北京)有限公司 | Intention recognition method and device, storage medium and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017024884A1 (en) * | 2015-08-07 | 2017-02-16 | 广州神马移动信息科技有限公司 | Search intention identification method and device |
CN109522393A (en) * | 2018-10-11 | 2019-03-26 | 平安科技(深圳)有限公司 | Intelligent answer method, apparatus, computer equipment and storage medium |
-
2019
- 2019-04-10 CN CN201910284684.5A patent/CN110069709B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017024884A1 (en) * | 2015-08-07 | 2017-02-16 | 广州神马移动信息科技有限公司 | Search intention identification method and device |
CN109522393A (en) * | 2018-10-11 | 2019-03-26 | 平安科技(深圳)有限公司 | Intelligent answer method, apparatus, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
《A New Directional Intention Identification Approach for Intelligent Wheelchair Based on Fusion of EOG Signal and Eye Movement Signal》;Tongbo Li;《2018 IEEE International Conference on Intelligence and Safety for Robotics (ISR)》;全文 * |
《基于神经网络模型的产品属性情感分析》;刘新星 等;《计算机应用》;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110069709A (en) | 2019-07-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110069709B (en) | Intention recognition method, device, computer readable medium and electronic equipment | |
CN109241524B (en) | Semantic analysis method and device, computer-readable storage medium and electronic equipment | |
CN112084337B (en) | Training method of text classification model, text classification method and equipment | |
CN109101537B (en) | Multi-turn dialogue data classification method and device based on deep learning and electronic equipment | |
CN108920622B (en) | Training method, training device and recognition device for intention recognition | |
CN108846077B (en) | Semantic matching method, device, medium and electronic equipment for question and answer text | |
CN109471944B (en) | Training method and device of text classification model and readable storage medium | |
CN112395506A (en) | Information recommendation method and device, electronic equipment and storage medium | |
CN113704460B (en) | Text classification method and device, electronic equipment and storage medium | |
CN111739520B (en) | Speech recognition model training method, speech recognition method and device | |
CN111259647A (en) | Question and answer text matching method, device, medium and electronic equipment based on artificial intelligence | |
CN113688951B (en) | Video data processing method and device | |
CN113806482A (en) | Cross-modal retrieval method and device for video text, storage medium and equipment | |
CN109271624B (en) | Target word determination method, device and storage medium | |
CN111666400B (en) | Message acquisition method, device, computer equipment and storage medium | |
CN111061939B (en) | Scientific research academic news keyword matching recommendation method based on deep learning | |
CN112632226A (en) | Semantic search method and device based on legal knowledge graph and electronic equipment | |
CN109710760A (en) | Clustering method, device, medium and the electronic equipment of short text | |
CN110968725B (en) | Image content description information generation method, electronic device and storage medium | |
Aziguli et al. | A robust text classifier based on denoising deep neural network in the analysis of big data | |
CN111538846A (en) | Third-party library recommendation method based on mixed collaborative filtering | |
CN115687980A (en) | Desensitization classification method of data table, and classification model training method and device | |
CN117132923A (en) | Video classification method, device, electronic equipment and storage medium | |
CN112749737A (en) | Image classification method and device, electronic equipment and storage medium | |
CN113408282B (en) | Method, device, equipment and storage medium for topic model training and topic prediction |
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 |