A feedback data determination method and device for user intent and electronic equipment
By receiving user input data in the dialogue system, performing intent recognition and keyword extraction, obtaining second keywords that meet the conditions, and using a large language model to determine feedback data, the problem of mismatch between user input and feedback is solved, and the matching degree and user satisfaction are improved.
Patent Information
- Application Number
- CN202410862102.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-06-28
AI Technical Summary
In existing dialogue systems, the questions input by users are inaccurate or mismatched with the feedback information, resulting in low user satisfaction.
By receiving user input data, we perform intent recognition and keyword extraction to determine whether the keywords meet the search criteria. If they do not, we obtain the second keyword that meets the criteria and use a large language model and user data to determine the feedback data to improve the matching accuracy.
This improved the matching degree between feedback data and user input data, and enhanced user satisfaction with the feedback data.
Smart Images

Figure CN118861198B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification belongs to the technical field of artificial intelligence, and particularly relates to a feedback data determination method and device for user intent and electronic equipment. BACKGROUND
[0002] Under the background of the rapid development of current large language models, the dialogue system has become an important tool for enterprises to improve customer service and user experience. However, the dialogue system often has the problem that the information between the user input and the feedback is not accurate or not matched, which significantly limits the effectiveness of the dialogue system, and thus affects the user satisfaction.
[0003] In view of the above problems, no effective solution has been proposed so far. SUMMARY
[0004] The present specification provides a feedback data determination method and device for user intent and electronic equipment, which solves the problem of low data retrieval effect and matching degree of the dialogue system by filling the keyword deficiency condition of the user input data and screening the problem result matching degree.
[0005] The present specification provides a feedback data determination method for user intent, comprising:
[0006] receiving input data of a user;
[0007] performing intent recognition processing on the input data to obtain a target intent corresponding to the input data, and performing keyword extraction processing on the input data to obtain a first keyword corresponding to the input data;
[0008] obtaining a retrieval condition corresponding to the target intent, and determining whether the first keyword satisfies the retrieval condition;
[0009] The retrieval condition is used to determine feedback data for the target intent.
[0010] In the case where the first keyword does not satisfy the retrieval condition, a second keyword satisfying the retrieval condition is obtained according to user data of the user;
[0011] Based on the second keyword and the target intent, first feedback data corresponding to the input data is determined;
[0012] Using a preset large language model, target feedback data corresponding to the input data is determined according to the prompt word corresponding to the target intent and the first feedback data.
[0013] In an embodiment, the first keyword comprises a plurality of sub-keywords, the search condition comprises a plurality of sub-search conditions, and the obtaining, according to the user data of the user, of a second keyword satisfying the search condition comprises:
[0014] respectively screening the sub-keywords corresponding to the sub-search conditions to obtain a first sub-keyword in the first keyword that does not satisfy the sub-search condition and a second sub-keyword in the first keyword that satisfies the sub-search condition;
[0015] obtaining, according to the user data of the user, a target keyword satisfying the sub-search condition corresponding to the first sub-keyword based on the sub-search condition corresponding to the first sub-keyword;
[0016] determining the second keyword satisfying the search condition based on the second sub-keyword and the target keyword.
[0017] In an embodiment, the method further comprises:
[0018] in a case where the first keyword satisfies the search condition, determining second feedback data corresponding to the input data based on the first keyword and the target intent;
[0019] determining, by using a preset large language model, target feedback data corresponding to the input data based on the prompt word corresponding to the target intent and the second feedback data.
[0020] In an embodiment, the determining, by using the preset large language model, of the target feedback data corresponding to the input data based on the prompt word corresponding to the target intent and the first feedback data comprises:
[0021] obtaining a matching degree between the input data and the first feedback data, and screening the first feedback data based on the matching degree to obtain third feedback data;
[0022] determining, by using the preset large language model, the target feedback data corresponding to the input data based on the prompt word corresponding to the target intent and the third feedback data.
[0023] In an embodiment, the obtaining the matching degree between the input data and the first feedback data comprises:
[0024] determining, according to a preset classification model, a category label between the input data and each of the first feedback data;
[0025] determining the matching degree between the input data and the first feedback data based on the category label between the input data and each of the first feedback data.
[0026] In one embodiment, the preset classification model is trained in the following manner:
[0027] The second model structure is obtained and trained using second sample data;
[0028] An initial classification model is constructed based on the second model structure; wherein the initial classification model at least includes the initial first model structure and the second model structure;
[0029] The initial classification model is trained using first sample data to obtain the preset classification model; wherein the data quantity of the second sample data is greater than that of the first sample data.
[0030] In one embodiment, before the target feedback data corresponding to the input data is determined using the preset large language model according to the prompt word corresponding to the target intent and the first feedback data, the method further comprises:
[0031] Obtaining a prompt word template corresponding to the target intent;
[0032] Using a preset prompt word determination model to determine the prompt word corresponding to the target intent according to the target intent and the corresponding prompt word template, the preset prompt word determination model being a model for determining the prompt word corresponding to the intent based on a preset deep learning algorithm.
[0033] The present specification provides a feedback data determination device for user intent, comprising:
[0034] A data receiving module for receiving input data of a user;
[0035] An extraction processing module for performing intent recognition processing on the input data to obtain a target intent corresponding to the input data, and performing keyword extraction processing on the input data to obtain a first keyword corresponding to the input data;
[0036] A condition judging module for obtaining a search condition corresponding to the target intent and judging whether the first keyword meets the search condition; wherein the search condition is used to determine feedback data for the target intent;
[0037] A keyword determination module for obtaining a second keyword meeting the search condition according to user data of the user in the case that the first keyword does not meet the search condition;
[0038] A feedback determination module for determining first feedback data corresponding to the input data based on the second keyword and the target intent;
[0039] The feedback output module is configured to determine target feedback data corresponding to the input data by using a preset large language model according to the prompt word corresponding to the target intent and the first feedback data.
[0040] The present specification also provides an electronic device including a processor and a memory for storing processor-executable instructions, the processor implementing a feedback data determination method for a user intent when executing the instructions.
[0041] The present specification also provides a computer-readable storage medium having stored thereon computer instructions, the instructions implementing a feedback data determination method for a user intent when executed.
[0042] Based on the feedback data determination method and device for a user intent provided in the present specification, by receiving input data of a user, performing intent recognition processing on the input data to obtain a target intent corresponding to the input data, and performing keyword extraction processing on the input data to obtain first keywords corresponding to the input data, a search condition corresponding to the target intent is obtained, and it is determined whether the first keywords meet the search condition; wherein the search condition is used to determine feedback data for the target intent; in the case where the first keywords do not meet the search condition, second keywords meeting the search condition are obtained according to user data of the user; based on the second keywords and the target intent, first feedback data corresponding to the input data is determined; and by using a preset large language model, target feedback data corresponding to the input data is determined according to the prompt word corresponding to the target intent and the first feedback data. In this way, first, since in the case where the first keywords do not meet the search condition, second keywords meeting the search condition can be obtained according to the user data of the user, and then the first feedback data is determined through the second keywords meeting the search condition and the target intent, the problem that the matching degree between the feedback data retrieved and the input data of the user is poor due to the lack of keywords meeting the search condition can be avoided, that is, the matching degree between the first feedback data and the input data of the user can be improved through the second keywords meeting the search condition, and then the target feedback data matching the input data of the user is determined through the first feedback data. Secondly, by using the preset large language model according to the prompt word corresponding to the target intent and the first feedback data, the satisfaction of the user with the target feedback data can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present specification, the drawings needed in the embodiments will be briefly introduced as follows. The drawings described below are only some embodiments described in the present specification, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0044] Figure 1 is a flowchart of a feedback data determination method for user intent provided by an embodiment of the present specification;
[0045] Figure 2 is a structural composition diagram of an electronic device provided by an embodiment of the present specification;
[0046] Figure 3 is a schematic diagram of a feedback data determination device for user intent provided by an embodiment of the present specification;
[0047] Figure 4 is a main flowchart of a feedback data determination method for user intent provided by an embodiment of the present specification;
[0048] Figure 5 is an architecture diagram of a feedback data determination method for user intent provided by an embodiment of the present specification. DETAILED DESCRIPTION
[0049] In order to enable persons skilled in the art to better understand the technical solutions in the present specification, the technical solutions in the present specification will be described clearly and completely in conjunction with the drawings in the embodiments of the present specification. Obviously, the described embodiments are only part of the embodiments of the present specification, not all embodiments. Based on the embodiments in the present specification, all other embodiments obtained by persons skilled in the art without creative labor should be within the scope of protection of the present specification.
[0050] Referring to Figure 1 The present specification provides a feedback data determination method for user intent, wherein the method is specifically applied to the server side. In specific implementation, the method can include the following contents:
[0051] S101: receiving input data of a user.
[0052] S102: performing intent recognition processing on the input data to obtain a target intent corresponding to the input data, and performing keyword extraction processing on the input data to obtain a first keyword corresponding to the input data.
[0053] S103: obtaining a search condition corresponding to the target intent, and judging whether the first keyword meets the search condition; wherein the search condition is used to determine feedback data for the target intent.
[0054] S104: In a case where the first keyword does not satisfy the search condition, a second keyword satisfying the search condition is obtained according to user data of the user.
[0055] S105: First feedback data corresponding to the input data is determined based on the second keyword and the target intent.
[0056] S106: Target feedback data corresponding to the input data is determined by using a preset large language model according to a prompt word corresponding to the target intent and the first feedback data.
[0057] The input data of the user can be text data or voice data input by the user on a webpage or a client.
[0058] The keyword can be a word or a short sentence having a prompt or a correlation with the target intent corresponding to the input data of the user.
[0059] The search condition can be a search requirement required to represent the target intent corresponding to the input data of the user.
[0060] The large language model (LLM) can be an artificial intelligence model for natural language processing by using a preset deep learning technology.
[0061] Based on the above embodiment, first, in a case where the first keyword does not satisfy the search condition, a second keyword satisfying the search condition can be obtained according to user data of the user, and then first feedback data can be determined through the second keyword satisfying the search condition and the target intent, so as to avoid the problem that the matching degree between the feedback data retrieved and the input data of the user is poor due to the lack of a keyword satisfying the search condition, that is, the matching degree between the first feedback data and the input data of the user can be improved through the second keyword satisfying the search condition, and then the target feedback data matched with the input data of the user can be determined through the first feedback data. Secondly, the satisfaction of the user to the target feedback data can be improved by using a preset large language model according to a prompt word corresponding to the target intent and the first feedback data.
[0062] In some embodiments, the input data can be processed for intent recognition in the following manner to obtain the target intent corresponding to the input data, comprising:
[0063] The input data is processed for intent recognition by using a preset intent recognition model to obtain an intent label corresponding to the input data, and the target intent corresponding to the input data is determined based on the intent label corresponding to the input data.
[0064] The intent label can be a classification label used to identify the purpose or intent expressed in the user input data. Each intent label corresponds to a specific user requirement or desired interactive result, and the intent recognition model can be a model constructed based on a preset machine learning algorithm for determining the intent label corresponding to the input data.
[0065] Specifically, the intent recognition model can be constructed based on a preset classification algorithm (such as k-means algorithm, etc.), and then the constructed intent recognition model can be trained based on preset sample data (i.e., including user historical input data and corresponding intent labels) to obtain the preset intent recognition model.
[0066] After receiving the input data of the user, the input data of the user can be input into the preset intent recognition model to obtain the intent label corresponding to the input data. According to a preset correspondence between the intent label and the intent, the target intent corresponding to the input data can be determined based on the intent label corresponding to the input data.
[0067] The preset correspondence between the intent label and the intent can be as shown in Table 1.
[0068] Table 1
[0069]
[0070]
[0071] According to the preset correspondence between the intent label and the intent shown in Table 1, if the obtained intent label corresponding to the input data of the user is "1", then the target intent corresponding to the input data is "querying the weather".
[0072] In addition, the intent recognition model can also be used to identify the intent recognition word corresponding to the input data, and then the target intent corresponding to the input data can be determined based on the intent recognition word.
[0073] The intent recognition word can be a keyword or phrase used to detect a specific intent expressed in the user input data. By identifying these words, the user's intent (i.e., determining the target intent corresponding to the input data) can be inferred.
[0074] For example, an intent recognition model can be constructed based on a Long Short-Term Memory (LSTM) algorithm, semantic feature extraction is performed on the input data of the user through the intent recognition model, a corresponding semantic feature vector is obtained, and then intent recognition words are extracted according to the extracted semantic feature vector. The intent recognition words can include "route", "traffic", "tool", etc. According to the intent recognition words, it can be determined that the target intent corresponding to the input data can be "querying a traffic route".
[0075] The method of determining the target intent corresponding to the input data based on the intent recognition words can be various. For example, according to a preset similarity determination algorithm (such as the Euclidean distance algorithm, the Manhattan distance algorithm, etc.), the similarity between the intent recognition words and each preset intent (such as a preset intent Figure 1 "querying the weather", a preset intent Figure 2 "querying food", a preset intent Figure 3 "querying a traffic route", etc.) can be determined to determine the target intent corresponding to the input data.
[0076] In some embodiments, the input data can be processed by keyword extraction to obtain the first keyword corresponding to the input data, including:
[0077] The first keyword can be a single keyword extracted, or a set of keywords containing multiple keywords. In addition, the keyword extraction processing can be performed by a Term Frequency-Inverse Document Frequency (TF-IDF), a TextRank algorithm, a RAKE algorithm (Rapid Automatic Keyword Extraction), etc. In addition, the keyword extraction can also be performed by a semantic slot filling method.
[0078] For example, assuming that the input data of the user is "traffic route from here to Shanghai", the keyword extraction can be performed on the input data by the above method, and the first keyword obtained can be a keyword set including "here" and "Shanghai".
[0079] In some embodiments, the search condition corresponding to the target intent can be obtained in the following manner, and it is determined whether the first keyword meets the search condition, including:
[0080] The search condition corresponding to the target intent can be obtained based on a preset correspondence relationship between the intent and the search condition, and then it is determined whether the first keyword meets the search condition according to the search requirement corresponding to the obtained search condition.
[0081] The preset correspondence between the intent and the retrieval condition can be shown in Table 2.
[0082] Table 2
[0083] Intention Search condition Query weather Time, place Query food Place Query traffic route Departure, destination
[0084] For example, the input data is "traffic route from here to Shanghai", the target intent corresponding to the input data can be "querying traffic route", and according to the preset correspondence between the intent and the retrieval condition shown in Table 2, it can be determined that the retrieval condition corresponding to the target intent includes "departure place" and "destination".
[0085] Then, the retrieval requirement corresponding to the retrieval condition can be obtained, and it can be determined whether the first keyword (i.e., "here" and "Shanghai") corresponding to the input data satisfies the retrieval condition, wherein the retrieval requirement corresponding to "departure place" and "destination" can be location information, and according to the retrieval requirement, it can be determined that "here" in the first keyword does not satisfy "departure place" of the retrieval condition, that is, according to the first keyword, the retrieval of the feedback data for the intent of "querying traffic route" cannot be performed.
[0086] In some embodiments, in the case that the first keyword does not satisfy the retrieval condition, the second keyword satisfying the retrieval condition can be obtained according to the user data of the user in the following manner.
[0087] The user data of the user can be the location information of the user, the attribute information (such as the age, gender, etc. of the user) of the user, the preference information of the user, etc. authorized by the user, or the user data can also be the historical input data of the user and the corresponding historical feedback data, etc.
[0088] The second keyword satisfying the retrieval condition can be filtered from the user data of the user.
[0089] For example, for the input data "traffic route from here to Shanghai", since "here" in the input data does not satisfy the retrieval condition corresponding to "departure place", the second keyword satisfying the retrieval condition of "departure place" can be filtered from the user data of the user. Specifically, the current location information of the user (which can be "Suzhou") can be obtained, and "Suzhou" is determined as "departure place", that is, the second keyword satisfying the retrieval condition can be a keyword set including "Suzhou" and "Shanghai".
[0090] In addition, the second keyword satisfying the retrieval condition can also be a combination of the first keyword and the second keyword.
[0091] In some embodiments, the first feedback data corresponding to the input data can be determined based on the second keyword and the target intent in the following manner, comprising:
[0092] For example, taking the second keyword as a keyword set containing "Suzhou" and "Shanghai", and the target intent as "querying traffic route" as an example, the first feedback data obtained by information retrieval based on the target intent and the second keyword can include traffic route 1: high-speed rail can be taken from Suzhou to Shanghai, traffic route 2: subway can be taken from Suzhou to Shanghai, and traffic route 3: self-driving can be taken from Suzhou to Shanghai.
[0093] In some embodiments, the target feedback data corresponding to the input data can be determined by using a preset large language model based on the prompt word corresponding to the target intent and the first feedback data, comprising:
[0094] The prompt word corresponding to the target intent can be obtained according to the preset corresponding relationship between the intent and the prompt word, and then the prompt word corresponding to the target intent and the first feedback data can be input into the preset large language model to obtain the target feedback data.
[0095] For example, taking the target intent as "querying traffic route" and the first feedback data as "high-speed rail can be taken from Suzhou to Shanghai" as an example, according to the preset corresponding relationship between the intent and the prompt word, the prompt word corresponding to the target intent can be determined as "I will input the traffic route, and you need to output the traffic route and the travel suggestion corresponding to the traffic route", and the prompt word and the first feedback data can be input into the preset large language model to obtain the target feedback data, which can be "high-speed rail can be taken from Suzhou to Shanghai, please arrive at the high-speed rail station 1 hour in advance".
[0096] In some embodiments, the first keyword includes a plurality of sub-keywords, the retrieval condition includes a plurality of sub-retrieval conditions, and the second keyword satisfying the retrieval condition is obtained based on the user data of the user, and the method can further include the following content when implemented:
[0097] S1: The sub-keywords corresponding to the sub-retrieval conditions are respectively screened to obtain a first sub-keyword in the first keyword that does not satisfy the sub-retrieval condition, and a second sub-keyword that satisfies the sub-retrieval condition;
[0098] S2: Based on the sub-retrieval condition corresponding to the first sub-keyword, the target keyword satisfying the sub-retrieval condition corresponding to the first sub-keyword is obtained based on the user data of the user;
[0099] S3: determining the second keyword satisfying the search condition based on the second sub-keyword and the target keyword.
[0100] In some embodiments, for example, assuming that the first keyword contains the sub-keywords "this" and "Shanghai", the corresponding search condition contains the sub-search conditions "departure place" and "destination", the sub-keywords can be filtered based on the sub-search conditions to obtain the first sub-keyword in the first keyword that does not satisfy the sub-search condition and the second sub-keyword that satisfies the sub-search condition, that is, the sub-keyword "this" can be filtered by the sub-search condition "departure place", and the sub-keyword "Shanghai" can be filtered by the sub-search condition "destination", and the obtained first sub-keyword can be "this" (that is, the sub-keyword "this" does not satisfy the sub-search condition "departure place"), and the second sub-keyword can be "Shanghai" (that is, the sub-keyword "Shanghai" satisfies the sub-search condition "destination").
[0101] In some embodiments, based on the sub-search condition corresponding to the first sub-keyword, the target keyword satisfying the sub-search condition corresponding to the first sub-keyword is obtained according to the user data of the user, and in specific implementation, the method can include:
[0102] The user data of the user is obtained, and the user data can be the location information of the user, the attribute information (such as the age and gender of the user) of the user, the preference information of the user, and the like, which are obtained by user authorization, or the user data can also be the historical input data of the user and the corresponding historical feedback data, and the like.
[0103] The target keyword satisfying the sub-search condition corresponding to the first sub-keyword can be filtered from the user data of the user.
[0104] For example, taking the above user input data "traffic route from this to Shanghai" as an example, since the first sub-keyword "this" in the input data does not satisfy the sub-search condition corresponding to "departure place", the target keyword satisfying the sub-search condition "departure place" can be filtered from the user data of the user. Specifically, the current location information of the user (such as "Suzhou") can be obtained, and the location information "Suzhou" is determined as the "departure place", that is, the target keyword satisfying the sub-search condition can be "Suzhou".
[0105] In some embodiments, based on the second sub-keyword and the target keyword, the second keyword satisfying the search condition is determined, and in specific implementation, the method can include:
[0106] The second keyword and the keyword set of the target keyword can be determined as the second keyword. For example, assuming that the second sub-keyword is "Shanghai" and the target keyword is "Suzhou", the determined second keyword satisfying the search condition can be a keyword set including "Suzhou" and "Shanghai".
[0107] In some embodiments, the method can further include the following when implemented:
[0108] S1: determining second feedback data corresponding to the input data based on the first keyword and the target intent in the case where the first keyword satisfies the search condition.
[0109] S2: determining target feedback data corresponding to the input data based on the prompt word corresponding to the target intent and the second feedback data using a preset large language model.
[0110] In some embodiments, in the case where the first keyword satisfies the search condition, for example, taking the first keyword as a keyword set including "Suzhou" and "Shanghai" and the target intent as "querying a traffic route" as an example, information retrieval can be performed based on a preset traffic route database according to the target intent and the first keyword, and the obtained second feedback data can include traffic route 1: taking a high-speed rail from Suzhou to Shanghai, traffic route 2: taking a subway from Suzhou to Shanghai, and traffic route 3: self-driving from Suzhou to Shanghai.
[0111] In some embodiments, determining target feedback data corresponding to the input data based on the prompt word corresponding to the target intent and the second feedback data using a preset large language model includes:
[0112] The prompt word corresponding to the target intent can be obtained according to a preset correspondence between the intent and the prompt word, and then the prompt word corresponding to the target intent and the second feedback data can be input into the preset large language model to obtain the target feedback data.
[0113] For example, taking the target intent as "querying a traffic route" and the second feedback data as "taking a subway from Suzhou to Shanghai" as an example, according to the preset correspondence between the intent and the prompt word, the prompt word corresponding to the target intent can be determined as "I will input a traffic route, and you need to output the traffic route and the travel suggestion corresponding to the traffic route", and the prompt word and the second feedback data can be input into the preset large language model to obtain the target feedback data, which can be "take a subway from Suzhou to Shanghai, please arrive at the subway station 15 minutes in advance".
[0114] In some embodiments, the determining the target feedback data corresponding to the input data according to the prompt word corresponding to the target intent and the third feedback data comprises:
[0115] S1: obtaining a matching degree between the input data and the first feedback data, and performing screening processing on the first feedback data based on the matching degree to obtain third feedback data.
[0116] S2: determining the target feedback data corresponding to the input data according to the prompt word corresponding to the target intent and the third feedback data by using a preset large language model.
[0117] Since the first feedback data can contain useless information irrelevant to the input data, the first feedback data can be screened to obtain third feedback data conforming to the user's intent.
[0118] In some embodiments, the obtaining the matching degree between the input data and the first feedback data can further comprise the following content:
[0119] S1: determining the class label between the input data and each of the first feedback data according to a preset classification model.
[0120] S2: determining the matching degree between the input data and the first feedback data based on the class label between the input data and each of the first feedback data.
[0121] In some embodiments, the determining the class label between the input data and each of the first feedback data according to a preset classification model can comprise:
[0122] The preset classification model can be constructed based on a preset classification algorithm (such as a decision tree algorithm, a logistic regression algorithm, a Bayesian algorithm, etc.), and then the input data and the first feedback data can be input into the preset classification model to obtain the class label between the input data and each of the first feedback data.
[0123] The class label can include a matching class, a non-matching class, etc.
[0124] In addition, the preset classification model can further include a second model structure and an initial first model structure, and correspondingly, the preset classification model can be trained in the following manner:
[0125] S1: obtaining and training a second model structure by using second sample data;
[0126] S2: An initial classification model is constructed according to the second model structure; wherein the initial classification model at least includes the initial first model structure and the second model structure;
[0127] S3: The initial classification model is trained using the first sample data to obtain a preset classification model; wherein the data quantity of the second sample data is greater than the data quantity of the first sample data.
[0128] In some embodiments, the second model structure can be a large language model structure, the first model structure can be a model structure constructed based on a preset deep learning algorithm, and the complexity of the first model structure can be less than that of the second model structure.
[0129] For example, taking a model structure with a first model structure of three-layer full connection layers as an example, the preset classification model can include a second model structure constructed based on a large language model and a first model structure constructed based on three-layer full connection layers. The second model structure constructed based on the large language model can be trained based on the second sample data. Then, the initial classification model can be constructed based on the first model structure and the second model structure. Finally, the initial classification model can be trained based on the first sample data to obtain the preset classification model.
[0130] In some embodiments, before the target feedback data corresponding to the input data is determined according to the target intent corresponding prompt word and the first feedback data using the preset large language model, the method can further include the following content when implemented:
[0131] S1: Obtain a prompt word template corresponding to the target intent.
[0132] S2: Determine the prompt word corresponding to the target intent according to the target intent and the corresponding prompt word template using a preset prompt word determination model, the preset prompt word determination model being a model for determining the prompt word corresponding to the intent constructed based on a preset deep learning algorithm.
[0133] For example, taking the target intent as "querying traffic route" and the prompt word template as "I will input traffic route, and you need to output the traffic route and the corresponding {{placeholder}}" as an example, the target intent and the corresponding prompt word template are input into the preset prompt word determination model, and the prompt word corresponding to the target intent obtained by training can be "I will input traffic route, and you need to output the traffic route and the corresponding travel suggestion".
[0134] It can be seen from the above that the feedback data determination method for user intent provided by the embodiments of the present specification receives input data of a user, performs intent recognition processing on the input data to obtain a target intent corresponding to the input data, and performs keyword extraction processing on the input data to obtain a first keyword corresponding to the input data, obtains a search condition corresponding to the target intent, and determines whether the first keyword meets the search condition, wherein the search condition is used to determine feedback data for the target intent, in the case that the first keyword does not meet the search condition, a second keyword meeting the search condition is obtained according to user data of the user, first feedback data corresponding to the input data is determined based on the second keyword and the target intent, and the target feedback data corresponding to the input data is determined according to the prompt word corresponding to the target intent and the first feedback data by using a preset large language model. In this way, first, in the case that the first keyword does not meet the search condition, the second keyword meeting the search condition can be obtained according to the user data of the user, and then the first feedback data is determined through the second keyword meeting the search condition and the target intent, which can avoid the problem of poor matching degree between the retrieved feedback data and the user input data due to the lack of keywords meeting the search condition, that is, the matching degree between the first feedback data and the user input data can be improved through the second keyword meeting the search condition, and then the target feedback data matched with the input data of the user is determined through the first feedback data. Secondly, the target feedback data can improve the satisfaction of the user by using the preset large language model according to the prompt word corresponding to the target intent and the first feedback data.
[0135] Referring to Figure 2 As shown in the figure, the embodiments of the present specification also provide a specific electronic device, wherein the electronic device includes a network communication port 201, a processor 202 and a memory 203, and the above structures are connected by internal cables so that each structure can perform specific data interaction.
[0136] Among them, the network communication port 201 can be specifically used to receive input data of a user.
[0137] The processor 202 can be specifically used for performing intent recognition processing on the input data to obtain a target intent corresponding to the input data, and performing keyword extraction processing on the input data to obtain a first keyword corresponding to the input data; obtaining a search condition corresponding to the target intent, and determining whether the first keyword meets the search condition; wherein the search condition is used to determine feedback data for the target intent; in a case where the first keyword does not meet the search condition, obtaining a second keyword meeting the search condition according to user data of the user; determining first feedback data corresponding to the input data based on the second keyword and the target intent; and determining target feedback data corresponding to the input data according to the first feedback data and a prompt word corresponding to the target intent by using a preset large language model.
[0138] The memory 203 can be specifically used for storing corresponding instruction programs.
[0139] Based on the above method, the related structural performance of the electronic device can be effectively utilized, the data processing speed of the electronic device can be improved, and the feedback data determination method for the user intent can be efficiently realized.
[0140] In the embodiment, the network communication port 201 can be a virtual port that binds with different communication protocols, so as to send or receive different data. For example, the network communication port can be a port responsible for web data communication, can also be a port responsible for FTP data communication, and can also be a port responsible for mail data communication. In addition, the network communication port can also be an entity communication interface or a communication chip. For example, it can be a wireless mobile network communication chip such as GSM, CDMA, etc.; it can also be a Wifi chip; and it can also be a Bluetooth chip.
[0141] In the embodiment, the processor 202 can be implemented in any appropriate manner. For example, the processor can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. The present specification is not limited.
[0142] In the embodiment, the memory 203 can include multiple levels, and can be any memory that can save binary data in a digital system; in an integrated circuit, a circuit without a physical form that has a storage function is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, a TF card, etc.
[0143] The embodiment of the present specification also provides a computer readable storage medium based on the above-mentioned feedback data determination method for user intent, the computer readable storage medium stores computer program instructions, and when the computer program instructions are executed, the following functions are realized: receiving input data of a user; performing intent recognition processing on the input data to obtain a target intent corresponding to the input data, and performing keyword extraction processing on the input data to obtain a first keyword corresponding to the input data; obtaining a search condition corresponding to the target intent, and determining whether the first keyword meets the search condition; wherein the search condition is used to determine feedback data for the target intent; in the case that the first keyword does not meet the search condition, obtaining a second keyword meeting the search condition according to user data of the user; determining first feedback data corresponding to the input data based on the second keyword and the target intent; and determining target feedback data corresponding to the input data according to the first feedback data and a prompt word corresponding to the target intent by using a preset large language model.
[0144] In the embodiment, the storage medium includes but is not limited to a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk drive (HDD), or a memory card. The memory can be used to store computer program instructions. The network communication unit can be an interface set according to the standard of a communication protocol, used for network connection communication.
[0145] In the embodiment, the program instructions stored in the computer readable storage medium specifically realize functions and effects, which can be explained by comparing with other embodiments, and will not be described here.
[0146] Reference Figure 3 At the software level, the embodiment of the present specification also provides a feedback data determination device for user intent, which specifically can include the following structure modules:
[0147] The data receiving module 301 is configured to receive input data of a user.
[0148] The extraction processing module 302 is configured to perform intent recognition processing on the input data to obtain a target intent corresponding to the input data, and perform keyword extraction processing on the input data to obtain a first keyword corresponding to the input data.
[0149] The condition determination module 303 is configured to obtain a search condition corresponding to the target intent, and determine whether the first keyword meets the search condition; wherein the search condition is used to determine feedback data for the target intent.
[0150] The keyword determination module 304 is configured to, in a case where the first keyword does not meet the search condition, obtain a second keyword meeting the search condition according to user data of the user.
[0151] The feedback determination module 305 is configured to determine first feedback data corresponding to the input data based on the second keyword and the target intent.
[0152] The feedback output module 306 is configured to determine target feedback data corresponding to the input data by using a preset large language model according to prompt words corresponding to the target intent and the first feedback data.
[0153] In some embodiments, the keyword determination module 304 is specifically implemented to perform screening processing on the sub-keywords corresponding to the sub-search conditions respectively to obtain a first sub-keyword not meeting the sub-search conditions and a second sub-keyword meeting the sub-search conditions in the first keyword; obtain a target keyword meeting the sub-search condition corresponding to the first sub-keyword according to the user data of the user based on the sub-search condition corresponding to the first sub-keyword; and determine the second keyword meeting the search condition based on the second sub-keyword and the target keyword.
[0154] In some embodiments, the keyword determination module 304 is specifically implemented to, in a case where the first keyword meets the search condition, determine second feedback data corresponding to the input data based on the first keyword and the target intent; and determine target feedback data corresponding to the input data by using a preset large language model according to prompt words corresponding to the target intent and the second feedback data.
[0155] In some embodiments, the feedback output module 306 is specifically implemented to obtain a matching degree between the input data and the first feedback data, and perform screening processing on the first feedback data based on the matching degree to obtain third feedback data.
[0156] The target feedback data corresponding to the input data is determined according to the third feedback data and the prompt word corresponding to the target intent by using a preset large language model.
[0157] In some embodiments, when the matching screening module is implemented, the model determination module is configured to determine a category label between the input data and each of the first feedback data according to a preset classification model.
[0158] The matching degree between the input data and the first feedback data is determined based on the category label between the input data and each of the first feedback data.
[0159] In some embodiments, when the model determination module is implemented, an initial classification model is trained by using second sample data to obtain an intermediate classification model, wherein the initial classification model is a classification model constructed based on a large language model.
[0160] The intermediate classification model is trained by using first sample data to obtain a corresponding preset classification model, wherein the data quantity of the second sample data is greater than the data quantity of the first sample data.
[0161] In some embodiments, when the feedback output module 306 is implemented, a prompt word template corresponding to the target intent is obtained.
[0162] The prompt word corresponding to the target intent is determined according to the target intent and the corresponding prompt word template by using a preset prompt word determination model, wherein the preset prompt word determination model is a model for determining the prompt word corresponding to the intent, which is constructed based on a preset deep learning algorithm.
[0163] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described as various modules with functions. Of course, in the implementation of the present specification, the functions of each module can be implemented in the same software and / or hardware, or the modules implementing the same function can be combined to implement the modules or sub-modules. The above described device embodiments are only schematic, for example, the division of the units is only a logical function division, and in actual implementation, other division manners can be used, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0164] It can be seen from the above that the feedback data determination device for the user intent provided by the embodiment of the present specification can first obtain the second keyword satisfying the retrieval condition according to the user data of the user in the case that the first keyword does not satisfy the retrieval condition, and then determine the first feedback data through the second keyword satisfying the retrieval condition and the target intent, so as to avoid the problem that the matching degree between the retrieved feedback data and the user input data is poor due to the lack of the keyword satisfying the retrieval condition, that is, the matching degree between the first feedback data and the user input data can be improved through the second keyword satisfying the retrieval condition, and then the target feedback data matched with the input data of the user is determined through the first feedback data. Secondly, the preset large language model can improve the satisfaction of the user to the target feedback data according to the prompt word corresponding to the target intent and the first feedback data.
[0165] In a specific scene example, the feedback data determination method, device and electronic equipment for the user intent can be improved by applying the present specification. Through the filling of the keyword deficiency condition and the screening of the problem result matching degree for the user input data, the data retrieval effect and the matching degree of the dialogue system are improved. The specific implementation process can be referred to as follows.
[0166] Firstly, refer to Figure 4 As shown in the main process, the user can input query data in the dialogue system webpage, and then the client can send the query data input by the user in the dialogue system webpage to the server through the real-time communication protocol (such as WebSocket communication protocol). The server can determine the input data of the user based on the received query data. For example, the query data input by the user in the client can be voice data, and the server can convert the query data of the user into text data through automatic speech recognition (ASR), and determine the converted text data as the input data of the user.
[0167] The server can perform intent recognition processing on the input data to obtain the target intent corresponding to the input data, and perform keyword extraction processing on the input data to obtain the first keyword corresponding to the input data. The server can obtain the retrieval condition corresponding to the target intent.
[0168] Then, the server can use the Agent module to analyze whether the first keyword satisfies the retrieval condition (i.e. the intent condition).
[0169] In a case where the server determines that the first keyword does not satisfy the search condition, the server can analyze the search condition that is not satisfied by the first keyword using a preset large language model, and generate a corresponding task (in a case where the search condition includes multiple sub-search conditions, the generated task can include multiple sub-tasks, such as {T1, T2,..., Tk}) for the search condition that is not satisfied.
[0170] The server can initialize the generated task, and then perform intent recognition processing on the generated task through the Agent module, and call a related Tools tool based on the user data of the user to obtain a second keyword that satisfies the search condition (obtain text data related to the question) according to the recognized intent, and then update the completion state of the sub-task set (such as {T1, T2,..., Tk}).
[0171] The server can query a related data or a vector database through a third tool, determine first feedback data corresponding to the input data according to the second keyword and the target intent, and then determine a matching degree between the input data and the first feedback data using a preset classification model, to filter the first feedback data according to the matching degree between the input data and the first feedback data, to obtain third feedback data. Here, multi-threading can be used to reduce the time consumption of program running.
[0172] Finally, the server can output the target feedback data through the dialogue system webpage according to the prompt word corresponding to the target intent and the third feedback data using a preset large language model. In specific implementation, refer to Figure 5 The architecture diagram shows that it involves a front-end interactive presentation layer, an interface service layer, a service layer, and a hardware infrastructure. The client can be used for data transmission (i.e., sending input data of the user and receiving target feedback data corresponding to the input data). The server can be used for computing power support, task scheduling, and system state detection. The server can calculate the result in real time after receiving the instruction of the client, and return the calculation result (i.e., the target feedback data corresponding to the input data) through the original channel in a streaming manner. In this way, through the data interaction between the client and the server, the user can experience the real-time interaction of the dialogue system. In addition, it can also be implemented through cloud private deployment or webpage registration and login.
[0173] Based on the above scenario example, it is verified that the feedback data determination method considering the user intent provided in the specification can first obtain the second keyword satisfying the retrieval condition according to the user data of the user in the case that the first keyword does not satisfy the retrieval condition, and then determine the first feedback data through the second keyword satisfying the retrieval condition and the target intent, so as to avoid the problem that the matching degree between the retrieved feedback data and the user input data is poor due to the lack of the keyword satisfying the retrieval condition, that is, the matching degree between the first feedback data and the user input data can be improved through the second keyword satisfying the retrieval condition, and then the target feedback data matched with the input data of the user is determined through the first feedback data. Secondly, the preset large language model can improve the satisfaction of the user to the target feedback data according to the prompt word corresponding to the target intent and the first feedback data.
[0174] Although the method operation steps provided in the specification are as described in the embodiments or flowcharts, more or fewer operation steps can be included based on conventional or non-inventive means. The order of steps listed in the embodiments is only one of the many step execution orders, and does not represent the only execution order. In actual device product execution, the method order shown in the embodiments or the drawings can be executed in sequence or in parallel (for example, parallel processor or multi-thread processing environment, or even distributed data processing environment). The terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, product or equipment. Without more limitations, it does not exclude the presence of other same or equivalent elements in the process, method, product or equipment including the elements. The terms "first", "second" and the like are used to represent names, not any particular order.
[0175] Those skilled in the art also know that in addition to implementing the controller in the form of pure computer readable program code, the controller can also be implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps to achieve the same function. Therefore, such a controller can be considered as a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0176] Those skilled in the art can clearly understand the technical solutions of the present specification through the above description of the embodiments, and the technical solutions of the present specification can be implemented by means of software with the necessary general hardware platforms. Based on such understanding, the technical solutions of the present specification can essentially be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments of the present specification.
[0177] Although the present specification is described through the embodiments, those skilled in the art know that there are many modifications and changes of the present specification without departing from the spirit of the present specification, and it is intended that the appended claims encompass these modifications and changes without departing from the spirit of the present specification.
Claims
1. A method for determining feedback data based on user intent, characterized in that, The method comprises the following steps: receiving input data of a user; performing intent recognition processing on the input data to obtain a target intent corresponding to the input data, and performing keyword extraction processing on the input data to obtain a first keyword corresponding to the input data; obtaining a search condition corresponding to the target intent, and determining whether the first keyword meets the search condition; wherein the search condition is used to determine feedback data for the target intent; in the case that the first keyword does not meet the search condition, obtaining a second keyword meeting the search condition according to user data of the user; determining first feedback data corresponding to the input data based on the second keyword and the target intent; determining target feedback data corresponding to the input data according to the prompt word corresponding to the target intent and the first feedback data by using a preset large language model; in the case that the first keyword meets the search condition, determining second feedback data corresponding to the input data based on the first keyword and the target intent; determining target feedback data corresponding to the input data according to the prompt word corresponding to the target intent and the second feedback data by using a preset large language model; wherein the first keyword comprises a plurality of sub-keywords, the search condition comprises a plurality of sub-search conditions, and the obtaining of the second keyword meeting the search condition according to the user data of the user comprises: respectively performing screening processing on the sub-keywords corresponding to the sub-search conditions to obtain first sub-keywords not meeting the sub-search conditions in the first keyword and second sub-keywords meeting the sub-search conditions; obtaining target keywords meeting the sub-search conditions corresponding to the first sub-keywords according to the user data of the user based on the sub-search conditions corresponding to the first sub-keywords; determining the second keyword meeting the search condition based on the second sub-keywords and the target keywords.
2. The method of claim 1, wherein, The determining of the target feedback data corresponding to the input data according to the prompt word corresponding to the target intent and the first feedback data by using a preset large language model comprises: obtaining a matching degree between the input data and the first feedback data, and performing screening processing on the first feedback data based on the matching degree to obtain third feedback data; determining the target feedback data corresponding to the input data according to the prompt word corresponding to the target intent and the third feedback data by using a preset large language model.
3. The method of claim 2, wherein, The obtaining of the matching degree between the input data and the first feedback data comprises: determining a class label between the input data and each of the first feedback data according to a preset classification model; determining the matching degree between the input data and the first feedback data based on the class labels between the input data and each of the first feedback data.
4. The method of claim 3, wherein, The preset classification model is obtained by training in the following manner: obtaining and using second sample data to train a second model structure; According to the second model structure, an initial classification model is constructed; wherein the initial classification model at least includes an initial first model structure and the second model structure; Obtain and train the initial classification model using the first sample data to obtain the preset classification model; wherein the data amount of the second sample data is greater than the data amount of the first sample data.
5. The method of claim 4, wherein, Before the target feedback data corresponding to the input data is determined by the preset large language model according to the prompt word corresponding to the target intent and the first feedback data, it further includes: Obtain the prompt word template corresponding to the target intent; Determine the prompt word corresponding to the target intent by the preset prompt word determination model according to the target intent and the corresponding prompt word template, wherein the preset prompt word determination model is a model for determining the prompt word corresponding to the intent based on the preset deep learning algorithm.
6. A feedback data determination apparatus for user intent, characterized by, It includes: The data receiving module is used for receiving the input data of the user; The extraction processing module is used for performing intent recognition processing on the input data to obtain the target intent corresponding to the input data, and performing keyword extraction processing on the input data to obtain the first keyword corresponding to the input data; The condition judgment module is used for obtaining the search condition corresponding to the target intent, and judging whether the first keyword meets the search condition; wherein the search condition is used to determine the feedback data for the target intent; The keyword determination module is used for obtaining the second keyword meeting the search condition according to the user data of the user in the case that the first keyword does not meet the search condition; The feedback determination module is used for determining the first feedback data corresponding to the input data based on the second keyword and the target intent; The feedback output module is used for determining the target feedback data corresponding to the input data by the preset large language model according to the prompt word corresponding to the target intent and the first feedback data; In the case that the first keyword meets the search condition, the second feedback data corresponding to the input data is determined based on the first keyword and the target intent; The target feedback data corresponding to the input data is determined by the preset large language model according to the prompt word corresponding to the target intent and the second feedback data; Wherein, the first keyword contains multiple sub-keywords, and the search condition contains multiple sub-search conditions, and the second keyword meeting the search condition is obtained according to the user data of the user, including: Respectively, the sub-keywords corresponding to the sub-search conditions are screened to obtain the first sub-keyword not meeting the sub-search condition in the first keyword, and the second sub-keyword meeting the sub-search condition; Based on the sub-search condition corresponding to the first sub-keyword, the target keyword meeting the sub-search condition corresponding to the first sub-keyword is obtained according to the user data of the user; Based on the second sub-keyword and the target keyword, the second keyword meeting the search condition is determined.
7. An electronic device, comprising: A computer program product comprising a computer readable medium having stored thereon computer instructions, the computer instructions, when executed by a processor, implement the steps of the method of claim 1 to 5.
8. A computer-readable storage medium, characterized in that, A computer program product comprising a computer readable medium having stored thereon computer instructions, the computer instructions, when executed by a processor, implement the steps of the method of claim 1 to 5.
Citation Information
Patent Citations
User intention recognition method, reply generation method, and server
CN117034958A
Method for automatically generating class case retrieval report based on large language model
CN117574858A