CN111523311B - Search intention recognition method and device - Google Patents

Search intention recognition method and device Download PDF

Info

Publication number
CN111523311B
CN111523311B CN202010315818.8A CN202010315818A CN111523311B CN 111523311 B CN111523311 B CN 111523311B CN 202010315818 A CN202010315818 A CN 202010315818A CN 111523311 B CN111523311 B CN 111523311B
Authority
CN
China
Prior art keywords
recognition
recognized
intention
text
model
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
CN202010315818.8A
Other languages
Chinese (zh)
Other versions
CN111523311A (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.)
Du Xiaoman Technology Beijing Co Ltd
Original Assignee
Du Xiaoman Technology Beijing 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 Du Xiaoman Technology Beijing Co Ltd filed Critical Du Xiaoman Technology Beijing Co Ltd
Priority to CN202010315818.8A priority Critical patent/CN111523311B/en
Publication of CN111523311A publication Critical patent/CN111523311A/en
Application granted granted Critical
Publication of CN111523311B publication Critical patent/CN111523311B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • 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
    • G06F16/355Class or cluster creation or modification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • 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/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • 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

Abstract

The application provides a search intention recognition method and a device, wherein the scheme comprises the steps of firstly, carrying out intention recognition on a search text to be recognized by utilizing a rule model to obtain a corresponding first recognition result; and carrying out intention recognition again by using the deep learning model to obtain a corresponding intention category for the text to be recognized, the accuracy of which is lower than the first preset value. And directly determining a corresponding first recognition result as an intention category corresponding to the search text to be recognized by utilizing the rule model to recognize the search text to be recognized, wherein the accuracy rate of the search text to be recognized is higher than a first preset value. As can be seen from the above, in this scheme, multiple models are used to perform multi-level recognition on a search text to be recognized, a rule model is used to ensure recognition accuracy, and a deep learning model is used to perform recognition on data that cannot be recognized or is inaccurate in rule model recognition, so that recall rate of a recognition result is ensured, and therefore, accuracy and recall rate of a search intention recognition result are high.

Description

