A method for predicting user intentions based on pre-trained models and user profiles

Through the user dialogue and portrait intention prediction method based on pre-trained models, combined with reinforcement learning and user feedback classification model, the problem that intelligent customer service cannot simulate human sales behavior and accurately speculate user intentions in the sales field is solved, achieving higher user satisfaction and sales conversion rate.

CN118568241BActive Publication Date: 2024-11-05ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411038205.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-05
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Traditional intelligent customer service cannot effectively simulate human sales behavior in the sales field, and cannot accurately speculate user intentions, resulting in the inability to provide satisfactory services and low conversion rates.

Method used

The user dialogue and portrait intention prediction method based on pre-trained models are adopted, and the intention analysis model and user feedback classification model are constructed through reinforcement learning. Combined with user dialogue and portrait data, user intentions are analyzed and corresponding replies are generated to improve the sales effect of intelligent customer service.

Benefits of technology

It significantly improves user experience and sales conversion rate, and by simulating human sales behavior, the sales capabilities of intelligent customer service are enhanced, making it more effective in the sales field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568241B_ABST
    Figure CN118568241B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting the intention of user dialogue and portrait based on a pre-trained model. The method comprises: first, constructing an intention analysis model in combination with training data to optimize the prediction effect of user dialogue and portrait intention; then, training a user feedback classification model to classify user feedback into low feedback and high feedback; then, when low feedback occurs during the conversation between the user and the intelligent sales customer service, predicting the user intention and obtaining the intention keyword; finally, retrieving the corresponding cases and solutions through the intention keyword, and feeding back to the intelligent sales customer service to better serve customers. The present invention can not only improve the user's purchase rate, but also improve the user's satisfaction, and is of great significance to the intelligent improvement of traditional intelligent sales customer service.
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 the field of artificial intelligence technology such as natural language processing, deep learning, and large models, and specifically to a method for predicting the intention of user conversations and portraits based on a pre-trained model. Background Art

[0002] The rapid development of Internet technology today has led to the widespread application of artificial intelligence technology in the fields of user services and customer support. With the gradual popularization of intelligent customer service systems, intelligent customer service based on large models has also been applied in various industries. However, basic intelligent customer service cannot play a good role in the sales field: first, because intelligent customer service does not have sales skills and cannot simulate human sales customer service well; second, intelligent customer service cannot guess the user's true intentions and cannot provide correct guidance. Therefore, traditional intelligent customer service cannot provide more satisfactory services in the sales field, and cannot complete good conversions for online customers. Summary of the invention

[0003] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a method for predicting the intention of user conversations and portraits based on a pre-trained model, aiming to improve the user satisfaction of intelligent customer service in the sales field and improve the user conversion rate.

[0004] The objective of the present invention is achieved through the following technical solution: a method for predicting the intention of user dialogue and portrait based on a pre-trained model, comprising the following steps:

[0005] 1. Based on the pre-trained LLama3-7b model, the intent analysis model is constructed through reinforcement learning in combination with training data, where the training data includes user conversations and user portraits;

[0006] 2. Based on the pre-trained Bert model and combined with the training data, the user feedback classification model is trained to classify user feedback into low feedback and high feedback;

[0007] 3. Based on the user's feedback in the current conversation between the user and the intelligent sales customer service, the user feedback classification model is used to evaluate whether to trigger the intention analysis mechanism. The intention analysis mechanism is triggered when the feedback is low, and is not triggered when the feedback is high;

[0008] 4. After the mechanism described in step 3 is triggered, the conversation history between the user and the intelligent sales customer service and the user's portrait features are read through the intent analysis model, and the user's intent is analyzed through the intent analysis model to obtain the intent keywords;

[0009] 5. According to the intent keywords obtained in step 4, the cases and solutions corresponding to the intent keywords are retrieved and returned to the intelligent sales customer service. The intelligent sales customer service combines the received cases and solutions with the current conversation to generate a new reply and return it to the user.

[0010] Furthermore, step 1 is implemented by the following sub-steps:

