User Intention Recognition Method, Device, Computer Equipment and Storage Medium

By processing the sample set of standard problem text and user input sequences, training and evaluating the user intention recognition model, the problem of inaccurate intention recognition when user input is incomplete is solved, and more efficient user intention recognition and user experience improvement is achieved.

CN114943226BActive Publication Date: 2025-06-17SHANGHAI ZHENGDA XIMALAYA NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210597087.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-06-17
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

The existing user intention recognition method is difficult to accurately identify the user's intention when the problem text entered by the user is incomplete, resulting in a decline in user experience.

Method used

By obtaining multiple standard problem texts and user input sequences, the training sample set and test sample set are obtained based on the intent tag processing, and the user intent identification model is trained and evaluated, and the final user intent identification model is determined for intent identification.

Benefits of technology

When the problem text entered by the user is incomplete, the user's intention can be accurately identified, effectively solved the user's problems, and improved the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114943226B_ABST
    Figure CN114943226B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention provide a method, apparatus, computer device, and storage medium for user intention recognition, which relate to the field of computer technology. First, a plurality of standard question texts and a plurality of user input sequences are obtained; then, each standard question text is processed based on the intention label of each standard question text to obtain a training sample set, and each user input sequence is processed based on the clicked intention corresponding to each user input sequence to obtain a test sample set; next, a variety of pre-established user intention recognition models are trained using the training sample set to obtain a variety of trained user intention recognition models; finally, the test sample set is used to evaluate each trained user intention recognition model, and a final user intention recognition model is determined from the variety of trained user intention recognition models according to the evaluation results to perform intention recognition on the text input by the user each time, thereby effectively solving the user's problem and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a method and device for user intention recognition, a computer device, and a storage medium. Background Art

[0002] The existing user intention recognition methods are mainly based on retrieval methods, using manually set keywords, keyword weights, stop words, synonyms, and non-splittable words to achieve fuzzy matching. When the problem text input by the user is relatively complete, the existing methods can accurately recognize the user's intention. However, for the case where the problem text input by the user is incomplete, that is, the user only inputs some key information and ignores some morphemes that can locate the problem. Since the existing methods often only consider word information and do not consider semantic information, in this case, the application effect of the existing methods is poor, the accuracy of user intention recognition is low, the user's problem cannot be effectively solved, and the user experience is affected. Summary of the Invention

[0003] In order to overcome the deficiencies of the prior art, embodiments of the present invention provide a method and device for user intention recognition, a computer device, and a computer-readable storage medium, which can accurately recognize the user's intention when the problem text input by the user is incomplete, thereby effectively solving the user's problem and improving the user experience.

[0004] The embodiments of the present invention can be implemented as follows:

[0005] In a first aspect, the present invention provides a method for user intention recognition, the method comprising:

[0006] Obtaining a plurality of standard problem texts and a plurality of user input sequences;

[0007] Processing each of the standard problem texts based on the intention label of each of the standard problem texts to obtain a training sample set;

[0008] Processing each of the user input sequences based on the clicked intention corresponding to each of the user input sequences to obtain a test sample set;

[0009] Using the training sample set to train a variety of pre-established user intention recognition models to obtain a variety of trained user intention recognition models;

[0010] Using the test sample set to evaluate each of the trained user intention recognition models, and determining a final user intention recognition model from the variety of trained user intention recognition models according to the evaluation results to perform intention recognition on the text input by the user each time.

[0011] In an alternative embodiment, the step of processing each of the standard question texts based on the intent label of each standard question text to obtain a training sample set includes:

[0012] For any target text among the multiple standard question texts, split the target text into multiple morphemes;

[0013] Combine the multiple morphemes multiple times to obtain multiple sub-texts, where each sub-text includes at least one morpheme, and the position of each morpheme in any one of the sub-texts is the same as its position in the target text;

[0014] Associate each sub-text with the intent label corresponding to the target text to obtain a training sample group corresponding to the target text;

[0015] Traverse each of the standard question texts to obtain the training sample set, and the training sample set includes the training sample group corresponding to each standard question text.

[0016] In an alternative embodiment, the user input sequence includes multiple input texts, each of which is the text input by the user during two input pauses, and the multiple input texts are arranged in the order of user input;

[0017] The step of processing each user input sequence based on the clicked intent corresponding to each user input sequence to obtain a test sample set includes:

[0018] For any target sequence among the multiple user input sequences, combine all the input texts of the target sequence multiple times to obtain multiple user question texts, where each user question text includes at least one input text, and the position of each input text in any one of the user question texts is the same as the order of user input;

[0019] Associate each user question text with the clicked intent corresponding to the target sequence to obtain a test sample group corresponding to the target sequence;

[0020] Traverse each user input sequence to obtain the test sample set, and the test sample set includes the test sample group corresponding to each user input sequence.

[0021] In an alternative embodiment, the test sample set includes multiple test sample groups;

[0022] The step of using the test sample set to evaluate each trained user intent recognition model includes:

[0023] For any trained user intention recognition model, each of the test sample groups is input into the trained user intention recognition model for testing, and the test result corresponding to each test sample group is obtained;