Search intention recognition method and device
Technical Field
The application belongs to the technical field of computers, and particularly relates to a search intention identification method and device.
Background
The search intention recognition refers to disassembling and analyzing search terms of a user to obtain the intention and the requirement of the user, so that the most needed product or content of the user is recommended to the user. It can be seen that improving the search recognition intent can improve the accuracy of product or content recommendation.
The existing search intention recognition scheme adopts word vectors to carry out semantic representation on search terms, the word vectors are obtained based on the meaning of contexts, the search terms have nonstandard and short lengths and almost have no contexts, and the obtained word vectors have poor representation capability, so that the final intention recognition accuracy is low.
Disclosure of Invention
In view of the above, the present invention aims to provide a search intention recognition method and device, so as to solve the technical problem of low recognition accuracy in the conventional technical scheme, and the disclosed technical scheme is as follows:
in one aspect, the present invention provides a search intention recognition method, including:
performing intention recognition on the obtained text to be recognized by using a rule model to obtain a first recognition result, wherein the first recognition result comprises an intention category corresponding to the text to be recognized and a corresponding accuracy, the rule model comprises a plurality of recognition rules, and each recognition rule comprises a plurality of feature dictionaries with preset sequences and corresponds to one intention category;
For a first recognition result with the accuracy higher than a first preset value, determining that the intention category in the first recognition result is the intention category of the corresponding search text to be recognized;
and carrying out intention recognition on the text to be recognized corresponding to the first recognition result by utilizing a deep learning model obtained by training in advance for the first recognition result with the accuracy lower than the first preset value, so as to obtain a corresponding intention category.
On the other hand, the invention also provides a searching intention recognition device, which comprises the following steps:
the first intention recognition module is used for carrying out intention recognition on the obtained text to be recognized by utilizing a rule model to obtain a first recognition result, wherein the first recognition result comprises an intention category corresponding to the text to be recognized and a corresponding accuracy rate, the rule model comprises a plurality of recognition rules, and each recognition rule comprises a plurality of feature dictionaries with preset sequences and corresponds to one intention category;
the first determining module is used for determining the intention category in the first recognition result as the intention category of the corresponding text to be recognized for searching for the first recognition result with the accuracy higher than a first preset value;
And the second intention recognition module is used for carrying out intention recognition on the search text to be recognized corresponding to the first recognition result by utilizing a deep learning model obtained by training in advance on the first recognition result with the accuracy lower than the first preset value so as to obtain a corresponding intention category.
According to the search intention recognition method provided by the application, firstly, intention recognition is carried out on a search text to be recognized by utilizing a rule model to obtain a corresponding first recognition result; and carrying out intention recognition again by using the deep learning model to obtain a corresponding intention category for the text to be recognized, the accuracy of which is lower than the first preset value. And directly determining a corresponding first recognition result as an intention category corresponding to the search text to be recognized by utilizing the rule model to recognize the search text to be recognized, wherein the accuracy rate of the search text to be recognized is higher than a first preset value. As can be seen from the above, in this scheme, multiple models are used to perform multi-level recognition on a search text to be recognized, a rule model is used to ensure recognition accuracy, and a deep learning model is used to perform recognition on data that cannot be recognized or is inaccurate in rule model recognition, so that recall rate of a recognition result is ensured, and therefore, accuracy and recall rate of a search intention recognition result are high.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a search intention recognition method provided by an embodiment of the present application;
FIG. 2 is a schematic diagram of a search intention recognition system according to an embodiment of the present application;
FIG. 3 is a flow chart of a rule model construction process provided by an embodiment of the present application;
FIG. 4 is a flow chart of a deep learning model training process provided by an embodiment of the present application;
fig. 5 is a schematic structural diagram of a search intention recognition device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a second intention recognition module according to an embodiment of the application.
Detailed Description
With the rapid development of internet technology, a user can search various products or information wanted by the user in various websites, the user leaves a series of search behavior track information during searching, and the final appeal of the search behavior of the user, namely the goods or information wanted by the user, namely the intention of the search behavior of the user is determined by analyzing the search behavior of the user. So as to further present or push information desired by the user to the user. The user intention recognition method provided by the application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a search intention recognition method according to an embodiment of the present application is shown, where the method is applied to a device with computing capability, and as shown in fig. 1, the method mainly includes the following steps:
s110, performing intention recognition on the obtained search text to be recognized by using the rule model to obtain a first recognition result.
The rule model is obtained by analyzing a large amount of user search data, each recognition rule in the rule model corresponds to one intention category, and each recognition rule comprises a plurality of feature dictionaries with preset sequences.
The search text to be identified is the search text which needs to be subjected to intention identification, and can be any one or more of search terms of a user.
In one embodiment of the application, the rule model includes a template Pattern and feature dictionary FeatureDict constructs.
For example, template 1: [ W:0-30] [ D: bank ] [ W:0-30] [ D: loan_indication ] [ W:0-30];
the template 2 is as follows:
[W:0-30][D:WeiLiDai_Indicate][W:0-30][D:Loan_Indicate][W:0-30][D:Loan_Interest][W:0-30]。
in the template, [ W:0-30] is a wild card, representing matching 0-30 non-dictionary words; the feature dictionary [ D: XXX ] contains a class of words, for example, the feature dictionary [ D: huaBai_indication ] includes flowers, ants, etc.
The template 1 comprises two vocabulary dictionaries, and is [ D: bank ], [ D: loan_indication ] in sequence from front to back. Wherein [ D: bank ] represents a dictionary of Bank words and [ D: loan_indication ] represents a dictionary of Loan words.
The template 2 includes three lexical dictionaries and is sequentially from front to back: [ D: weiLiDai_Industy ], [ D: loan_Industy ], [ D: loan_Interest ], wherein [ D: weiLiDai_Industy ] particle lending dictionary, [ D: loan_Industy ] Loan vocabulary dictionary, [ D: loan_Interst ] Loan Interest vocabulary dictionary.
For example, words contained in a search text are matched with lexicon dictionary in the template 2 in the order from front to back, and the intention category of the search text is determined as the category label of the template 2, namely, the particulate credit-interest.
The first recognition result comprises an intention category corresponding to the search text to be recognized and a corresponding accuracy rate.
It should be noted that, the accuracy of the first recognition result obtained by the rule model is the accuracy corresponding to the corresponding recognition rule, for example, the search text to be recognized is completely matched with the recognition rule 1 in the rule model, the intention category corresponding to the recognition rule 1 is a category, and the accuracy of the recognition rule 1 is 90%, and the intention category of the search text to be recognized is a category, and the accuracy is 90%.
The accuracy corresponding to each recognition rule is the ratio of the number of correct search terms recognized by the recognition rule to the total number of terms recognized by the recognition rule, namely: accuracy = correct number of terms identified/total number of terms identified.
S120, for a first recognition result with the accuracy higher than a first preset value, determining that the intention category in the first recognition result is the intention category of the corresponding text to be recognized.
If the accuracy of the recognition result obtained by recognizing a certain search text by using the rule model is higher, for example, higher than a certain preset value (the preset value can be determined according to the actual accuracy of the rule model), the intention category obtained by recognizing the rule model is taken as the intention category of the search text.
S130, for a first recognition result with the accuracy lower than a first preset value, performing intention recognition on the text to be recognized corresponding to the first recognition result again by utilizing a deep learning model obtained through pre-training, so as to obtain a corresponding intention category.
If the accuracy of the recognition result obtained by recognizing a certain search text by using the rule model is lower, for example, lower than a certain preset value, the recognition result is considered to have a possibility of error, and then the intention recognition is carried out on the search text to be recognized with lower accuracy by continuously using the deep learning model obtained by pre-training, so that the intention category corresponding to the search text is obtained.
The rule model has high recognition accuracy and high processing speed, but is suitable for recognizing search texts with shorter length, and has low recognition accuracy or even can not be recognized for search texts with longer length.
In one embodiment of the application, in order to improve recognition efficiency and recall rate, for a search text which can be recognized by a rule model but has lower accuracy, a two-classification deep learning model (i.e. a first deep learning model) is adopted to verify whether a first recognition result obtained by the rule model is accurate. And for the search text which cannot be identified by the rule model, the intention category of the search text is identified by adopting a multi-category deep learning model (namely, a second deep learning model).
In one possible implementation, the process of verifying the first recognition result using the first deep learning model is as follows:
performing intention recognition on the text to be recognized, the accuracy of which is lower than a first preset value, by using the first deep learning model again to obtain a second recognition result; the second recognition result comprises two categories of correct and incorrect; if the second recognition result is of the correct type, indicating that the first recognition result obtained by the rule model is correct; and if the second recognition result is of an incorrect category, indicating that the first recognition result obtained by the rule model is incorrect.
In another possible implementation, the process of re-identifying the search text by the second deep learning model is as follows:
Performing intention recognition on the search text to be recognized, which cannot be recognized by the rule model, by using a first-level classification model in the second deep learning model to obtain a first-level intention category of the search text to be recognized; for example, the number of the cells to be processed,
and then, carrying out intention recognition on the search text to be recognized by utilizing a secondary classification model corresponding to the primary intention category to obtain a secondary intention category of the search text to be recognized.
In one embodiment of the application, the first deep learning model may be implemented using a Long Short term memory network (Long Short-TermMemory, LSTM) model; the second deep learning model may employ an attention-based LSTM model and a text CNN network. The framework of the search intention recognition system provided in this embodiment is shown in fig. 2, where the first layer is a rule model, the second layer is an LSTM model, and the third layer is an LSTM model and a text CNN network based on an attention mechanism.
According to the search intention recognition method provided by the embodiment, firstly, intention recognition is carried out on a search text to be recognized by using a rule model to obtain a corresponding first recognition result; and carrying out intention recognition again by using the deep learning model to obtain a corresponding intention category for the text to be recognized, the accuracy of which is lower than the first preset value. And directly determining a corresponding first recognition result as an intention category corresponding to the search text to be recognized by utilizing the rule model to recognize the search text to be recognized, wherein the accuracy rate of the search text to be recognized is higher than a first preset value. As can be seen from the above, in this scheme, multiple models are used to perform multi-level recognition on a search text to be recognized, a rule model is used to ensure recognition accuracy, and a deep learning model is used to perform recognition on data that cannot be recognized or is inaccurate in rule model recognition, so that recall rate of a recognition result is ensured, and therefore, accuracy and recall rate of a search intention recognition result are high. The recall rate is a recall rate, that is, the proportion of correctly predicted positive data to all actually positive data.
The process of constructing the rule model and the deep learning model will be described in detail with reference to fig. 3 to 4.
As shown in fig. 3, the process of constructing the rule model includes:
s210, screening candidate search data sets from the user search data.
In one embodiment of the present application, the whole network user search data is first preprocessed, for example, the user search data is denoised, that is, noise data such as completely uncorrelated data or data needing to be masked is removed.
Then, random Walk (Random Walk) is performed on the preprocessed user search data using the seed word, resulting in a candidate search dataset. The candidate search data set is the user search data used to obtain the rule model. For example, the seed term may be XX loan, personal consumption loan, XX banking personal loan.
Random walk algorithms are widely used in the field of data mining, which construct a number of random walkers that are initialized from a certain node, and then randomly access a certain neighboring node of the current node in each step of random walk.
S220, performing proprietary word mining on the candidate search data set to obtain proprietary words.
For each candidate search data, dot mutual information pmi (x, y) and degree of freedom free (w) between words are calculated according to the following formula i ):
free(w i )=min(le(w i ),re(w i )) (2)
In formula 1, p (x, y) represents the probability that x and y co-occur, p (x, y) =x, the number of occurrences of y/the total number of texts, p (x) represents the probability that x occurs, p (x) =the number of occurrences of x/the total number of texts, p (y) represents the probability that y occurs, and p (y) =the number of occurrences of y/the total number of texts;
in equation 2, le (w i ) Representing the current word w i Entropy of information of words appearing on the left, wherein,p in this formula i Is w i Probability of left word appearing, assuming that a word is at w i The number of occurrences on the left is n, w i The left word appears m words in total, then p i =n/m;re(w i ) Information entropy representing word appearing right to current word, calculation process and le (w i ) The same is not described here in detail.
The mutual information is used for measuring whether word collocation is reasonable or not, and the degree of freedom is used for measuring the richness of left adjacent words and right adjacent words of one word. The greater the degree of freedom and the point mutual information, the greater the possibility of word formation, and in the specific implementation, a threshold value is set, and word combinations with degrees of freedom and point mutual information greater than the threshold value are regarded as exclusive words.
S230, the special words are segmented, and each piece of data in the candidate search data set is divided to obtain candidate subsequences.
N-gram (e.g. 2-gram and 3-gram) is respectively carried out on the candidate searching data set to obtain corresponding subsequences, and the subsequences with high TF-IDF are screened as candidate subsequences.
N-Gram is an algorithm based on a statistical language model. The basic idea is to perform sliding window operation with the size of N on the content in the text according to bytes to form a byte fragment sequence with the length of N.
For example, the search data is "what is the personal loan interest of Beijing banks", the sub-sequence of obtaining Beijing banks/person/loan/interest/yes/how much after word segmentation, and obtaining 2-gram is: beijing bank-loan, person-loan, loan-interest, performing 3-gram to obtain the subsequence: beijing bank-loan-interest.
TF-IDF, i.e. word frequency-inverse document frequency, means that if a word or phrase appears frequently in one article (i.e. TF is high) and rarely in other articles (i.e. IDF is high), it is considered to have a good class distinction capability, i.e. to be suitable for classification.
S240, classifying the segmented words of the proprietary words and the words in the candidate subsequences based on the feature dictionary, and updating the words which are not contained in the feature dictionary into the dictionary to obtain an updated feature dictionary.
Training word vectors on the candidate search data set, obtaining the words in the candidate subsequence obtained in S230 and word vectors corresponding to the word segmentation of the special word, and calculating words not included in the existing feature dictionary (i.e. word X to be classified i ) With words in the feature dictionary (i.e. known class words Y i ) Distance between the words and the word X to be classified is determined i The known category word Y with the smallest distance between the words i Is the category of the word to be classified.
S250, marking the feature dictionary to which the words in each candidate subsequence belong by using the updated feature dictionary, and generating a recognition rule.
Using the updated feature dictionary, labeling the category of each word in the candidate subsequence obtained in S230, for example, the candidate subsequence is a particle credit-Interest, the particle credit belongs to the dictionary [ D: weilidai_indication ], and the Interest belongs to the dictionary [ D: lon_interest ], and the generated recognition rule is: [ W:0-30] [ D: weiLiDai_indication ] [ W:0-30] [ D: loan_Intest ] [ W:0-30].
S260, labeling the corresponding intention category for each recognition rule, and obtaining a rule model.
In one embodiment of the present application, the feature dictionary in each recognition rule (i.e., each template) is prioritized, and an intention category tag corresponding to each template is generated.
For example, the brand dictionary in the template has a higher priority than the normal vocabulary dictionary, e.g., [ W:0-30] [ D: weiLiDai_indication ] [ W:0-30] [ D: loan_indication ] [ W:0-30] [ D: loan_Interest ] [ W:0-30], where [ D: weiLiDai_indication ] is a particulate credit brand dictionary, [ D: loan_indication ] and [ D: loan_Interest ] are normal vocabulary dictionaries. Therefore, the intent category tag of the template is: particulate credit-interest. For example, the subsequence "particulate loan-interest" is matched to the template, and thus the intent class of the subsequence is determined to be particulate loan-interest.
After a rule model is established, a search text to be identified is input into an identifier containing the rule model, and an identification result, for example, (query, pattern, tag) triples are output, wherein the query in the triples is a search term, the pattern is a matched template, and the tag is an intention type.
The process of creating the rule model provided in this embodiment considers the arrangement sequence among the feature dictionaries included in the template when the template is constructed, so when the rule model is used to identify the intention of the search text, the sequence of the words in the search text is the same as the sequence of the dictionary matched in the template, and the search text is considered to be matched with the template, in other words, the rule model considers the sequence among the words in the search text, so that the accuracy of the identification result is improved.
Referring to fig. 4, a flowchart of a deep learning model training process provided by an embodiment of the present application is shown, where the deep learning model in the embodiment includes a first deep learning model and a second deep learning model.
The training process of the first deep learning model is as follows:
and S310, screening candidate search data sets from the user search data.
This step is the same as the implementation process of S210, and will not be described here again.
S320, carrying out intention recognition on each piece of candidate search data in the candidate search data set by utilizing a rule model obtained in advance, and obtaining a corresponding recognition result.
And carrying out intention recognition on each piece of candidate search data in the screened candidate search data set by utilizing a rule model to obtain a corresponding recognition result.
For data with low accuracy, S330 is performed; s360 is performed on data that cannot be recognized by the rule model.
S330, category labeling is carried out on the first type candidate search data with the accuracy rate lower than a first preset value obtained by the rule model identification.
And carrying out category labeling on the partial data with low accuracy, namely the first type of candidate search data, wherein the category labeling is based on manual experience.
And (3) carrying out category labeling and screening out data serving as samples on the partial data with low rule model identification accuracy.
And S340, merging the marked first type candidate search data with second type candidate search data with accuracy higher than a first preset value obtained by identifying the rule model, and obtaining a first training sample data set.
And then merging the marked data with the data with high accuracy to obtain a first training sample data set.
S350, training the LSTM model by using the data in the first training sample data set to obtain a target LSTM model.
In one embodiment of the application, the first training sample data set is divided into a training data set, a test data set, an evaluation data set. Wherein the training data set is used for training the model, the test data set is used for evaluating the effect of the current model in the model training process, and the evaluation data set is used for evaluating the effect of the trained model
And training the LSTM model by using the training data set to obtain an LSTM classification model, wherein the LSTM classification model is used for verifying whether the intention type of the search data with lower accuracy output by the rule model is correct or not, so that the two types output are correct and incorrect respectively.
The process of training the model is a process of learning what kind of characteristics the training sample data of the same category has.
And then, evaluating the recognition effect of the LSTM classification model obtained by training by using the evaluation data set, and if the recognition effect accords with the expected effect, determining the current model as a final target LSTM model. If the recognition effect of the current model does not accord with the expected effect, S330-S350 are re-executed, and more data are screened for training and evaluation of the LSTM classification model.
The training process of the second deep learning model is as follows:
s360, category labeling is carried out on the third type candidate search data which cannot be identified by the rule model.
And for candidate search data which cannot be identified by the rule model, namely third-class candidate search data, performing class labeling based on manual experience.
The second deep learning model can identify the first class and the second class, so that two classes of classes need to be marked when marking the sample data, for example, credit, financing is the first class, car loan, house loan and the like is the second class of credit, and if a certain piece of search data relates to house loan, the marked label of the search data is credit-house loan.
And S370, merging the marked third type candidate search data with the second type candidate search data with the accuracy higher than the first preset value obtained by the rule model identification, and obtaining a second training sample data set.
And merging the marked third type of candidate search data with the candidate search data with higher accuracy to obtain a second training sample data set.
S380, training an LSTM model based on an attention mechanism by using the data in the second training sample data set to obtain a first-stage classification model.
The second deep learning model includes a first-level model (i.e., LSTM-Attention model) and a second-level model (TextCNN model), and thus, two-level models need to be trained separately.
Dividing the second training sample data set into a training data set, a test data set and an evaluation data set, and training an LSTM-attribute model by using the training data set; and then, evaluating the current LSTM-attribute model by using an evaluation data set, and determining the current LSTM-attribute model as a final first-stage classification model if the recognition effect accords with the expected effect. And if the recognition effect of the current LSTM-Attention model does not accord with the expected effect, repeating S360-S380, and screening more data to perform model training evaluation.
S390, respectively training the corresponding text CNN model according to the second training sample data corresponding to each secondary category corresponding to each primary category to obtain a secondary classification model corresponding to each secondary category.
And for each primary category, training the textCNN model corresponding to the secondary category by utilizing a training sample data set with the same secondary classification label contained in the primary category. For example, the primary category "credit" includes three secondary categories: and training the house credit, the car credit and the consumption credit aiming at each secondary classification to obtain a corresponding secondary classification model, and training the corresponding secondary classification model by using corresponding training sample data.
And then, evaluating the identification effect of the textCNN model corresponding to the current secondary category by using the corresponding evaluation data set, and using the current model as a secondary classification model corresponding to the secondary category if the effect accords with the expected effect. And if the effect does not accord with the expected effect, repeating the steps S360, S370 and S390, and screening more training data with the secondary classification label to train and evaluate the secondary classification model.
In the process of training the deep learning model provided by the embodiment, the LSTM classification model obtained through training can identify whether the identification result with lower accuracy obtained by the rule model is correct or not, and the classification result is obtained, so that the identification speed of the model is high, and the efficiency is high. The LSTM-Attention model and the textCNN model can identify search data which cannot be identified by the rule model, so that the accuracy and recall rate of the whole identification system are improved.
Corresponding to the embodiment of the search intention recognition method, the application also provides an embodiment of the search intention recognition device.
Referring to fig. 5, a schematic structural diagram of a search intention recognition device according to an embodiment of the present application is shown, where the device is applied to a device with computing capability, and as shown in fig. 5, the device includes:
The first intention recognition module 110 is configured to perform intention recognition on the obtained search text to be recognized by using the rule model, so as to obtain a first recognition result.
The first recognition result comprises an intention category and a corresponding accuracy rate corresponding to the search text to be recognized, the rule model comprises a plurality of recognition rules, and each recognition rule comprises a plurality of feature dictionaries with preset sequences and corresponds to one intention category.
The first determining module 120 is configured to determine, for a first recognition result with an accuracy higher than a first preset value, that an intention category in the first recognition result is a corresponding intention category of a search text to be recognized.
The second intention recognition module 130 is configured to re-perform intention recognition on the search text to be recognized corresponding to the first recognition result by using a deep learning model obtained by training in advance on the first recognition result with accuracy lower than the first preset value, so as to obtain a corresponding intention category.
In one embodiment of the application, in order to improve recognition efficiency and recall rate, for a search text which can be recognized by a rule model but has lower accuracy, a two-classification deep learning model (i.e. a first deep learning model) is adopted to verify whether a first recognition result obtained by the rule model is accurate. And for the search text which cannot be identified by the rule model, the intention category of the search text is identified by adopting a multi-category deep learning model (namely, a second deep learning model).
As shown in fig. 6, the second intention recognition module 130 includes:
the first intention recognition sub-module 131 is configured to re-perform intention recognition on the text to be recognized, which can be recognized by the rule model and has an accuracy lower than a first preset value, by using a first deep learning model obtained by training in advance, so as to obtain a classification result whether the first recognition result of the text to be recognized is correct.
In one embodiment of the present application, the first intention recognition sub-module 131 is specifically configured to:
performing intention recognition again on the text to be recognized, which can be recognized by the rule model but has the accuracy lower than a first preset value, by using the first deep learning model to obtain a second recognition result;
if the second recognition result is of the correct category, determining that the first recognition result corresponding to the search text to be recognized is correct; if the second recognition result is of an incorrect category, determining that the first recognition result corresponding to the search text to be recognized is incorrect.
The second intention recognition sub-module 132 is configured to re-perform intention recognition on the text to be recognized, which cannot be recognized by the rule model, by using a pre-trained second deep learning model, so as to obtain a corresponding intention category.
In one embodiment of the application, the second intent recognition sub-module 132 is specifically configured to:
Performing intention recognition on the search text to be recognized, which cannot be recognized by the rule model, by using a first-level classification model in the second deep learning model to obtain a first-level intention category of the search text to be recognized;
and carrying out intention recognition on the search text to be recognized by using a secondary classification model corresponding to the primary intention category to obtain a secondary intention category of the search text to be recognized.
According to the search intention recognition device provided by the embodiment, intention recognition is performed on a search text to be recognized by using a rule model to obtain a corresponding first recognition result; and carrying out intention recognition again by using the deep learning model to obtain a corresponding intention category for the text to be recognized, the accuracy of which is lower than the first preset value. And directly determining a corresponding first recognition result as an intention category corresponding to the search text to be recognized by utilizing the rule model to recognize the search text to be recognized, wherein the accuracy rate of the search text to be recognized is higher than a first preset value. As can be seen from the above, in this scheme, multiple models are used to perform multi-level recognition on a search text to be recognized, a rule model is used to ensure recognition accuracy, and a deep learning model is used to perform recognition on data that cannot be recognized or is inaccurate in rule model recognition, so that recall rate of a recognition result is ensured, and therefore, accuracy and recall rate of a search intention recognition result are high.
In one embodiment of the present application, the apparatus further includes a rule model obtaining module, which is specifically configured to obtain a rule model capable of identifying a search intention corresponding to the search text;
the rule model acquisition module is specifically used for:
screening candidate search data sets from the user search data;
performing proprietary word mining on the candidate search data set to obtain proprietary words;
dividing each piece of data in the candidate search data set to obtain candidate subsequences;
dividing exclusive words which are not contained in the existing feature dictionary and words in the candidate subsequence into corresponding feature dictionaries to obtain updated feature dictionaries;
labeling the feature dictionary to which the words in each candidate subsequence belong by using the updated feature dictionary, and generating a recognition rule;
and labeling the corresponding intention category for each identification rule to obtain a rule model.
The rule module obtaining module can obtain the rule model, and when the template (namely, the recognition rule) is constructed, the arrangement sequence among the feature dictionaries contained in the template is considered, so that when the rule model is used for carrying out intention recognition on the search text, the sequence of words in the search text is the same as the sequence of the dictionary matched with the template, the search text is considered to be matched with the template, in other words, the rule model considers the sequence among words in the search text, and the accuracy of the recognition result is improved.
In another embodiment of the present application, the apparatus further includes a first deep learning model obtaining module, configured to train to obtain a first deep learning model, where the first deep learning model is specifically configured to:
screening candidate search data sets from the user search data;
carrying out intention recognition on each piece of candidate search data in the candidate search data set by utilizing a rule model obtained in advance to obtain a corresponding recognition result;
performing category labeling on first-class candidate search data with accuracy lower than a first preset value, which are obtained by identifying a rule model;
combining the marked first type candidate search data with second type candidate search data with accuracy higher than a first preset value obtained by identifying a rule model to obtain a first training sample data set;
and training the LSTM model by using the data in the first training sample data set to obtain a target LSTM model.
In one embodiment of the present application, the apparatus further includes a second deep learning model acquisition module for training to obtain a second deep learning model, where the second deep learning model is specifically configured to:
screening candidate search data sets from the user search data;
carrying out intention recognition on each piece of candidate search data in the candidate search data set by utilizing a rule model obtained in advance to obtain a corresponding recognition result;
Performing category labeling on third-class candidate search data which cannot be identified by the rule model;
combining the marked third type candidate search data with second type candidate search data with accuracy higher than a first preset value, which are obtained by identifying the rule model, so as to obtain a second training sample data set;
training an LSTM model based on an attention mechanism by using data in the second training sample data set to obtain a first-stage classification model;
and respectively training the corresponding text CNN models aiming at training sample data sets corresponding to the secondary categories contained in the primary categories to obtain secondary classification models corresponding to the secondary categories, wherein the second deep learning model comprises all the primary classification models obtained through training and all the secondary classification models corresponding to the primary classification models.
The LSTM classification model obtained through training of the first deep learning model can identify whether the identification result with lower accuracy obtained by the rule model is correct or not, and the classification result is obtained, so that the identification speed of the model is high, and the efficiency is high. The LSTM-Attention model (first class model) and the textCNN model (second class model) can be used for identifying search data which cannot be identified by the rule model by training the second deep learning model, so that the accuracy and recall rate of the whole identification system are improved.
The present application provides a computing device comprising a processor and a memory having stored thereon a program executable on the processor. The processor, when running the program stored in the memory, implements the search intention recognition method described above.
The computing device herein may be a server, a PC, etc.
The present application also provides a storage medium executable by a computing device, the storage medium storing a program which, when executed by the computing device, implements the search intention recognition method described above.
For the foregoing method embodiments, for simplicity of explanation, the methodologies are shown as a series of acts, but one of ordinary skill in the art will appreciate that the present application is not limited by the order of acts, as some steps may, in accordance with the present application, occur in other orders or concurrently. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
It should be noted that the technical features in the various embodiments in the present specification may be arbitrarily combined and replaced. Moreover, each embodiment focuses on the differences from the other embodiments, and identical and similar parts between the various embodiments are sufficient to see each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
The steps in the method of the embodiments of the present application may be sequentially adjusted, combined, and deleted according to actual needs.
The device and the modules and the submodules in the terminal in the embodiments of the application can be combined, divided and deleted according to actual needs.
In the embodiments provided in the present application, it should be understood that the disclosed terminal, apparatus and method may be implemented in other manners. For example, the above-described terminal embodiments are merely illustrative, and for example, the division of modules or sub-modules is merely a logical function division, and there may be other manners of division in actual implementation, for example, multiple sub-modules or modules may be combined or integrated into another module, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules or sub-modules illustrated as separate components may or may not be physically separate, and components that are modules or sub-modules may or may not be physical modules or sub-modules, i.e., may be located in one place, or may be distributed over multiple network modules or sub-modules. Some or all of the modules or sub-modules may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional module or sub-module in the embodiments of the present application may be integrated in one processing module, or each module or sub-module may exist alone physically, or two or more modules or sub-modules may be integrated in one module. The integrated modules or sub-modules may be implemented in hardware or in software functional modules or sub-modules.
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 apparatus 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 apparatus. 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 apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (9)