[0011] 1.1. Data processing: Match and clean the conversation data between users and sales customer service with the user portrait data at the same time;

[0012] 1.2. Data labeling: Use the data from step 1.1 as training data, and classify the data according to the conversation content between the user and the intelligent sales customer service and the purchase situation within the next seven days to form labeled data;

[0013] 1.3. Reinforcement learning environment construction: Use the labeled data from step 1.2 to define the reinforcement learning goal (through continuous training and optimization, the intent analysis model can more accurately predict the user's intent based on the user conversation and profile data), state, action, and reward function;

[0014] 1.4. Model training: Using the preprocessed data and combined with the reinforcement learning algorithm, the intent analysis model is trained on the LLama3-7b model to optimize the prediction effect of user conversation and portrait intent.

[0015] Furthermore, the state described in step 1.3 includes: environmental information at a certain moment, and the environmental information includes the current conversation content, the user portrait as of a certain moment, and historical intention prediction results.

[0016] Furthermore, the action of defining reinforcement learning in step 1.3 is specifically: classifying the intention of the current conversation and user portrait data to determine the user's current intention, which includes: strong purchase intention, weak purchase intention, strong consultation intention, and weak consultation intention.

[0017] Furthermore, the reward function for reinforcement learning defined in step 1.3 is specifically: points are given or deducted according to the correctness of the intention analysis model's prediction and the corresponding weight coefficient, and the analysis effect of the intention analysis model is evaluated based on the points. Finally, the model coefficient with the highest total score is selected as the final coefficient of the intention analysis model.

[0018] Furthermore, step 2 is implemented by the following sub-steps:

[0019] 2.1. Data processing: The conversation data between users and sales customer service is manually split into question-answer pairs, and each question-answer pair is labeled with a data label, which is either low feedback or high feedback;

[0020] 2.2. Model fine-tuning: Based on the pre-trained Bert model, use the data labels described in step 2.1 to train the user feedback classification model so that the user feedback classification model can determine whether the user's feedback is low feedback or high feedback based on the input question and answer pairs and the output probability values ​​of high and low feedback, and the probability value is between 0 and 1; when the probability value of the feedback is not less than 0.6, it is judged as high feedback, and when the probability value of the feedback is less than 0.6, it is judged as low feedback (in order to reduce the risk of misjudgment, it is better to judge it as low feedback more often to better analyze user intentions and improve user satisfaction).

[0021] Furthermore, step 4 is implemented by the following sub-steps:

[0022] 4.1. Data processing: After determining that the feedback is low, the conversation between the user and the intelligent customer service and the user's historical profile are extracted and processed, including: the simplification and refinement of the conversation history, the analysis of the user's purchase history, the number of user views, and the analysis of the stay time;

[0023] 4.2. Intent analysis: Use the data processed in step 4.1 as the input of the intent analysis model to analyze the user’s current intent and obtain intent keywords.

[0024] Furthermore, step 5 is implemented by the following sub-steps:

[0025] 5.1. Through the intent keywords and keyword classification, based on RAG search enhancement optimization, multi-way search for cases in the knowledge base;

[0026] 5.2. Based on the content recalled by multi-way retrieval, knowledge selection is performed by training a BERT-based classification model to screen out cases and solutions that are highly relevant to the conversation context;

[0027] 5.3. The case and solution are returned to the intelligent sales customer service. The intelligent sales customer service combines the returned content with the current conversation as new input, generates new output content and returns it to the user.

[0028] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the method for predicting intentions of user conversations and portraits based on a pre-trained model.

[0029] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for predicting the intention of user conversations and portraits based on a pre-trained model.

[0030] The beneficial effects of the present invention are: the present invention combines user conversation history and user portrait to predict the user's true intention; it can significantly improve user experience and enhance sales effect by simulating human sales behavior rather than simply in the form of question and answer; through data-driven continuous optimization, it becomes the core competitiveness of the large sales model. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is the overall flow chart of the present invention. DETAILED DESCRIPTION

[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0033] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0034] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0035] The present invention is described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the features of the following embodiments and implementations can be combined with each other.