[0024] According to the test results corresponding to all the test sample groups, calculate the value of a preset metric of the trained user intention recognition model, where the preset metric characterizes the success rate and rate when the trained user intention recognition model recognizes the user's intention;

[0025] Traverse each trained user intention recognition model to obtain the value of the preset metric of each trained user intention recognition model, so as to complete the evaluation of each trained user intention recognition model.

[0026] In an alternative embodiment, the test result includes the number of positive samples, where the number of positive samples represents the number of test sample data that pass the test in the test sample group, and the preset metric includes the recognition success rate metric;

[0027] The step of calculating the value of the preset metric of the trained user intention recognition model according to the test results corresponding to all the test sample groups includes:

[0028] Calculate the ratio of the sum of the number of positive samples of all the test sample groups to the total number of the test sample groups;

[0029] Take the ratio as the value of the recognition success rate metric of the trained user intention recognition model.

[0030] In an alternative embodiment, each test sample data in the test sample group is set with a serial number, the preset metric further includes a recognition rate metric, and the method further includes:

[0031] For each test sample group with a non-zero number of positive samples, take the minimum serial number of the test sample data that pass the test in the test sample group as the target serial number;

[0032] For each test sample group with a zero number of positive samples, take the maximum serial number of the test sample data in the test sample group as the target serial number;

[0033] Calculate the ratio of the sum of the target serial numbers of all the test sample groups to the total number of the test sample groups;

[0034] Take the ratio as the value of the recognition rate metric of the trained user intention recognition model.

[0035] In an alternative embodiment, the evaluation result includes the value of the recognition success rate metric and the value of the recognition rate metric;

[0036] The step of determining the final user intention recognition model from multiple trained user intention recognition models according to the evaluation results includes:

[0037] Taking the trained user intention recognition model with the largest value of the recognition success rate index and the smallest value of the recognition rate index as the final user intention recognition model.

[0038] In a second aspect, the present invention provides an input text completion device, which includes:

[0039] An acquisition module, configured to acquire a plurality of standard question texts and a plurality of user input sequences;

[0040] A processing module, configured to process each of the standard question texts based on the intention label of each standard question text to obtain a training sample set;

[0041] The processing module is further configured to process each of the user input sequences based on the clicked intention corresponding to each user input sequence to obtain a test sample set;

[0042] A training module, configured to use the training sample set to train a variety of pre-established user intention recognition models to obtain a variety of trained user intention recognition models;

[0043] A determination module, configured to use the test sample set to evaluate each of the trained user intention recognition models, and determine the final user intention recognition model from the variety of trained user intention recognition models according to the evaluation results, so as to perform intention recognition on the text input by the user each time.

[0044] In a third aspect, the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the user intention recognition method according to any one of the foregoing embodiments when executing the computer program.

[0045] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program implements the user intention recognition method according to any one of the foregoing embodiments when executed by a processor.

[0046] Compared with the prior art, a user intention recognition method, device, computer device and storage medium provided by an embodiment of the present invention first obtain a plurality of standard question texts and a plurality of user input sequences; then, process each standard question text based on the intention label of each standard question text to obtain a training sample set, and process each user input sequence based on the clicked intention corresponding to each user input sequence to obtain a test sample set; then, use the training sample set to train a variety of pre-established user intention recognition models to obtain a variety of trained user intention recognition models; finally, use the test sample set to evaluate each trained user intention recognition model, and determine the final user intention recognition model from the variety of trained user intention recognition models according to the evaluation results, so as to recognize the intention of the text input by the user each time. Since the embodiment of the present invention uses the training sample set obtained by processing each standard question text based on the intention label of each standard question text to train a variety of pre-established user intention recognition models, uses the test sample set obtained by processing each user input sequence based on the clicked intention corresponding to each user input sequence to evaluate each trained user intention recognition model, and determines the final user intention recognition model from the variety of trained user intention recognition models according to the evaluation results to recognize the intention of the text input by the user each time, it can accurately recognize the user's intention even when the question text input by the user is incomplete, thereby effectively solving the user's problem and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0048] Figure 1 FIG. is a schematic diagram of an application scenario of the user intention recognition method provided by an embodiment of the present invention;

[0049] Figure 2 FIG. is a schematic flowchart of the user intention recognition method provided by an embodiment of the present invention;

[0050] Figure 3 FIG. is a schematic flowchart of an implementation manner of step S102 provided by an embodiment of the present invention;

[0051] Figure 4 FIG. is a schematic flowchart of an implementation manner of step S103 provided by an embodiment of the present invention;

[0052] Figure 5It is a schematic flowchart of an implementation manner of step S105 provided by an embodiment of the present invention;

[0053] Figure 6 It is a schematic block diagram of a structure of a computer device provided by an embodiment of the present invention;

[0054] Figure 7 It is a functional unit block diagram of a user intention recognition device provided by an embodiment of the present invention.

[0055] Icons: 100 - computer device; 110 - memory; 120 - processor; 200 - user intention recognition device; 201 - acquisition module; 202 - processing module; 203 - training module; 204 - determination module. Detailed implementation manners