1. A search intention recognition method, characterized by comprising:
performing intention recognition on the obtained text to be recognized by using a rule model to obtain a first recognition result, wherein the first recognition result comprises an intention category corresponding to the text to be recognized and a corresponding accuracy, the rule model comprises a plurality of recognition rules, and each recognition rule comprises a plurality of feature dictionaries with preset sequences and corresponds to one intention category;
For a first recognition result with the accuracy higher than a first preset value, determining that the intention category in the first recognition result is the intention category of the corresponding search text to be recognized;
for a first recognition result with the accuracy lower than the first preset value, performing intention recognition on a search text to be recognized corresponding to the first recognition result again by utilizing a deep learning model obtained through pre-training to obtain a corresponding intention category;
the method for identifying the intention of the search text to be identified, which corresponds to the first identification result, by utilizing a deep learning model obtained by training in advance, to the first identification result with the accuracy lower than the first preset value, and obtaining the corresponding intention category comprises the following steps:
the rule model can identify the text to be identified, the accuracy of which is lower than the first preset value, and the intention identification is carried out again by using a first deep learning model which is obtained by training in advance, so as to obtain a classification result whether the first identification result of the text to be identified is correct;
and carrying out intention recognition again on the search text to be recognized, which cannot be recognized by the rule model, by utilizing a pre-trained second deep learning model to obtain a corresponding intention category.
2. The method according to claim 1, wherein for the text to be identified, which can be identified by the rule model and has an accuracy lower than the first preset value, performing intent identification again by using a first deep learning model obtained by training in advance, to obtain a classification result of whether the first identification result of the text to be identified is correct, including:
performing intention recognition again on the text to be recognized, which can be recognized by the rule model but has the accuracy lower than the first preset value, by using the first deep learning model to obtain a second recognition result;
if the second recognition result is the correct category, determining that the first recognition result corresponding to the search text to be recognized is correct; and if the second recognition result is of an incorrect category, determining that the first recognition result corresponding to the search text to be recognized is incorrect.
3. The method of claim 1, wherein for the search text to be identified that cannot be identified by the rule model, re-performing intent identification using a pre-trained second deep learning model to obtain a corresponding intent category, comprising:
performing intention recognition on the text to be recognized, which cannot be recognized by the rule model, by using a first-level classification model in the second deep learning model to obtain a first-level intention category of the text to be recognized;
And carrying out intention recognition on the search text to be recognized by utilizing a secondary classification model corresponding to the primary intention category to obtain a secondary intention category of the search text to be recognized.
4. A method according to any one of claims 1-3, characterized in that the rule model is obtained by the following procedure:
screening candidate search data sets from the user search data;
performing proprietary word mining on the candidate search data set to obtain proprietary words;
dividing each piece of data in the candidate search data set to obtain candidate subsequences;
dividing exclusive words which are not contained in the existing feature dictionary and words in the candidate subsequence into corresponding feature dictionaries to obtain updated feature dictionaries;
labeling the feature dictionary to which the words in each candidate subsequence belong by using the updated feature dictionary, and generating a recognition rule;
and labeling the corresponding intention category for each identification rule to obtain the rule model.
5. A method according to any one of claims 1-3, wherein the training process of the first deep learning model is as follows:
screening candidate search data sets from the user search data;
Performing intention recognition on each piece of candidate search data in the candidate search data set by using a rule model obtained in advance to obtain a corresponding recognition result;
performing category labeling on the first type candidate search data with the accuracy rate lower than a first preset value, which is obtained by the rule model identification;
combining the marked first type candidate search data with second type candidate search data, wherein the accuracy rate of the second type candidate search data is higher than that of the first preset value, obtained by the identification of the rule model, so as to obtain a first training sample data set;
and training an LSTM model by using the data in the first training sample data set to obtain a target LSTM model.
6. A method according to any one of claims 1-3, wherein the training process of the second deep learning model is as follows:
screening candidate search data sets from the user search data;
performing intention recognition on each piece of candidate search data in the candidate search data set by using a rule model obtained in advance to obtain a corresponding recognition result;
performing category labeling on third-type candidate search data which cannot be identified by the rule model;
combining the marked third type candidate search data with second type candidate search data, the accuracy rate of which is higher than the first preset value, obtained by the identification of the rule model, so as to obtain a second training sample data set;
Training an LSTM model based on an attention mechanism by utilizing the data in the second training sample data set to obtain a first-stage classification model;
and respectively training the corresponding text CNN models aiming at training sample data sets corresponding to the secondary categories contained in the primary categories to obtain secondary classification models corresponding to the secondary categories, wherein the second deep learning model comprises all the primary classification models obtained through training and all the secondary classification models corresponding to the primary classification models.
7. A search intention recognition apparatus, characterized by comprising:
the first intention recognition module is used for carrying out intention recognition on the obtained text to be recognized by utilizing a rule model to obtain a first recognition result, wherein the first recognition result comprises an intention category corresponding to the text to be recognized and a corresponding accuracy rate, the rule model comprises a plurality of recognition rules, and each recognition rule comprises a plurality of feature dictionaries with preset sequences and corresponds to one intention category;
the first determining module is used for determining the intention category in the first recognition result as the intention category of the corresponding text to be recognized for searching for the first recognition result with the accuracy higher than a first preset value;
The second intention recognition module is used for carrying out intention recognition on the search text to be recognized corresponding to the first recognition result by utilizing a deep learning model obtained by training in advance on the first recognition result with the accuracy lower than the first preset value to obtain a corresponding intention category;
wherein the second intention recognition module includes:
the first intention recognition sub-module is used for carrying out intention recognition again by utilizing a first deep learning model which is obtained by training in advance aiming at the search text to be recognized, wherein the rule model can recognize the search text to be recognized, the accuracy rate of the search text to be recognized is lower than the first preset value, and a classification result of whether the first recognition result of the search text to be recognized is correct or not is obtained;
and the second intention recognition sub-module is used for carrying out intention recognition again by utilizing a pre-trained second deep learning model aiming at the search text to be recognized, which cannot be recognized by the rule model, so as to obtain a corresponding intention category.
8. The apparatus of claim 7, wherein the first intent recognition sub-module is specifically configured to:
performing intention recognition again on the text to be recognized, which can be recognized by the rule model but has the accuracy lower than the first preset value, by using the first deep learning model to obtain a second recognition result;
If the second recognition result is the correct category, determining that the first recognition result corresponding to the search text to be recognized is correct; and if the second recognition result is of an incorrect category, determining that the first recognition result corresponding to the search text to be recognized is incorrect.
9. The apparatus of claim 7, wherein the second intent recognition sub-module is specifically configured to:
performing intention recognition on the text to be recognized, which cannot be recognized by the rule model, by using a first-level classification model in the second deep learning model to obtain a first-level intention category of the text to be recognized;
and carrying out intention recognition on the search text to be recognized by utilizing a secondary classification model corresponding to the primary intention category to obtain a secondary intention category of the search text to be recognized.
CN202010315818.8A 2020-04-21 2020-04-21 Search intention recognition method and device Active CN111523311B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010315818.8A CN111523311B (en) 2020-04-21 2020-04-21 Search intention recognition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010315818.8A CN111523311B (en) 2020-04-21 2020-04-21 Search intention recognition method and device