[0036] like Figure 1 As shown in the figure, a method for predicting the intention of user dialogue and portrait based on a pre-trained model is shown in the figure. The specific steps are as follows:

[0037] 1. Based on the pre-trained LLama3-7b model, combined with training data, an intent analysis model is constructed through reinforcement learning. The training data includes user conversations and user portraits.

[0038] 1.1. Data processing: Match and clean the conversation data between users and sales customer service with the user portrait data at the same time. The conversation data between users and sales customer service comes from the historical data stored in the database; the user portrait data mainly includes: the number of user consumption, user potential stratification, user purchase intention, the user's most recent consumption time and the user's personal characteristics, etc., covering the user's personal tags and user behavior tags. Matching conversation data and portrait data means: combining the conversation data with the user's historical portrait (to determine the user's characteristics) at the end of the conversation to form (conversation data, keywords, user tags) data.

[0039] 1.2. Data labeling: Use the data from step 1.1 above as training data, and classify the data according to the conversation content between the user and the intelligent sales customer service and the purchase situation within the next seven days to form labeled data. This step mainly involves manually labeling the data. By manually labeling the data instead of labeling the data according to certain rules, the data can be more in line with human expectations and help the model obtain more correct intent classification. The main way to label data is as follows: Mark the conversation data, keywords and user tags as user intent (labels), that is, label the data in step 1.1 with intent labels.

[0040] 1.3. Reinforcement learning environment construction: Use the labeled training data from step 1.2 as well as user intent and user profile data to define reinforcement learning objectives, states, actions, and reward functions, where:

[0041] Define the goal: The goal of reinforcement learning is to maximize the accuracy of intent prediction. Specifically, by continuously training and optimizing the model, it can more accurately predict the user's intent based on user conversations and profile data.

[0042] Define state: The state represents the environment information at a certain moment. In the scenario of user conversation and portrait intent prediction, the state can include: the current conversation content, the user portrait as of a certain moment, and the historical intent prediction results.

[0043] Define actions: Actions are mainly used to classify the intent of the current conversation and user portrait data. The main intent categories are: strong purchase intent, weak purchase intent, strong consultation intent, weak consultation intent, product understanding intent, product comparison intent, etc.

[0044] Define the reward function: The reward function is the standard used by the reinforcement learning model to evaluate the quality of an action. The reward function mainly gives or deducts points based on the correctness of the prediction and the weighting coefficient. The weighting coefficient is mainly determined by manual calibration and manual judgment: the user's current conversation content and user portrait, and the difficulty coefficient for analyzing user intentions. The coefficient is mainly between 0.6-1.5. The reward function is:

[0045]

[0046] Where x represents the training data, x=1 represents the first training data, x=n represents the nth training data, α represents the weighting coefficient, E x Indicates the intent prediction of the x-th input (1 for complete accuracy, 0.5 for large classification accuracy, and 0 for error).

[0047] 1.4. Model training: Using the preprocessed data and the reinforcement learning algorithm, the intent analysis model is trained on the LLama3-7b model to optimize the prediction effect of user conversation and portrait intent. Model training requires approximately 30 rounds, which can achieve the highest accuracy for data prediction. One round: traverse all training data.

[0048] 2. Based on the pre-trained Bert model and combined with the training data, the user feedback classification model is trained to classify user feedback into low feedback and high feedback.

[0049] 2.1. Data processing: The conversation data between users and sales customer service is manually split into question-answer pairs, and each question-answer pair is labeled with a data label of low feedback or high feedback. This part of the data only contains the conversation between users and sales customer service, and multiple rounds of conversations are split into multiple question-answer pairs; the labeling standard is: human subjective judgment of whether the user's response is positive (high feedback) or negative (low feedback).

[0050] 2.2. Model fine-tuning: Based on the pre-trained Bert model, use the labeled data described in step 2.1 to train the user feedback classification model, so that the user feedback classification model can determine whether the user's feedback is low feedback or high feedback based on the input question and answer pair and the output probability value of high and low feedback, and the probability value is between 0-1; when the probability value of the feedback is not less than 0.6, it is determined to be high feedback, and when the probability value of the feedback is less than 0.6, it is determined to be low feedback. The fine-tuning method used is Lora fine-tuning, in which Lora fine-tuning: adjusts the local parameters of the model instead of all parameters, which can obtain new capabilities without losing the original capabilities, and the computing resource overhead required for training is small (lower requirements for hardware devices).

[0051] 3. Evaluate whether to trigger the intent analysis mechanism based on the user's feedback in the current conversation with the intelligent sales customer service. Evaluate whether to trigger the intent analysis mechanism through the user feedback classification model. The intent analysis mechanism is triggered when the user gives low feedback and is not triggered when the user gives high feedback (in order to reduce the risk of misjudgment, it is better to judge it as low feedback to better analyze user intent and improve user satisfaction).

[0052] 4. After the mechanism described in step 3 is triggered, the conversation history between the user and the intelligent sales customer service and the user's portrait features are read through the intent analysis model, and the user's intent is analyzed through the intent analysis model to obtain the intent keywords.

[0053] 4.1. Data processing: After determining that the feedback is low, the conversation between the user and the intelligent customer service and the user's historical portrait are extracted and processed, including: concise and refined conversation history, extraction of conversation keywords, analysis of user purchase history, analysis of user browsing times and stay time. The data is formed in the form of (conversation data, keywords, user tags).

[0054] 4.2. Intent analysis: Use the data processed in step 4.1 as the input of the intent analysis model to analyze the user's purchase and status intentions and obtain intent keywords.

[0055] 5. According to the intent keywords obtained in step 4, retrieve the cases and solutions corresponding to the intent keywords and return them to the intelligent sales customer service. The intelligent sales customer service combines the received cases and solutions with the current conversation to generate a new reply and return it to the user.

[0056] 5.1. Through the intent keywords and keyword classification, based on RAG search enhancement optimization, multi-way search for cases in the knowledge base corresponding to the intent keywords. Among them, RAG search enhancement: search in the knowledge base; multi-way search: search for multiple similar cases.

[0057] 5.2. Based on the content recalled by multi-way retrieval, knowledge selection is performed by training a BERT-based classification model to screen out cases and solutions that are highly relevant to the dialogue context (select the top 3 most relevant knowledge).

[0058] 5.3. The case and solution are returned to the intelligent sales customer service (sales big model). The intelligent sales customer service combines the returned content with the current conversation as new input, generates new output content and returns it to the user. The returned content will be used as a prompt word, that is, historical case knowledge or related background knowledge is given, so that the big model can better understand how to handle the conversation with the user.

[0059] An embodiment of the present invention also provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the method for predicting intentions of user conversations and portraits based on a pre-trained model of the above embodiment.

[0060] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for predicting intentions of user conversations and portraits based on a pre-trained model of the above embodiment.

[0061] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capability and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.

[0062] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.

Claims

1. A method for predicting user conversation and profile intention based on a pre-trained model, characterized in that: The following steps are involved: Step 1: Based on the pre-trained LLama3-7b model, combined with training data, an intent analysis model is constructed through reinforcement learning, wherein the training data includes user conversations and user portraits; Step 1 is implemented by the following sub-steps: Step 1.1, data processing: match and clean the conversation data between the user and the sales customer service with the user portrait data at the same time; Step 1.2, data labeling: Use the data from step 1.1 as training data, and classify the data according to the conversation content between the user and the intelligent sales customer service and the purchase situation within the next seven days to form labeled data; Step 1.3: Build a reinforcement learning environment: Use the labeled data from step 1.2 to define the goal, state, action, and reward function of reinforcement learning. Step 1.4, model training: Using the preprocessed data and combined with the reinforcement learning algorithm, the intent analysis model is trained on the LLama3-7b model to optimize the prediction effect of user conversation and portrait intent; Step 2: Based on the pre-trained Bert model and combined with the training data, a user feedback classification model is trained to classify user feedback into low feedback and high feedback. Step 3: Based on the feedback from the user in the conversation between the user and the intelligent sales customer service, the user feedback classification model is used to evaluate whether to trigger the intent analysis mechanism. The intent analysis mechanism is triggered when the feedback is low, and is not triggered when the feedback is high. Step 4: After the mechanism described in step 3 is triggered, the conversation history between the user and the intelligent sales customer service and the user's portrait features are read through the intent analysis model, and the user's intent is analyzed through the intent analysis model to obtain the intent keywords; Step 5: Based on the intent keywords obtained in step 4, retrieve cases and solutions corresponding to the intent keywords and return them to the intelligent sales customer service. The intelligent sales customer service combines the received cases and solutions with the current conversation to generate a new reply and return it to the user.

2. The method for predicting intention of user dialogue and portrait based on a pre-trained model according to claim 1, characterized in that: The state described in step 1.3 includes: environmental information at a certain moment, and the environmental information includes the current conversation content, the user portrait as of a certain moment, and historical intention prediction results.

3. The method for predicting intention of user dialogue and portrait based on a pre-trained model according to claim 1, characterized in that: The actions defined in step 1.3 for reinforcement learning are specifically: classifying the intentions of the current conversation and user portrait data to determine the user's current intentions, which include: strong purchase intentions, weak purchase intentions, strong consultation intentions, and weak consultation intentions.

4. The method for predicting intention of user dialogue and portrait based on a pre-trained model according to claim 1, characterized in that: The reward function for reinforcement learning defined in step 1.3 is specifically as follows: points are given or deducted based on the correctness of the intention analysis model's prediction and the corresponding weight coefficients, and the analysis effect of the intention analysis model is evaluated based on the points. Finally, the model coefficient with the highest total score is selected as the final coefficient of the intention analysis model.

5. The method for predicting intention of user dialogue and portrait based on a pre-trained model according to claim 1, characterized in that: Step 2 is implemented by the following sub-steps: Step 2.1, data processing: manually split the conversation data between the user and the sales customer service into question-answer pairs, and give each question-answer pair a data label, which is divided into low feedback or high feedback; Step 2.2, model fine-tuning: Based on the pre-trained Bert model, use the data labels described in step 2.1 to train the user feedback classification model, so that the user feedback classification model can determine whether the user's feedback is low feedback or high feedback based on the input question and answer pairs and the output probability values ​​of high and low feedback, and the probability value is between 0-1; when the probability value of the feedback is not less than 0.6, it is determined to be high feedback, and when the probability value of the feedback is less than 0.6, it is determined to be low feedback.

6. The method for predicting intention of user dialogue and portrait based on a pre-trained model according to claim 1, characterized in that: Step 4 is implemented by the following sub-steps: Step 4.1, data processing: After determining that the feedback is low, the conversation between the user and the intelligent customer service and the user's historical portrait are extracted and processed, including: streamlined extraction of conversation history, analysis of user purchase history, and analysis of user browsing times and dwell time; Step 4.2, Intent analysis: Use the data processed in step 4.1 as the input of the intent analysis model to analyze the user's current intent and obtain intent keywords.

7. The method for predicting intention of user dialogue and portrait based on a pre-trained model according to claim 1, characterized in that: Step 5 is implemented by the following sub-steps: Step 5.1: Use intent keywords and keyword classification to perform multi-way retrieval of cases in the knowledge base based on RAG retrieval enhancement optimization; Step 5.2: Based on the content recalled by multi-way retrieval, knowledge selection is performed by training a BERT-based classification model to screen out cases and solutions that are highly relevant to the dialogue context; Step 5.3: Return the case and solution to the intelligent sales customer service. The intelligent sales customer service will combine the returned content with the current conversation as new input, generate new output content and return it to the user.

8. An electronic device, comprising a memory and a processor, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the method for predicting intentions of user conversations and portraits based on a pre-trained model as described in any one of claims 1-7 above.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, the method for predicting the intention of user conversations and portraits based on a pre-trained model as described in any one of claims 1 to 7 is implemented.