[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. Components of the embodiments of the present invention generally described and illustrated in the accompanying drawings herein can be arranged and designed in various different configurations.

[0057] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.

[0058] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0059] It should be noted that the features in the embodiments of the present invention can be combined with each other without conflict.

[0060] Please refer to Figure 1 , Figure 1An application scenario of the user intention recognition method provided by an embodiment of the present invention is shown. An application program is running on a mobile terminal (such as a mobile phone, a tablet computer, etc.). The user enters "how to purchase" in the search bar. The intelligent customer service of the application program performs user intention recognition on the text entered by the user, and multiple different recommended contents are displayed below the search bar, including "how to buy cheap air tickets", "how to buy albums", "how to buy high-speed rail tickets", etc. Moreover, the four characters "how to purchase" in each recommended content are displayed in bold, and the remaining part (such as air tickets, albums, high-speed rail tickets, clothes, etc.) is the result of the intelligent customer service's recognition of the user's intention. At this time, if the user's true intention is "album purchase", the user can directly click on the recommended content "how to buy albums". If the user's true intention is "member purchase", none of the current recommended contents hits the user's true intention. That is to say, when the problem text entered by the user is incomplete and lacks morphemes that can accurately locate the problem, it will cause the intelligent customer service to fail to accurately recognize the user's intention and cannot better and faster meet the user's needs.

[0061] In order to accurately recognize the user's intention when the problem text entered by the user is incomplete, thereby effectively solving the user's problem and improving the user experience, an embodiment of the present invention provides a user intention recognition method, device, computer device, and storage medium, which will be introduced in detail below.

[0062] Please refer to Figure 2 , Figure 2 which shows a process of the user intention recognition method applied to the Figure 1 scenario in the present invention embodiment. The user intention recognition method includes steps S101 to S105.

[0063] S101, obtain multiple standard problem texts and multiple user input sequences.

[0064] Among them, the standard problem text refers to the problem text entered by the user with all components complete and already marked by the intelligent customer service. For example, "how to purchase a membership", "how to buy albums", "how to renew the membership", etc.

[0065] The user input sequence contains multiple input texts. Each input text refers to the text entered by the user between two input pauses. For example, the user input sequence {how, renew, membership} means that the user enters "how", "renew", "membership" in sequence, there is a pause between entering "how" and entering "renew", and there is a pause between entering "renew" and entering "membership".

[0066] Both the standard problem text and the user input sequence can be obtained from the system log of the application program.

[0067] S102. Process each standard question text based on the intent label of each standard question text to obtain a training sample set.

[0068] Among them, the intent label is used to represent the user's own intent that the user expects to express through words. Historical texts can be obtained from the system logs of the application, and then based on the conversation scenarios, business categories, action types, etc. of the historical texts, statistical analysis methods can be used to refine the user's intent and generate intent labels.

[0069] Each standard question text has an intent label. For example, the intent label for "How to purchase a membership" is "Membership purchase", the intent label for "How to renew a membership" is "Membership renewal", etc., and the intent label for "How to query the balance" is "Balance query".

[0070] Since the components in the standard question text are complete, according to the intent label of each standard question text, the morphemes that can accurately locate the problem in each standard question text can be determined, and then the standard question text can be split and combined based on the located morphemes, and each processing result is associated with the corresponding intent label to obtain a training sample set.

[0071] S103. Process each user input sequence based on the clicked intent corresponding to each user input sequence to obtain a test sample set.

[0072] Among them, the clicked intent refers to the intent associated with the content recommended by the intelligent customer service that the user clicks during the process of inputting the question text, or the intent associated with the complete question text input by the user.

[0073] For example, when the user inputs "How" and "Purchase" and then clicks on "How to purchase an album" recommended by the intelligent customer service, the intent "Album purchase" associated with "How to purchase an album" is the clicked intent corresponding to the user input sequence {"How", "Purchase"}. When the user inputs "How", "Purchase", "Album" and then directly ends the input, and does not click on the content recommended by the intelligent customer service during the input process, since the user has input a complete question text, the clicked intent corresponding to the user input sequence {"How", "Purchase", "Album"} is "Album purchase".

[0074] Combine all the input texts in each user input sequence in the input order, and associate each combination result with the corresponding clicked intent to obtain a test sample set.

[0075] S104. Use the training sample set to train multiple pre-established user intent recognition models to obtain multiple trained user intent recognition models.

[0076] Among them, the user intention recognition model is used to represent the correspondence between the problem text input by the user and the intention label. A deep learning model can be used as the user intention recognition model, such as a bidirectional LSTM (Long Short Term Memory) network, a DMN (Dynamic Memory Network) network, and other models that support classification training, etc.

[0077] Input the training sample set into multiple pre-established user intention recognition models for training to obtain multiple trained user intention recognition models.

[0078] S105. Use the test sample set to evaluate each trained user intention recognition model, and determine the final user intention recognition model from multiple trained user intention recognition models according to the evaluation results, so as to recognize the intention of the text input by the user each time.

[0079] Among them, input the test sample set into each trained user intention recognition model respectively. According to the output situation of each trained user intention recognition model, evaluate each trained user intention recognition model, and then use the trained user intention recognition model with the highest recognition success rate and the fastest recognition rate as the final user intention recognition model according to the evaluation results. Put the determined final user intention recognition model online to recognize the intention that the text input by the user each time is expected to express.

[0080] The beneficial effect of the above method provided by the embodiments of the present invention is that, using the training sample set obtained by processing each standard problem text with the intention label based on each standard problem text, train multiple pre-established user intention recognition models, use the test sample set obtained by processing each user input sequence with the clicked intention corresponding to each user input sequence, evaluate each trained user intention recognition model, and determine the final user intention recognition model from multiple trained user intention recognition models according to the evaluation results to recognize the intention of the text input by the user each time. Thus, even when the problem text input by the user is incomplete, the intention of the user can be accurately recognized, and then the problem of the user can be effectively solved, improving the user experience.

[0081] The following will introduce step S102 in detail.

[0082] In order to enable the pre-established user intention recognition model to learn the relationship between the incomplete problem text input by the user and the intention that the user expects to express, it is necessary to process the standard problem text to obtain multiple incomplete problem texts, and the incomplete problem texts also need to meet the user's input habits. For this, the embodiments of the present invention provide an implementation manner of step S102.

[0083] Please refer toFigure 3 , Figure 3 shows a process of implementing step S102 provided by an embodiment of the present invention. Step S102 includes sub-steps S102-1 to S102-3.

[0084] S102-1. For any one target text among multiple standard question texts, split the target text into multiple morphemes.

[0085] Wherein, each sentence component of the target text is regarded as a morpheme to split the target text. For example, in the target text "How to purchase a membership", the adverbial "How", the predicate "purchase", and the subject "membership" are all split as morphemes from the standard text. That is to say, the target text "How to purchase a membership" is split into three morphemes: "How", "purchase", and "membership".

[0086] S102-2. Combine the multiple morphemes multiple times to obtain multiple sub-texts.

[0087] Wherein, each sub-text includes at least one morpheme, and the position of each morpheme in any one sub-text is the same as its position in the target text.

[0088] For example, the morphemes split from the target text "How to purchase a membership" are "How", "purchase", and "membership". Combining "How", "purchase", and "membership" multiple times, the obtained sub-text 1 is "How", sub-text 2 is "How to purchase", and sub-text 3 is "How to purchase a membership". The position of the morpheme "How" in sub-text 1, sub-text 2, and sub-text 3 is the first position, which is the same as its position in the target text. The position of the morpheme "purchase" in sub-text 2 and sub-text 3 is the second position, which is the same as its position in the target text. The position of the morpheme "membership" in sub-text 3 is the third position, which is the same as its position in the target text.

[0089] The sub-texts obtained by the above morpheme combination method meet the input habits of users, and at the same time avoid the influence of a large number of meaningless sub-texts obtained by the random combination method on the model training process.

[0090] S102-3. Associate each sub-text with the intent label corresponding to the target text to obtain a training sample group corresponding to the target text.

[0091] Wherein, the training sample set corresponding to the target text includes multiple training sample data, and each training sample data is obtained by associating a sub-text of the target text with the intent label corresponding to the target text.

[0092] For example, the target text "How to purchase a membership" with the intent label "Membership purchase" has three sub - texts. Associating sub - text 1 "How" with the intent label "Membership purchase" gives a training sample data [Question: How, Intent: Membership purchase]. Associating sub - text 2 "How to purchase" with the intent label "Membership purchase" gives a training sample data [Question: How to purchase, Intent: Membership purchase]. Associating sub - text 3 with the intent label "Membership purchase" gives a training sample data [Question: How to purchase a membership, Intent: Membership purchase]. That is, the training sample group corresponding to "How to purchase a membership" includes the training sample data [Question: How, Intent: Membership purchase], [Question: How to purchase, Intent: Membership purchase], and [Question: How to purchase a membership, Intent: Membership purchase].

[0093] Traverse each standard question text, and perform steps S102 - 1 to S102 - 3 on each standard text once to obtain the training sample group corresponding to each standard question text, and then obtain the training sample set from the training sample groups corresponding to each standard question text.

[0094] The following provides a detailed introduction to step S103.

[0095] In order to determine whether the trained user intent recognition model has learned the relationship between the incomplete question text input by the user and the intent the user expects to express, it is necessary to construct a suitable test sample set to test the trained user intent recognition model. For this, an implementation manner of step S103 is provided in an embodiment of the present invention.

[0096] Please refer to Figure 4 , Figure 4 , which shows a flow of an implementation manner of step S103 provided in an embodiment of the present invention. Step S103 includes sub - steps S103 - 1 to S103 - 2.

[0097] S103 - 1, for any target sequence among multiple user input sequences, perform multiple combinations on all input texts of the target sequence to obtain multiple user question texts.

[0098] Among them, each user question text includes at least one input text, and the position of each input text in any user question text is the same as the order of user input.

[0099] For example, the user inputs the sequence {How, Query, Balance}. After combining the three input texts, the user question text 1 is "How", the user question text 2 is "How to query", and the user question text 3 is "How to query the balance". The user input order of the input text "How" is the first, and its positions in the user question text 1, user question text 2, and user question text 3 are also the first. The user input order of the input text "Query" is the second, and its positions in the user question text 2 and user question text 3 are also the second. The user input order of the input text "Balance" is the third, and its position in the user question text 3 is also the third.

[0100] The user question texts obtained by the above combination method of the input texts meet the user's input habits, and at the same time avoid the influence of a large number of meaningless user question texts obtained by the random combination method on the model test results.

[0101] S103-2. Associate each user question text with the clicked intention corresponding to the target sequence to obtain a test sample group corresponding to the target sequence.

[0102] Among them, the test sample set corresponding to the target sequence includes multiple test sample data, and each test sample data is obtained by associating a user question text of the target sequence with the clicked intention corresponding to the target sequence.

[0103] For example, for the target sequence {How, Query, Balance} with the clicked intention of "Balance query", there are three user question texts. Associating the user question text 1 "How" with the clicked intention "Balance query" obtains a test sample data [Serial number: 1, Question: How, Intention: Balance query]. Associating the user question text 2 "How to query" with the clicked intention "Balance query" obtains a training sample data [Serial number: 2, Question: How to query, Intention: Balance query]. Associating the user question text 3 "How to query the balance" with the clicked intention "Balance query" obtains a test sample data [Serial number: 3, Question: How to query the balance, Intention: Balance query]. That is, the test sample group corresponding to the target sequence {How, Query, Balance} includes the test sample data [Serial number: 1, Question: How, Intention: Balance query], [Serial number: 2, Question: How to query, Intention: Balance query], and [Serial number: 3, Question: How to query the balance, Intention: Balance query].

[0104] Traverse each user input sequence, execute steps S103-1 to S103-3 for each user input sequence once to obtain a test sample group corresponding to each user input sequence, and then obtain a test sample set from the test sample groups corresponding to each user input sequence.

[0105] Understandably, each test sample group represents a user input process, and any test sample data in the test sample group represents the problem text formed by the user at a pause during an input. The serial number of the test sample data reflects the number of pauses during the user input process.

[0106] For example, the test sample data [serial number: 2, question: How to query, intent: Balance query] means that when the user pauses for the second time, the formed text is "How to query".

[0107] The following details step S105.

[0108] In order to determine the best-performing model from multiple trained user intent recognition models for going live, it is necessary to evaluate each trained user intent recognition model using the constructed test sample set. For this, an implementation manner of step S105 is provided in an embodiment of the present invention.

[0109] Please refer to Figure 5 , Figure 5 which shows a flow of an implementation manner of step S105 provided in an embodiment of the present invention. Step S105 includes sub-steps S105-1 to S105-3.

[0110] S105-1, for any one of the trained user intent recognition models, input each test sample group into the trained user intent recognition model for testing respectively to obtain the test result corresponding to each test sample group.

[0111] Among them, since each test sample group represents a user input process, any test sample data in the test sample group represents the problem text formed by the user at a pause during an input, and the serial number of the test sample data reflects the number of pauses during the user output process, then the process of inputting a test sample group into the trained user intent recognition model for testing can be regarded as a process in which the trained user intent recognition model recognizes the user's intent based on the formed problem text at each input pause. For any one of the trained user intent recognition models, count the test sample data that passes the test and the test sample data that fails the test in each test sample group.

[0112] S105-2, calculate the value of the preset index of the trained user intent recognition model according to the test results corresponding to all test sample groups.

[0113] Among them, the preset index includes an identification success rate index and an identification rate index. The identification success rate index represents the success rate of the trained user intent recognition model when recognizing the user's intent. The identification rate index represents the rate of the trained user intent recognition model when recognizing the user's intent.

[0114] Calculate the values of the recognition success rate metric and the recognition rate metric based on the test sample data that passed the test and the test sample data that failed the test in each test sample group.

[0115] The calculation process of the value of the recognition success rate metric is as follows:

[0116] First, calculate the ratio of the sum of the positive sample quantities of all test sample groups to the total number of test sample groups.

[0117] Then, use the ratio as the value of the recognition success rate metric of the trained user intention recognition model.

[0118] Among them, the test result of each test sample group includes the positive sample quantity, and the positive sample quantity represents the number of test sample data that passed the test in this test sample group. Count the total number of test sample data that passed the test in all test sample groups and divide it by the total number of test sample groups, and use the obtained average positive sample quantity as the value of the recognition success rate metric.

[0119] It can be understood that the larger the value of the recognition success rate metric, the higher the success rate of the model in recognizing the user's intention.

[0120] The calculation process of the value of the recognition rate metric is as follows:

[0121] First, for each test sample group with a non-zero positive sample quantity, use the smallest serial number of the test sample data that passed the test in the test sample group as the target serial number.

[0122] At the same time, for each test sample group with a positive sample quantity of 0, use the largest serial number of the test sample data in the test sample group as the target serial number.

[0123] Then, calculate the ratio of the sum of the target serial numbers of all test sample groups to the total number of test sample groups.

[0124] Finally, use the ratio as the value of the recognition rate metric of the trained user intention recognition model.

[0125] Among them, since the model recognizes the user's intention based on the formed question text every time the input pauses, the target serial number represents the number of intention recognitions that the model has performed when the model first recognizes the user's intention. For any test sample group, if its positive sample quantity is non-zero, it means that there is test sample data that passed the test in this test sample group, then use the smallest serial number of the test sample data that passed the test as the target serial number. If the positive sample quantity of this test sample group is 0, it means that there is no test sample data that passed the test in this test sample group, then use the largest serial number of the test sample data in this test sample group as the target serial number.

[0126] For example, the test sample data in a certain test sample group includes [Serial number: 1, Question: What, Intention: Balance query], [Serial number: 2, Question: How to query, Intention: Balance query], and [Serial number: 3, Question: How to query the balance, Intention: Balance query]. If the ones that pass the test are [Serial number: 2, Question: How to query, Intention: Balance query] and [Serial number: 3, Question: How to query the balance, Intention: Balance query], then the target serial number is 2, which means that the model successfully recognizes the user's intention based on the question text "How to query" formed when the user pauses for the second input. If there is no test sample data that passes the test, then the target serial number is 3, which means that the model performs three intention recognitions during the user's input process.

[0127] Obtain the sum of the target serial numbers of all test sample groups, and divide it by the total number of test sample groups. Use the obtained value as the value of the recognition rate index.

[0128] It can be understood that the smaller the value of the recognition rate index, the faster the model recognizes the user's intention.

[0129] Traverse each trained user intention recognition model, and execute steps S105-1 to S105-2 for each trained user intention model once to obtain the value of the preset index of each trained user intention recognition model, so as to complete the evaluation of each trained user intention recognition model.

[0130] S105-3, Use the trained user intention recognition model with the largest value of the recognition success rate index and the smallest value of the recognition rate index as the final user intention recognition model.

[0131] Among them, since the value of the recognition success rate index is proportional to the success rate of the model in recognizing the user's intention, and the value of the recognition rate index is inversely proportional to the rate of the model in recognizing the user's intention, select the trained user intention recognition model with the largest value of the recognition success rate index and the smallest value of the recognition rate index from multiple trained user intention recognition models as the final user intention recognition model.

[0132] Furthermore, an embodiment of the present invention also provides a structural schematic diagram of a computer device 100. Please refer to Figure 6 , The computer device 100 may include a memory 110 and a processor 120.

[0133] Among them, the processor 120 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of a program for the user intention recognition method provided in the foregoing method embodiments.

[0134] The memory 110 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 110 may exist independently and be connected to the processor 120 through a communication bus. The memory 110 may also be integrated with the processor 120. Among them, the memory 110 is used to store machine-executable instructions for executing the solution of this application. The processor 120 is used to execute the machine-executable instructions stored in the memory 110 to implement the foregoing method embodiments.

[0135] The embodiment of the present invention also provides a computer-readable storage medium containing a computer program, and the computer program can be used to perform related operations in the user intention recognition method provided in the foregoing method embodiments when executed.

[0136] Please refer to Figure 7 , Figure 7 FIG. is a functional unit block diagram of a user intention recognition device 200 provided by an embodiment of the present invention. The user intention recognition device 200 is applied to a computer device 100 and may include an acquisition module 201, a processing module 202, a training module 203, and a determination module 204. Among them, the acquisition module 201, the processing module 202, the training module 203, and the determination module 204 can all be stored in the memory or computer-readable storage medium in software form. It should be noted that for the user intention recognition device 200 provided by the embodiment of the present invention, its basic principle and the technical effects produced are the same as those of the foregoing embodiments. For the sake of brief description, the parts not mentioned in the embodiment of the present invention are not pointed out.

[0137] An acquisition module 201, configured to acquire a plurality of standard question texts and a plurality of user input sequences;

[0138] A processing module 202, configured to process each standard question text based on the intent label of each standard question text to obtain a training sample set;

[0139] The processing module 202 is further configured to process each user input sequence based on the clicked intent corresponding to each user input sequence to obtain a test sample set;

[0140] A training module 203, configured to use the training sample set to train a plurality of pre-established user intent recognition models to obtain a plurality of trained user intent recognition models;

[0141] A determination module 204, configured to use the test sample set to evaluate each trained user intent recognition model, and determine a final user intent recognition model from the plurality of trained user intent recognition models according to the evaluation result, so as to perform intent recognition on the text input by the user each time.

[0142] In one implementation, the processing module 202 is specifically configured to, for any target text among the plurality of standard question texts, split the target text into a plurality of morphemes; perform multiple combinations on the plurality of morphemes to obtain a plurality of sub-texts, where each sub-text includes at least one morpheme, and the position of each morpheme in any sub-text is the same as its position in the target text; associate each sub-text with the intent label corresponding to the target text to obtain a training sample group corresponding to the target text; traverse each standard question text to obtain a training sample set, and the training sample set includes the training sample group corresponding to each standard question text.

[0143] In one implementation, the user input sequence includes a plurality of input texts, each input text is the text input by the user during two input pauses, and the plurality of input texts are arranged in the order of user input. The processing module 202 is further specifically configured to, for any target sequence among the plurality of user input sequences, perform multiple combinations on all the input texts of the target sequence to obtain a plurality of user question texts, where each user question text includes at least one input text, and the position of each input text in any user question text is the same as the order of user input; associate each user question text with the clicked intent corresponding to the target sequence to obtain a test sample group corresponding to the target sequence; traverse each user input sequence to obtain a test sample set, and the test sample set includes the test sample group corresponding to each user input sequence.

[0144] In one implementation, the test sample set includes multiple test sample groups. The determination module 204 is specifically configured to, for any trained user intention recognition model, input each test sample group into the trained user intention recognition model for testing respectively to obtain the test result corresponding to each test sample group; calculate the value of a preset metric of the trained user intention recognition model according to the test results corresponding to all test sample groups, where the preset metric characterizes the success rate and rate of the trained user intention recognition model when recognizing the user's intention; traverse each trained user intention recognition model to obtain the value of the preset metric of each trained user intention recognition model, so as to complete the evaluation of each trained user intention recognition model.

[0145] In one implementation, the test result includes the number of positive samples, where the number of positive samples characterizes the number of test sample data that pass the test in the test sample group. The preset metric includes the recognition success rate metric. When the determination module 204 is used to calculate the value of the preset metric of the trained user intention recognition model according to the test results corresponding to all test sample groups, it is further configured to calculate the ratio of the sum of the number of positive samples of all test sample groups to the total number of test sample groups; and use the ratio as the value of the recognition success rate metric of the trained user intention recognition model.

[0146] In one implementation, each test sample data in the test sample group is set with a serial number. The preset metric further includes the recognition rate metric. When the determination module 204 is used to calculate the value of the preset metric of the trained user intention recognition model according to the test results corresponding to all test sample groups, it is further configured to, for each test sample group with a non-zero number of positive samples, use the smallest serial number of the test sample data that pass the test in the test sample group as the target serial number; for each test sample group with a zero number of positive samples, use the largest serial number of the test sample data in the test sample group as the target serial number; calculate the ratio of the sum of the target serial numbers of all test sample groups to the total number of test sample groups; and use the ratio as the value of the recognition rate metric of the trained user intention recognition model.

[0147] In one implementation, the evaluation result includes the value of the recognition success rate metric and the value of the recognition rate metric. The determination module 204 is further specifically configured to use the trained user intention recognition model with the largest value of the recognition success rate metric and the smallest value of the recognition rate metric as the final user intention recognition model.

[0148] In summary, a user intention recognition method, device, computer device, and storage medium provided by an embodiment of the present invention first obtain a plurality of standard question texts and a plurality of user input sequences; then, process each standard question text based on the intention label of each standard question text to obtain a training sample set, and process each user input sequence based on the clicked intention corresponding to each user input sequence to obtain a test sample set; next, use the training sample set to train a variety of pre-established user intention recognition models to obtain a variety of trained user intention recognition models; finally, use the test sample set to evaluate each trained user intention recognition model, and determine the final user intention recognition model from the variety of trained user intention recognition models according to the evaluation results to recognize the intention of the text input by the user each time. Since the embodiment of the present invention uses the training sample set obtained by processing each standard question text based on the intention label of each standard question text to train a variety of pre-established user intention recognition models, uses the test sample set obtained by processing each user input sequence based on the clicked intention corresponding to each user input sequence to evaluate each trained user intention recognition model, and determines the final user intention recognition model from the variety of trained user intention recognition models according to the evaluation results to recognize the intention of the text input by the user each time, it can accurately recognize the user's intention even when the question text input by the user is incomplete, thereby effectively solving the user's problem and improving the user experience.

[0149] The above are only the specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A method for identifying user intent, characterized in that, The method includes: Obtaining a plurality of standard question texts and a plurality of user input sequences; Processing each of the standard question texts based on the intent label of each standard question text to obtain a training sample set; Processing each of the user input sequences based on the clicked intent corresponding to each user input sequence to obtain a test sample set, where the user input sequence includes a plurality of input texts, and each of the input texts is the text input by the user during two input pauses, and the plurality of input texts are arranged in the order of user input; The step of processing each of the user input sequences based on the clicked intent corresponding to each user input sequence to obtain a test sample set includes: For any one target sequence among the plurality of user input sequences, performing multiple combinations on all the input texts of the target sequence to obtain a plurality of user question texts, where each of the user question texts includes at least one input text, and the position of each input text in any one of the user question texts is the same as the order of user input; Associating each of the user question texts with the clicked intent corresponding to the target sequence to obtain a test sample group corresponding to the target sequence; Traversing each of the user input sequences to obtain the test sample set, where the test sample set includes the test sample groups corresponding to each of the user input sequences; Using the training sample set to train a variety of pre-established user intent recognition models to obtain a variety of trained user intent recognition models; Using the test sample set to evaluate each of the trained user intent recognition models, and determining a final user intent recognition model from the variety of trained user intent recognition models according to the evaluation results to perform intent recognition on the text input by the user each time, where the test sample set includes a plurality of test sample groups; The step of using the test sample set to evaluate each of the trained user intent recognition models includes: For any one of the trained user intent recognition models, respectively inputting each of the test sample groups into the trained user intent recognition model for testing to obtain the test results corresponding to each of the test sample groups; According to the test results corresponding to all the test sample groups, calculating the value of a preset index of the trained user intent recognition model, where the preset index characterizes the success rate and rate of the trained user intent recognition model when recognizing the intent of the user; Traversing each of the trained user intent recognition models to obtain the value of the preset index of each of the trained user intent recognition models to complete the evaluation of each of the trained user intent recognition models.

2. The method according to claim 1, characterized in that, The step of processing each of the standard question texts based on the intent label of each standard question text to obtain a training sample set includes: For any one target text among the plurality of standard question texts, splitting the target text into a plurality of morphemes; Performing multiple combinations on the plurality of morphemes to obtain a plurality of sub-texts, where each of the sub-texts includes at least one morpheme, and the position of each morpheme in any one of the sub-texts is the same as its position in the target text; Associate each of the sub-texts with the intent label corresponding to the target text to obtain a training sample group corresponding to the target text; Traverse each of the standard question texts to obtain the training sample set, where the training sample set includes the training sample groups corresponding to each of the standard question texts.

3. The method according to claim 1, characterized in that, The test result includes the positive sample quantity, which represents the number of test sample data that pass the test in the test sample group, and the preset index includes the recognition success rate index; The step of calculating the value of the preset index of the trained user intent recognition model according to the test results corresponding to all the test sample groups includes: Calculate the ratio of the sum of the positive sample quantities of all the test sample groups to the total number of the test sample groups; Take the ratio as the value of the recognition success rate index of the trained user intent recognition model.

4. The method according to claim 3, characterized in that, Each test sample data in the test sample group is assigned a serial number, the preset index further includes a recognition rate index, and the method further includes: For each test sample group with a non-zero positive sample quantity, take the smallest serial number of the test sample data that pass the test in the test sample group as the target serial number; For each test sample group with a positive sample quantity of 0, take the largest serial number of the test sample data in the test sample group as the target serial number; Calculate the ratio of the sum of the target serial numbers of all the test sample groups to the total number of the test sample groups; Take the ratio as the value of the recognition rate index of the trained user intent recognition model.

5. The method according to claim 1, characterized in that, The evaluation result includes the value of the recognition success rate index and the value of the recognition rate index; The step of determining the final user intent recognition model from multiple trained user intent recognition models according to the evaluation result includes: Take the trained user intent recognition model with the largest value of the recognition success rate index and the smallest value of the recognition rate index as the final user intent recognition model.

6. A device for identifying user intent, characterized in that, The device includes: An acquisition module, configured to acquire a plurality of standard question texts and a plurality of user input sequences; A processing module, configured to process each of the standard question texts based on the intent label of each of the standard question texts to obtain a training sample set; The processing module is further configured to process each of the user input sequences based on the clicked intent corresponding to each of the user input sequences to obtain a test sample set. The user input sequence includes a plurality of input texts, and each of the input texts is the text input by the user during two input pauses. The plurality of input texts are arranged in the order of user input. The processing module is configured to: For any target sequence among the plurality of user input sequences, perform multiple combinations on all the input texts of the target sequence to obtain a plurality of user question texts, where each user question text includes at least one input text, and the position of each input text in any one of the user question texts is the same as the order of user input; Associate each of the user question texts with the clicked intent corresponding to the target sequence to obtain a test sample group corresponding to the target sequence; Traverse each of the user input sequences to obtain the test sample set, where the test sample set includes a test sample group corresponding to each user input sequence; A training module, configured to use the training sample set to train a variety of pre-established user intention recognition models to obtain a variety of trained user intention recognition models; A determination module, configured to use the test sample set to evaluate each trained user intention recognition model, and determine a final user intention recognition model from the variety of trained user intention recognition models according to the evaluation results, so as to perform intention recognition on the text input by the user each time. The test sample set includes multiple test sample groups; the determination module is configured to: For any one of the trained user intention recognition models, input each of the test sample groups into the trained user intention recognition model for testing respectively to obtain a test result corresponding to each test sample group; According to the test results corresponding to all the test sample groups, calculate the value of a preset index of the trained user intention recognition model, where the preset index represents the success rate and rate of the trained user intention recognition model when recognizing the user's intention; Traverse each of the trained user intention recognition models to obtain the value of the preset index of each trained user intention recognition model, so as to complete the evaluation of each trained user intention recognition model.

7. A computer device, characterized in that, It includes a memory and a processor. The memory stores a computer program, and the processor implements the user intention recognition method according to any one of claims 1-5 when executing the computer program.

8. A computer-readable storage medium, on which a computer program is stored, characterized in that, The computer program, when executed by the processor, implements the user intention recognition method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Information pushing method and device

    CN112380331A