Publications (2)

Publication Number Publication Date
CN111523311A CN111523311A (en) 2020-08-11
CN111523311B true CN111523311B (en) 2023-10-03

Family

ID=71904148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010315818.8A Active CN111523311B (en) 2020-04-21 2020-04-21 Search intention recognition method and device

Country Status (1)

Country Link
CN (1) CN111523311B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463960B (en) * 2020-10-30 2021-07-27 完美世界控股集团有限公司 Entity relationship determination method and device, computing equipment and storage medium
CN112395392A (en) * 2020-11-27 2021-02-23 浪潮云信息技术股份公司 Intention identification method and device and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930362A (en) * 2016-04-12 2016-09-07 晶赞广告(上海)有限公司 Search target recognition method and device, and terminal
CN106462604A (en) * 2014-05-12 2017-02-22 微软技术许可有限责任公司 Identifying query intent
CN109063221A (en) * 2018-11-02 2018-12-21 北京百度网讯科技有限公司 Query intention recognition methods and device based on mixed strategy
CN109885824A (en) * 2019-01-04 2019-06-14 北京捷通华声科技股份有限公司 A kind of Chinese name entity recognition method, device and the readable storage medium storing program for executing of level
CN110147445A (en) * 2019-04-09 2019-08-20 平安科技(深圳)有限公司 Intension recognizing method, device, equipment and storage medium based on text classification
CN110377911A (en) * 2019-07-23 2019-10-25 中国工商银行股份有限公司 Intension recognizing method and device under dialogue frame

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106462604A (en) * 2014-05-12 2017-02-22 微软技术许可有限责任公司 Identifying query intent
CN105930362A (en) * 2016-04-12 2016-09-07 晶赞广告(上海)有限公司 Search target recognition method and device, and terminal
CN109063221A (en) * 2018-11-02 2018-12-21 北京百度网讯科技有限公司 Query intention recognition methods and device based on mixed strategy
CN109885824A (en) * 2019-01-04 2019-06-14 北京捷通华声科技股份有限公司 A kind of Chinese name entity recognition method, device and the readable storage medium storing program for executing of level
CN110147445A (en) * 2019-04-09 2019-08-20 平安科技(深圳)有限公司 Intension recognizing method, device, equipment and storage medium based on text classification
CN110377911A (en) * 2019-07-23 2019-10-25 中国工商银行股份有限公司 Intension recognizing method and device under dialogue frame

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王冲 ; 张虎 ; 王鑫 ; 刘全明 ; .融合敏感词规则和字符级RCNN模型的用户意图识别.计算机应用与软件.2020,(03),全文. *

Also Published As

Publication number Publication date
CN111523311A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
CN106951422B (en) Webpage training method and device, and search intention identification method and device
US11379668B2 (en) Topic models with sentiment priors based on distributed representations
US11321671B2 (en) Job skill taxonomy
CN113392209B (en) Text clustering method based on artificial intelligence, related equipment and storage medium
CN112966068A (en) Resume identification method and device based on webpage information
CN111523311B (en) Search intention recognition method and device
Yu et al. NBSL: A supervised classification model of pull request in GitHub
Sarwar et al. An effective and scalable framework for authorship attribution query processing
Bhakuni et al. Evolution and evaluation: Sarcasm analysis for twitter data using sentiment analysis
CN113627151B (en) Cross-modal data matching method, device, equipment and medium
US10970488B2 (en) Finding of asymmetric relation between words
CN111241271B (en) Text emotion classification method and device and electronic equipment
Mitroi et al. Sentiment analysis using topic-document embeddings
CN109446321B (en) Text classification method, text classification device, terminal and computer readable storage medium
Sang et al. WEFEST: word embedding feature extension for short text classification
CN107729509B (en) Discourse similarity determination method based on recessive high-dimensional distributed feature representation
Ou et al. Refining BERT embeddings for document hashing via mutual information maximization
CN116151258A (en) Text disambiguation method, electronic device and storage medium
CN112463966B (en) False comment detection model training method, false comment detection model training method and false comment detection model training device
CN112528653B (en) Short text entity recognition method and system
Leuhu Sentiment analysis using machine learning
US11922515B1 (en) Methods and apparatuses for AI digital assistants
Mariyam et al. Long Document Classification using Hierarchical Attention Networks
Shukla Foundations and Applications of Authorship Attribution Analysis
Fernandez Computing the Linguistic-Based Cues of Credible and Not Credible News in the Philippines Towards Fake News Detection

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
CB02 Change of applicant information

Address after: 401121 b7-7-2, Yuxing Plaza, No.5 Huangyang Road, Yubei District, Chongqing

Applicant after: Chongqing duxiaoman Youyang Technology Co.,Ltd.

Address before: 201800 room j1328, 3 / F, building 8, 55 Huiyuan Road, Jiading District, Shanghai

Applicant before: SHANGHAI YOUYANG NEW MEDIA INFORMATION TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
TA01 Transfer of patent application right

Effective date of registration: 20211215

Address after: 100193 Room 606, 6 / F, building 4, West District, courtyard 10, northwest Wangdong Road, Haidian District, Beijing

Applicant after: Du Xiaoman Technology (Beijing) Co.,Ltd.

Address before: 401121 b7-7-2, Yuxing Plaza, No.5 Huangyang Road, Yubei District, Chongqing

Applicant before: Chongqing duxiaoman Youyang Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant