Product recommendation model training method and product recommendation method

By extracting keywords from the dialogue and interaction information of the e-commerce platform to build a product recommendation model, the problem that customer service cannot quickly and accurately recommend products is solved, and more efficient personalized product recommendations are achieved, which improves the user experience.

CN120278795AActive Publication Date: 2025-07-08ALI HEALTH TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510750023.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-07-08
Estimated Expiration
2045-06-06

Smart Images

  • Figure CN120278795A_ABST
    Figure CN120278795A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a product recommendation model training method and a product recommendation method.The product recommendation model training method comprises the steps that to-be-processed dialogue information is obtained, and the to-be-processed dialogue information comprises a target product and an interactive dialogue text corresponding to the target product; extracting at least one target keyword corresponding to the target product from the interactive dialogue text, and constructing a keyword product group according to each target keyword and the target product; and training a product recommendation model based on the keyword product group, so that the product recommendation model learns to recommend a target product according to a target keyword. The product recommendation model trained through the method can provide more targeted product recommendation for the user according to the information of the keyword product group, the waiting time of the user is shortened, more professional reply verbal skills are provided for customer service staff, and the interactive experience between the user and the customer service staff is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and particularly to a method for training a product recommendation model and a product recommendation method. Background Art

[0002] In the field of health consumption, e-commerce platforms generate a large amount of dialogue interaction data between users and customer service every day. Users communicate with customer service through the e-commerce platform, and the customer service recommends suitable products for them. In actual applications, the customer service of e-commerce platforms recommends products for users based on the information provided by users through large language models.

[0003] In current e-commerce platforms, when customer service uses large language models to provide product recommendations for users, they cannot effectively identify the personalized situation of users quickly and accurately based on the information provided by users, nor can they accurately and quickly recommend suitable products for users, resulting in a longer waiting time for users. Sometimes, the products recommended for users do not meet their needs either. Therefore, there is an urgent need for a new method to enrich the capabilities of large language models so that they can quickly and accurately provide suitable products for users based on the information provided by users and improve the user experience. Summary of the Invention In view of this, the embodiments of this specification provide a method for training a product recommendation model and a product recommendation method. One or more embodiments of this specification also relate to a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.

[0004] According to the first aspect of the embodiments of this specification, a method for training a product recommendation model is provided, including: Obtain the dialogue information to be processed, where the dialogue information to be processed includes the target product and the interactive dialogue text corresponding to the target product; Extract at least one target keyword corresponding to the target product from the interactive dialogue text, and construct a keyword-product group based on each target keyword and the target product; Train a product recommendation model based on the keyword-product group so that the product recommendation model learns to recommend the target product according to the target keyword.

[0005] According to the second aspect of the embodiments of this specification, a product recommendation method is provided, including: Receive the interactive dialogue text to be processed; Extract at least one target keyword from the interactive dialogue text to be processed, and construct a product recommendation prompt word based on each target keyword; Input the product recommendation prompt into the product recommendation model to obtain the target recommended products output by the product recommendation model, where the product recommendation model is trained by the training method of the product recommendation model.

[0006] According to the third aspect of the embodiments of this specification, a computing device is provided, including: A memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above method are implemented.

[0007] According to the fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the above method are implemented.

[0008] According to the fifth aspect of the embodiments of this specification, a computer program product is provided, including computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the above method are implemented.

[0009] The method provided by the embodiments of this specification extracts the target keywords associated with the target product from the conversation information, and constructs a keyword-product group based on the target keywords and the target product. By injecting the keyword-product group into the product recommendation model, the trained product recommendation model can provide more targeted product recommendations for users, reduce the waiting time of users, provide more professional reply words for customer service, and improve the interaction experience between users and customer service. Description of the Drawings

[0010] Figure 1 is a flowchart of a training method for a product recommendation model provided by an embodiment of this specification; Figure 2 is a processing process flowchart of a training method for a product recommendation model applied to a medical scenario provided by an embodiment of this specification; Figure 3 is a structural schematic diagram of a training device for a product recommendation model provided by an embodiment of this specification; Figure 4 is a flowchart of a product recommendation method provided by an embodiment of this specification; Figure 5 is an architecture diagram of a product recommendation system provided by an embodiment of this specification; Figure 6 is a structural block diagram of a computing device provided by an embodiment of this specification. Detailed Embodiments

[0011] Numerous specific details are set forth in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of this specification. Therefore, this specification is not limited by the specific implementations disclosed below.

[0012] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0013] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, such 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 one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein can be interpreted as "when" or "while" or "in response to determining".

[0014] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards in the relevant region, and corresponding operation entrances are provided for the user to select authorization or rejection.

[0015] In one or more embodiments of this specification, a large model refers to a deep learning model with a large number of model parameters, usually including hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than one quadrillion model parameters. A large model can also be referred to as a foundation model. Through pre-training of the large model with a large amount of unlabeled corpus, a pre-trained model with more than one billion parameters is produced. This model can adapt to a wide range of downstream tasks and has good generalization ability, such as large language models (LLMs), multi-modal pre-training models, etc.

[0016] When the large model is actually applied, it only needs a small number of samples to fine-tune the pre-trained model and can be applied to different tasks. The large model can be widely applied in fields such as Natural Language Processing (NLP) and computer vision. Specifically, it can be applied to tasks in the field of computer vision such as Visual Question Answering (VQA), Image Caption (IC), and image generation, as well as tasks in the field of natural language processing such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the large model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.

[0017] First, explain the noun terms involved in one or more embodiments of this specification.

[0018] TF-IDF: term frequency–inverse document frequency, is a commonly used weighting technique for information retrieval and text mining, mainly used to evaluate the importance of a word for a document collection or a single document in a corpus.

[0019] n-gram tokenization: is a tokenization statistical method that predicts the probability distribution of the next word by considering n consecutive words.

[0020] In this specification, a training method for a product recommendation model and a product recommendation method are provided. This specification also relates to a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail one by one in the following embodiments.

[0021] See Figure 1 , Figure 1 shows a flowchart of a training method for a product recommendation model provided according to an embodiment of this specification, specifically including the following steps.

[0022] Step 102: Obtain the dialogue information to be processed, where the dialogue information to be processed includes the target product and the interactive dialogue text corresponding to the target product.

[0023] Among them, the dialogue information to be processed can be understood as the dialogue interaction information between users and customer service on an e-commerce platform. The dialogue information to be processed is a complete dialogue interaction information. In the training method for the product recommendation model provided in the embodiments of this specification, there can be multiple pieces of dialogue information to be processed. For the convenience of explanation, one piece of dialogue information to be processed is taken as an example for explanation here.

[0024] It should be noted that in the training method of the product recommendation model provided in the embodiments of this specification, it is for training the product recommendation model. The training data used for training the product recommendation model should include the target product. Therefore, in the method provided in the embodiments of this specification, the dialogue information to be processed should include the target product and the interactive dialogue text in which the customer service recommends the target product.

[0025] In practical applications, users can communicate with customer service through an e-commerce platform. During the conversation, users have various needs, such as wanting to consult products, urging for delivery, applying for a refund, and so on. In the method provided in the embodiments of this specification, what is needed is the conversation in which the customer service recommends products to users. Therefore, the dialogue information to be processed refers to the interactive dialogue data with product recommendation behavior.

[0026] In a specific embodiment provided in this specification, obtaining the dialogue information to be processed includes: Obtaining the initial dialogue information and parsing the dialogue intention of the initial dialogue information; When the dialogue intention is product recommendation and the target product is included in the initial dialogue information, determining the initial dialogue information as the dialogue information to be processed.

[0027] In practical applications, the initial dialogue information in the e-commerce platform can be obtained. The initial dialogue information can be understood as each conversation record saved in the e-commerce platform. The number of initial dialogue information is usually multiple. In the method provided in the embodiments of this specification, multiple initial dialogue information can also be obtained from the dialogue log database of the e-commerce platform.

[0028] After obtaining the initial dialogue information, the dialogue intention of the initial dialogue information can be further analyzed. The dialogue intention refers to what the initial dialogue information wants to do. For example, if the content of the communication between the user and the customer service is to request a refund, the dialogue intention is a refund; if the content of the communication between the user and the customer service is to urge for delivery, the dialogue intention is to urge for delivery; if the content of the communication between the user and the customer service is to consult a product, the dialogue intention is product recommendation, and so on. In practical applications, a dialogue intention model can be pre-trained to identify the corresponding dialogue intention according to the initial dialogue information. In the method provided in the embodiments of this specification, there is no limitation on how to parse the dialogue intention of the initial dialogue information.

[0029] After determining the dialogue intention corresponding to the initial dialogue information, the initial dialogue information can be screened according to the dialogue intention. The initial dialogue information with the dialogue intention of product recommendation is used as the dialogue information to be processed. However, in practical applications, although the dialogue intention of the initial dialogue information is product recommendation, it is possible that the customer service fails to successfully recommend the corresponding product to the user in the end, and such initial dialogue information cannot be used as the training data for the method provided in the embodiments of this specification. Therefore, in the method provided in the embodiments of this specification, in addition to the dialogue intention being product recommendation, it is also necessary to ensure that the target product successfully recommended by the customer service to the user is included in the initial dialogue data. Based on this, it can be determined that the initial dialogue information is the dialogue information to be processed.

[0030] Through the method provided in the embodiments of this specification, from multiple initial dialogue data, the dialogues with the dialogue intention of product recommendation and the existence of the recommended target product are selected as the dialogue information to be processed, providing data support for the subsequent construction of training data. At the same time, by screening the initial dialogue data, the quality of the dialogue data to be processed is also improved.

[0031] Step 104: Extract at least one target keyword corresponding to the target product from the interactive dialogue text, and construct a keyword-product group according to each target keyword and the target product.

[0032] After determining the dialogue data to be processed, at least one target keyword can be extracted from the interactive dialogue text in the dialogue data to be processed, and the target keyword corresponds to the target product. Specifically, the target keyword refers to the keyword related to the target product extracted from the interactive dialogue text. For example, if the target product is a cold medicine, the target keyword is a keyword related to the cold medicine. Another example is that if the target product is a floor-sweeping robot, the target keyword is a keyword related to the floor-sweeping robot.

[0033] After extracting the target keyword corresponding to the target product from the interactive dialogue text, a keyword-product group can be constructed according to each target keyword and the target product. For example, if the target keyword is "the elderly, chronic obstructive pulmonary disease" and the target product is a "bi-level ventilator", a keyword-product group [the elderly, chronic obstructive pulmonary disease - bi-level ventilator] can be constructed; another example is that if the target keyword is "20-year-old female, snoring" and the target product is a "single-level ventilator", a keyword-product group [20-year-old female, snoring - single-level ventilator] can be constructed. In the format of the keyword-product group in the above examples, the target keyword is in the front and the target product is in the back. It can also be that the target product is in the front and the target keyword is in the back. In the method provided in the embodiments of this specification, the format of the keyword-product group is not limited, as long as it is unified.

[0034] In a specific embodiment provided in this specification, extracting at least one target keyword corresponding to the target product from the interactive dialogue text includes S1042 - S1046: S1042. Extract at least one initial keyword from the interactive dialogue text, and identify the initial keyword category corresponding to each initial keyword according to the business knowledge graph.

[0035] In the method provided in the embodiments of this specification, at least one initial keyword can be extracted from the interactive dialogue text, and the initial keyword category corresponding to each initial keyword can be identified. Among them, the initial keyword can be understood as a keyword related to the target product extracted from the interactive dialogue text. The initial keyword category can be understood as the category corresponding to each initial keyword. In the method provided in the embodiments of this specification, the business knowledge graph is used to identify the initial keyword category corresponding to each initial keyword.

[0036] The business knowledge graph can be understood as a pre - created knowledge graph related to the target business scenario. For example, taking the medical field as an example, the business knowledge graph is the medical knowledge graph, which includes entity information such as population, symptoms, diseases, etc. After extracting at least one initial keyword from the interactive dialogue text, each initial keyword can be mapped to the medical knowledge graph for identification, and the initial keyword category corresponding to each initial keyword in the medical knowledge graph can be obtained. For example, if the initial keyword is "old people", its initial keyword category can be determined as "population"; another example is that if the initial keyword is "dyspnea", its initial keyword category can be determined as "symptom"; and another example is that if the initial keyword is "chronic obstructive pulmonary disease", its initial keyword category can be determined as "disease"; for the initial keyword that cannot be identified with the corresponding category according to the business knowledge graph, its initial keyword category is set to other categories.

[0037] In a specific embodiment provided in this specification, extracting at least one initial keyword from the interactive dialogue text includes: Processing the interactive dialogue text based on a preset word - segmentation model to obtain at least one reference initial keyword; Calculating the keyword weight value of each reference initial keyword in the interactive dialogue text; Determining the initial keyword from each reference initial keyword according to each keyword weight value.

[0038] In practical applications, there are usually many keywords in the interactive dialogue text. In the method provided in the embodiments of this specification, the keywords can be initially screened to reduce the amount of data to be processed subsequently. Specifically, the interactive dialogue text can be processed based on a preset word segmentation model to obtain at least one reference initial keyword. The reference initial keyword can be understood as a keyword directly extracted from the interactive dialogue text without being screened. The preset word segmentation model can be any word segmentation model.

[0039] In the method provided in the embodiments of this specification, the n-gram word segmentation model is taken as an example for explanation. The n-gram word segmentation model is a statistical language model commonly used in natural language processing tasks. It usually considers n consecutive words to predict the distribution probability of the next word. An n-gram refers to n consecutive items in the text. According to different values of n, n-grams can be divided into different types. In the method provided in the embodiments of this specification, the value of n can be greater than or equal to 2 and less than 5. In practical applications, the specific value of n can be set according to the actual situation and is not limited in this specification. The n-gram model generates word segmentation results by setting a sliding window, and each word segmentation result is the reference initial keyword.

[0040] After obtaining each reference initial keyword, in order to filter out some unimportant keywords, the keyword weight value of each reference initial keyword in the interactive dialogue text can be calculated, and the reference initial keywords can be screened according to the keyword weight values to select the initial keywords.

[0041] The method for calculating the keyword weight value of each reference initial keyword in the interactive dialogue text can be the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm, the CRITIC weight method, the AHP (Analytic Hierarchy Process) method, etc. In the method provided in the embodiments of this specification, the specific algorithm for calculating the keyword weight value is not limited.

[0042] In a specific implementation manner provided in this specification, taking the TF-IDF algorithm as an example, the keyword weight value of each reference initial keyword in the interactive dialogue text is calculated, and then the reference initial keywords are filtered through a preset keyword weight threshold to obtain the initial keywords. For example, the tf-idf value of each reference initial keyword is calculated by the TF-IDF algorithm, and the tf-idf value is compared with the preset keyword weight threshold (such as 0.15). The reference initial keywords with a tf-idf value greater than 0.15 are determined as the initial keywords, and the reference initial keywords with a tf-idf value less than or equal to 0.15 are filtered out.

[0043] After obtaining the initial keywords, the keyword categories of the initial keywords can be identified. In practical applications, a pre-set keyword classification model can be used to identify the initial keywords. In the method provided in the embodiments of this specification, a business knowledge graph has been pre-created, but there is no entity information related to the target product in the business knowledge graph. In order to further enrich the business knowledge graph, in the method provided in the embodiments of this specification, the business knowledge graph is used to identify the initial keyword categories of the initial keywords. In subsequent processing, the target product can also be added to the business knowledge graph to enrich the dimension of the business knowledge graph and increase the information volume of the business knowledge graph.

[0044] In a specific implementation manner provided in this specification, identifying the initial keyword categories corresponding to the initial keywords according to the business knowledge graph includes: Determine a target initial keyword among the initial keywords, where the target initial keyword is any one of the initial keywords; In the case where an entity is matched for the target initial keyword in the business knowledge graph, determine the initial keyword category corresponding to the target initial keyword according to the matched entity; In the case where no entity is matched for the target initial keyword in the business knowledge graph, determine that the initial keyword category corresponding to the target initial keyword is other category.

[0045] In this implementation manner, there are many initial keywords, and the processing methods for each initial keyword are the same. Here, one of the initial keywords is taken as an example for explanation, that is, a target initial keyword is determined among the initial keywords. The target initial keyword is the keyword to be identified through the business knowledge graph. The target initial keyword can be any one of the initial keywords.

[0046] After determining the target initial keyword, a matching operation can be performed on the target initial keyword in the business knowledge graph. If an entity is matched for the target initial keyword in the business knowledge graph, the initial keyword category of the target initial keyword can be determined according to the matched entity. For example, taking the business knowledge graph as a medical knowledge graph for explanation, the target initial keyword is "dyspnea", and a corresponding entity is matched in the business knowledge graph. The type corresponding to this entity is symptom, that is, it can be determined that the initial keyword category of the target initial keyword "dyspnea" is "symptom".

[0047] If no entity is matched for the target initial keyword in the business knowledge graph, it can be determined that its corresponding initial keyword category is other category.

[0048] Taking the business knowledge graph as an example of the medical knowledge graph, through the business knowledge graph, the initial keyword categories corresponding to the initial keywords can be "population", "symptom", "disease". For some initial keywords, if no relevant entities can be matched in the business knowledge graph, the determined initial keyword category for them is "other category".

[0049] S1044. Train a keyword classification model according to each initial keyword and the initial keyword category corresponding to each initial keyword.

[0050] After determining each initial keyword and the initial keyword category corresponding to each initial keyword in the above steps, the initial keyword category also includes "other category". In the above steps, the initial keyword category for the initial keyword is determined through the business knowledge graph. For some initial keywords in the "other category", it may be that no corresponding entity in the business knowledge graph is found, but it may also be a certain category that can be recognized in the business knowledge graph. Therefore, a keyword classification model can be further trained to further classify the initial keywords in the "other category".

[0051] Based on this, a keyword classification model can be trained according to each initial keyword and each initial keyword category. The keyword classification model is trained to determine the corresponding keyword category according to the input keyword.

[0052] Specifically, in a specific implementation manner provided in this specification, the initial keyword category includes a business category and an other category; Training a keyword classification model according to each initial keyword and the initial keyword category corresponding to each initial keyword includes: Determine training initial keywords from each initial keyword according to each initial keyword category, and train an initial keyword classification model according to the training initial keywords and the training keyword categories corresponding to the training initial keywords; Add prediction category information to the initial keywords with the initial keyword category of other category according to the initial keyword classification model; Update the initial keyword category of the corresponding initial keyword with each prediction category information, and continue to train the initial keyword classification model with each initial keyword and the initial keyword category corresponding to each initial keyword to obtain a keyword classification model.

[0053] In this embodiment, the training initial keywords are first determined from the initial keywords according to each initial keyword category. The specific confirmation method may be to sample various initial keyword categories according to a preset category ratio so that the number of training initial keywords corresponding to each initial keyword category meets the preset ratio. For example, in a medical scenario, the initial keyword categories include "population", "symptom", "disease", and "other categories". Among them, the number of initial keywords corresponding to symptoms is relatively large, the number of initial keywords corresponding to the population is the second, and the number of initial keywords corresponding to diseases is relatively small. Then, the training initial keywords can be selected from the initial keywords corresponding to each initial keyword category according to the preset category ratio (for example, the value of population: symptom: disease: other categories is 2:3:1:1). It should be noted that the preset category ratio can be set according to the actual situation and is not limited in this specification.

[0054] After determining the training initial keywords, the initial keyword classification model can be trained according to the training initial keywords and the training keyword categories corresponding to the training initial keywords. In practical applications, the Bert model or the RoBERTa-wwm model can be used to construct the initial keyword classification model. In the method provided in the embodiments of this specification, the model architecture of the initial keyword classification model is not limited.

[0055] According to the trained initial keyword classification model, keyword classification is performed on the initial keywords that have not participated in the training and whose initial keyword category is other categories, and prediction category information is added to the initial keywords of other categories. The prediction category information refers to the predicted category added to the initial keywords of other categories after being identified by the initial keyword classification model.

[0056] When the initial keyword classification model outputs the prediction category information for the initial keywords of other categories, it will also output the confidence level corresponding to the prediction category information. The confidence level of the prediction category information is used to determine the classification weight value of the prediction category information. In the method provided in the embodiments of this specification, the prediction category information with a confidence level greater than the preset confidence threshold is retained. At the same time, the initial keyword category of the corresponding initial keyword is updated with the prediction category information.

[0057] After performing the above steps, return to train the initial keyword classification model with each initial keyword and the initial keyword category corresponding to each initial keyword again until all data has participated in the model training of the initial keyword classification model. Thus, a trained keyword classification model is obtained.

[0058] After all data have participated in the model training of the initial keyword classification model, the trained keyword classification model can be used to re-predict the initial keywords with the initial keyword category of other categories, and pseudo-label categories can be added to the initial keywords of each other category. Sort the pseudo-label categories according to the corresponding confidence levels, and obtain a preset number of initial keywords with higher confidence levels. Replace the initial keywords with pseudo-label categories for the initial keywords of other categories. And continue to train the keyword classification model, and adjust the weights of the pseudo-label categories using exponential decay measurement in each round of training to reduce the influence of the pseudo-label categories on the keyword classification model.

[0059] In continuous model training for a preset number of rounds, when the number of pseudo-label categories below the preset confidence threshold is less than the preset number threshold, it is considered that the training of the keyword classification model is completed.

[0060] S1046. Identify the predicted keyword categories of each initial keyword according to the trained keyword classification model, and determine at least one target keyword from each initial keyword based on the predicted keyword categories.

[0061] After obtaining the trained keyword classification model, identify each initial keyword based on the trained keyword classification model to obtain the predicted keyword category corresponding to each initial keyword. Use the keyword with the predicted keyword category being the preset keyword category as the target keyword.

[0062] Specifically, in practical applications, after obtaining the predicted keyword categories corresponding to each initial keyword, data normalization processing can be performed on each initial keyword according to the predicted keyword categories, such as removing duplicate records and formatting to ensure the standardization and integrity of the data, so as to obtain the final target keyword.

[0063] In another specific embodiment provided in this specification, construct a keyword-product group according to each target keyword and the target product, including: Construct an initial keyword-product group according to each target keyword and the target product; Receive data verification for the initial keyword-product group, and determine the initial keyword-product group that passes the data verification as the keyword-product group.

[0064] In the method provided in the embodiments of this specification, after determining the target keyword, it can be spliced with the target product in the to-be-processed dialogue information to construct a keyword-product group.

[0065] In practical applications, it is possible that there is a correlation between the target keywords and the target products. To better enhance the relevance and logic between the target keywords and the target products, in the method provided in the embodiments of this specification, an operation of data verification is also provided. Specifically, an initial keyword-product group is constructed based on each target keyword and the target product.

[0066] Receive data verification for the initial keyword-product group. Data verification refers to determining the accuracy of the target keywords in the initial keyword-product group, the rationality of product recommendations, and the logic between the two. The data verification can be implemented by data verification rules jointly designed by professional business teams and product teams. The initial keyword-product group that passes the data verification is determined as the keyword-product group.

[0067] Step 106: Train a product recommendation model based on the keyword-product group so that the product recommendation model learns to recommend target products according to the target keywords.

[0068] After obtaining the keyword-product group, the keyword-product group can be used to further train the product recommendation model. In the method provided in the embodiments of this specification, the product recommendation model can be a large language model. After being trained by the keyword-product group, the product recommendation model has the ability to accurately match the corresponding target products according to the relevant target keywords.

[0069] In a specific implementation manner provided in this specification, training a product recommendation model based on the keyword-product group so that the product recommendation model learns to recommend target products according to the target keywords includes: Construct an information injection prompt based on the keyword-product group; Input the information injection prompt into the product recommendation model so that the product recommendation model learns to recommend target products according to the target keywords.

[0070] In this implementation manner, an information injection prompt for information injection can be constructed according to the keyword-product group, converting the recommendation scheme corresponding to the keyword-product group into a prompt in natural language form. Corresponding information will be generated in the information injection prompt according to the type of the target keyword.

[0071] Input the information injection prompt into the product recommendation model to guide the product recommendation model to incorporate relevant knowledge when generating product recommendations.

[0072] For example, taking the medical scenario as an example, the keyword-product group is [Chronic Obstructive Pulmonary Disease, Respiratory Failure, Carbon Dioxide Retention, Moderate to Severe Obstructive Sleep Apnea Syndrome - Bilevel Ventilator]. The information injection prompt generated based on this is: "Question: What kind of ventilator should a patient with chronic obstructive pulmonary disease use? Answer: For patients with chronic obstructive pulmonary disease (COPD), a bilevel positive airway pressure (BiPAP) ventilator is usually recommended rather than a single-level ventilator.

[0073] Bilevel positive airway pressure (BiPAP) ventilator Working principle: Provides two pressure values, namely inspiratory positive airway pressure (IPAP) and expiratory positive airway pressure (EPAP), to help patients breathe more easily through the pressure difference.

[0074] Applicable scenarios: Suitable for COPD patients, especially those with combined respiratory failure and carbon dioxide retention.

[0075] Suitable for patients with moderate to severe obstructive sleep apnea syndrome, especially those with poor efficacy of single-level ventilators.

[0076] Advantages: The breathing is more natural, which can effectively improve dyspnea and reduce the work of respiratory muscles.

[0077] Why are BiPAP ventilators more suitable for COPD patients? COPD patients often suffer from respiratory muscle fatigue and carbon dioxide retention. The BiPAP ventilator helps patients expel carbon dioxide more effectively and reduce the breathing burden by providing different inspiratory and expiratory pressures.

[0078] Inject the information injection prompt into the product recommendation model to achieve model training of the product recommendation model. So that the product recommendation model can incorporate relevant knowledge when generating answers. Specifically, the Instruct Gpt method can be used to provide the above information injection prompt to the product recommendation model, so that the product recommendation model can learn the examples in the information injection prompt and learn how to generate samples that meet the requirements according to the prompt.

[0079] In addition, the data in the information injection prompt can also be added to the fine-tuning training task of the existing general task, which can make full use of the relevance between different tasks and improve the comprehensive performance of the product recommendation model.

[0080] In multi-task learning, an appropriate loss function can also be designed to balance the weights between tasks and ensure that the information injection task can receive sufficient attention.

[0081] During the training process of the product recommendation model, a reinforcement learning strategy can also be introduced to enhance the product recommendation model's ability to understand and distinguish knowledge. By constructing positive and negative sample pairs, the model can learn how to map similar knowledge points to a similar semantic space and distinguish different knowledge points, thereby improving the product recommendation ability.

[0082] In another specific implementation provided in this specification, the method further includes: Updating the business knowledge graph according to the keyword product group to add the target product to the business knowledge graph.

[0083] In the specific implementation provided in the embodiments of this specification, the business knowledge graph is used to identify the initial keyword categories corresponding to each initial keyword. After obtaining the keyword product group, the business knowledge graph can also be updated using the keyword product group to update the information of the target product in the business knowledge graph, add entities and relationships related to the target product, and construct a product business knowledge graph. Enrich the content of the knowledge graph.

[0084] The method provided in the embodiments of this specification extracts target keywords associated with the target product from the conversation information, and constructs a keyword product group based on the target keywords and the target product. By injecting the keyword product group into the product recommendation model, the trained product recommendation model can provide more targeted product recommendations for users according to the information of the keyword product group, reduce the waiting time of users, provide more professional reply words for customer service, and improve the interaction experience between users and customer service.

[0085] The following combines the attached Figure 2 , taking the application of the training method of the product recommendation model provided in this specification in the medical scenario as an example, to further illustrate the training method of the product recommendation model. Among them, Figure 2 Fig. shows the processing flowchart of a training method of a product recommendation model applied to a medical scenario provided in an embodiment of this specification, which specifically includes the following steps.

[0086] Step 202: Obtain the initial conversation information and parse the conversation intention of the initial conversation information.

[0087] Step 204: When the conversation intention is product recommendation and the initial conversation information includes the target medical product, determine the initial conversation information as the conversation information to be processed.

[0088] Step 206: Segment the conversation information to be processed using the n-gram word segmentation strategy to obtain at least one reference initial keyword.

[0089] Step 208: Calculate the tf-idf values of each reference initial keyword, and retain the initial keywords whose ti-idf values are greater than the preset threshold.

[0090] Step 210: Based on the medical knowledge graph, add tags of population, symptom, disease, and others to the initial keywords.

[0091] Step 212: Sample the data corresponding to the above four types of tags according to a preset ratio to obtain initial training keywords, and train the initial keyword classification model based on the initial training keywords.

[0092] Step 214: Annotate the data that did not participate in the model training according to the initial keyword classification model, and filter out the data with a confidence level lower than the confidence threshold.

[0093] Step 216: Continue to determine the training keywords to train the initial keyword model until all the initial keywords participate in the model training to obtain a keyword classification model.

[0094] Step 218: Use the keyword classification model to predict other types of initial keywords to obtain corresponding pseudo-label data, and obtain a preset number of pseudo-label data with a confidence level greater than the preset quantity threshold. The pseudo-label data is used to continue training the keyword classification model.

[0095] Step 220: Adjust the label weights of the pseudo-label data in the sample data by using exponential decay measurement, and continuously train the keyword classification model until the number of pseudo-label data with a confidence level less than the confidence threshold in three consecutive rounds of prediction is less than the threshold.

[0096] Step 222: Use the keyword classification model to re-identify each initial keyword to obtain the population, symptoms, and disease types corresponding to each initial keyword, remove duplicate records, correct inconsistent formats, and ensure data standardization to obtain target keywords.

[0097] Step 224: Construct a keyword-product group according to the target medical product and the target keywords, and update the medical knowledge graph according to the keyword-product group, and add entities and relationships related to the medical product to the medical knowledge graph.

[0098] Step 226: Construct information injection prompt words according to the keyword-product group, and input the information injection prompt words into the product recommendation model so that the product recommendation model learns to recommend target medical products according to the target keywords.

[0099] The method provided in the embodiments of this specification extracts target keywords associated with the target medical product from the conversation information, and constructs a keyword-product group based on the target keywords and the target medical product. By injecting the keyword-product group into the product recommendation model, the trained product recommendation model can provide more targeted medical product recommendations for users according to the information of the keyword-product group, reduce the waiting time of users, provide more professional reply words for customer service, and improve the interaction experience between users and customer service.

[0100] Meanwhile, according to the keyword product group, the medical knowledge graph can also be updated to enrich the knowledge content in the medical knowledge graph, providing data support for subsequent data processing.

[0101] Corresponding to the above method embodiments, this specification also provides an embodiment of a training device for a product recommendation model. Figure 3 The structure diagram of a training device for a product recommendation model provided by an embodiment of this specification is shown. As Figure 3 shown, the device includes: An acquisition module 302, configured to acquire the dialogue information to be processed, where the dialogue information to be processed includes the target product and the interactive dialogue text corresponding to the target product; A construction module 304, configured to extract at least one target keyword corresponding to the target product from the interactive dialogue text, and construct a keyword product group according to each target keyword and the target product; A training module 306, configured to train a product recommendation model based on the keyword product group, so that the product recommendation model learns to recommend the target product according to the target keyword.

[0102] Optionally, the acquisition module 302 is further configured to: Acquire the initial dialogue information and parse the dialogue intention of the initial dialogue information; When the dialogue intention is product recommendation and the initial dialogue information includes the target product, determine the initial dialogue information as the dialogue information to be processed.

[0103] Optionally, the construction module 304 is further configured to: Extract at least one initial keyword from the interactive dialogue text, and identify the initial keyword category corresponding to each initial keyword according to the business knowledge graph; Train a keyword classification model according to each initial keyword and the initial keyword category corresponding to each initial keyword; Identify the predicted keyword category of each initial keyword according to the trained keyword classification model, and determine at least one target keyword from each initial keyword based on the predicted keyword category.

[0104] Optionally, the construction module 304 is further configured to: Process the interactive dialogue text based on a preset word segmentation model to obtain at least one reference initial keyword; Calculate the keyword weight value of each reference initial keyword in the interactive dialogue text; Determine the initial keyword from each reference initial keyword according to each keyword weight value.

[0105] Optionally, the building module 304 is further configured to: Determine a target initial keyword from among the initial keywords, where the target initial keyword is any one of the initial keywords; In the case where an entity is matched for the target initial keyword in the business knowledge graph, determine an initial keyword category corresponding to the target initial keyword according to the matched entity; In the case where no entity is matched for the target initial keyword in the business knowledge graph, determine that the initial keyword category corresponding to the target initial keyword is other category.

[0106] Optionally, the initial keyword categories include business categories and other categories; The building module 304 is further configured to: Determine training initial keywords from among the initial keywords according to the initial keyword categories, and train an initial keyword classification model according to the training initial keywords and the training keyword categories corresponding to the training initial keywords; Add prediction category information to the initial keywords whose initial keyword category is other category according to the initial keyword classification model; Update the initial keyword category of the corresponding initial keyword with each prediction category information, and continue to train the initial keyword classification model with each initial keyword and the initial keyword category corresponding to each initial keyword to obtain a keyword classification model.

[0107] Optionally, the apparatus further includes a knowledge graph update module, configured to: Update the business knowledge graph according to the keyword product group to add the target product to the business knowledge graph.

[0108] Optionally, the building module 304 is further configured to: Construct an initial keyword product group according to each target keyword and the target product; Receive data verification for the initial keyword product group, and determine that the initial keyword product group that passes the data verification is the keyword product group.

[0109] Optionally, the training module 306 is further configured to: Construct an information injection prompt word based on the keyword product group; Input the information injection prompt word into the product recommendation model, so that the product recommendation model learns to recommend a target product according to the target keyword.

[0110] The device provided in the embodiments of this specification extracts target keywords associated with the target product from the conversation information, and constructs a keyword-product group based on the target keywords and the target product. By injecting the keyword-product group into the product recommendation model, the trained product recommendation model can provide more targeted product recommendations for users according to the information in the keyword-product group, reduce the waiting time of users, provide more professional reply scripts for customer service, and improve the interaction experience between users and customer service.

[0111] The above is a schematic solution of a training device for a product recommendation model in this embodiment. It should be noted that the technical solution of the training device for the product recommendation model and the technical solution of the above-mentioned product recommendation model training method belong to the same concept. For the details not described in the technical solution of the training device for the product recommendation model, reference can be made to the description of the technical solution of the above-mentioned product recommendation model training method.

[0112] See Figure 4 , Figure 4 shows a flowchart of a product recommendation method provided by an embodiment of this specification, which specifically includes the following steps.

[0113] Step 402: Receive the interaction dialogue text to be processed.

[0114] Step 404: Extract at least one target keyword from the interaction dialogue text to be processed, and construct a product recommendation prompt word based on each target keyword.

[0115] Step 406: Input the product recommendation prompt word into the product recommendation model to obtain the target recommended product output by the product recommendation model, where the product recommendation model is trained by the above-mentioned product recommendation model training method.

[0116] See Figure 5 , Figure 5 shows an architecture diagram of a product recommendation system provided by an embodiment of this specification. The product recommendation system may include a client 100 and a server 200; The client 100 is used to send the interaction dialogue text to be processed to the server 200; The server 200 is used to extract at least one target keyword from the interaction dialogue text to be processed, and construct a product recommendation prompt word based on each target keyword; input the product recommendation prompt word into the product recommendation model to obtain the target recommended product output by the product recommendation model, where the product recommendation model is trained by the above-mentioned product recommendation model training method; send the target recommended product to the client 100; The client 100 is further used to receive the target recommended product sent by the server 200.

[0117] The product recommendation system may include multiple clients 100 and a server 200. Among them, the clients 100 can be referred to as end-side devices, and the server 200 can be referred to as cloud-side devices. Communication connections can be established among the multiple clients 100 through the server 200. In the medical product recommendation scenario, the server 200 is used to provide medical product recommendation services among the multiple clients 100. The multiple clients 100 can respectively act as senders or receivers and achieve communication through the server 200.

[0118] Users can interact with the server 200 through the client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In the medical product recommendation scenario, it can be that users publish data streams to the server 200 through the client 100, and the server 200 generates target medical recommended products based on the data streams and pushes the target medical recommended products to other communicating clients.

[0119] Among them, a connection is established between the client 100 and the server 200 through a network. The network provides a medium for the communication link between the client 100 and the server 200. The network can include various connection types, such as wired, wireless communication links, or fiber optic cables, etc. The data transmitted by the client 100 may need to be processed such as encoded, transcoded, compressed, etc. before being published to the server 200.

[0120] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5) application, or a light application (also known as a mini program, a lightweight application program), or a cloud application, etc. The client 100 can be developed based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server 200, such as developed based on the real-time communication (RTC) SDK, etc. The client 100 can be deployed in a computing device and needs to rely on the device or certain APPs in the device to run, etc. The computing device can, for example, have a display screen and support information browsing, etc., such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can usually be configured in the computing device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0121] The server 200 may include servers that provide various services, such as a server that provides communication services for multiple clients, a server for background training that supports models used on the client, a server that processes data sent by the client, and so on. It should be noted that the server 200 may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server. The server may also be a server of a distributed system, or a server combined with a blockchain. The server may also be a cloud server such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content delivery network (CDN, Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0122] It is worth noting that the product recommendation method provided in the embodiments of this specification is generally executed by the server. However, in other embodiments of this specification, the client may also have a similar function to the server, so as to execute the product recommendation method provided in the embodiments of this specification. In other embodiments, the product recommendation method provided in the embodiments of this specification may also be jointly executed by the client and the server.

[0123] Figure 6 FIG. shows a structural block diagram of a computing device 600 according to an embodiment of the present application. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 through a bus 630, and a database 650 is used to store data.

[0124] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. Examples of such networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of wired or wireless network interfaces (e.g., a network interface controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0125] In one embodiment of the present application, the above components of the computing device 600, as well as Figure 6 other components not shown in the figure, may also be connected to each other, for example, via a bus. It should be understood that Figure 6 the block diagram of the computing device shown is for illustrative purposes only and is not a limitation on the scope of the present application. Those skilled in the art can add or replace other components as needed.

[0126] The computing device 600 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 600 can also be a mobile or stationary server.

[0127] Among them, the processor 620 is used to execute the following computer program / instructions, and when the computer program / instructions are executed by the processor, the steps of the above product recommendation model training method and product recommendation method are implemented.

[0128] The above is a schematic solution of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solutions of the above product recommendation model training method and product recommendation method belong to the same concept. For the details not described in detail in the technical solution of the computing device, reference can be made to the descriptions of the technical solutions of the above product recommendation model training method and product recommendation method.

[0129] An embodiment of this specification also provides a computer-readable storage medium storing computer programs / instructions, which, when executed by a processor, implement the steps of the above product recommendation model training method and product recommendation method.

[0130] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiment of the computer-readable storage medium, since it is basically similar to the embodiments of the product recommendation model training method and product recommendation method, the description is relatively simple. For the relevant parts, reference can be made to the partial descriptions of the embodiments of the product recommendation model training method and product recommendation method.

[0131] An embodiment of this specification also provides a computer program product including computer programs / instructions, which, when executed by a processor, implement the steps of the above product recommendation model training method and product recommendation method.

[0132] The above is a schematic solution of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solutions of the above product recommendation model training method and product recommendation method belong to the same concept. For the details not described in detail in the technical solution of the computer program product, reference can be made to the descriptions of the technical solutions of the above product recommendation model training method and product recommendation method.

[0133] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0134] The computer instructions include computer program code, which may be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, mobile hard disks, magnetic disks, optical disks, computer memories, read-only memories (ROMs), random access memories (RAMs), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0135] It should be noted that the above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this specification.

[0136] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0137] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The alternative embodiments do not elaborate on all the details and do not limit the invention to only the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can well understand and utilize this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A training method for a product recommendation model, comprising: Obtaining the dialogue information to be processed, where the dialogue information to be processed includes the target product and the interactive dialogue text corresponding to the target product; Extracting at least one target keyword corresponding to the target product from the interactive dialogue text, and constructing a keyword-product group based on each target keyword and the target product; Training a product recommendation model based on the keyword-product group, so that the product recommendation model learns to recommend the target product according to the target keyword.

2. The method according to claim 1, wherein extracting at least one target keyword corresponding to the target product from the interactive dialogue text includes: Extracting at least one initial keyword from the interactive dialogue text, and identifying the initial keyword category corresponding to each initial keyword according to the business knowledge graph; Training a keyword classification model according to each initial keyword and the initial keyword category corresponding to each initial keyword; Identifying the predicted keyword category of each initial keyword according to the trained keyword classification model, and determining at least one target keyword from each initial keyword based on the predicted keyword category.

3. The method according to claim 2, wherein the initial keyword category includes a business category and other categories; Training a keyword classification model according to each initial keyword and the initial keyword category corresponding to each initial keyword includes: Determining training initial keywords from each initial keyword according to each initial keyword category, and training an initial keyword classification model according to the training initial keywords and the training keyword categories corresponding to the training initial keywords; Adding predicted category information to the initial keywords with the initial keyword category being other categories according to the initial keyword classification model; Updating the initial keyword category of the corresponding initial keyword with each predicted category information, and continuing to train the initial keyword classification model with each initial keyword and the initial keyword category corresponding to each initial keyword to obtain a keyword classification model.

4. The method according to claim 2, further comprising: Updating the business knowledge graph according to the keyword-product group to add the target product to the business knowledge graph.

5. The method according to claim 1, wherein constructing a keyword-product group based on each target keyword and the target product includes: Constructing an initial keyword-product group according to each target keyword and the target product; Receiving data verification for the initial keyword-product group, and determining the initial keyword-product group that passes the data verification as the keyword-product group.

6. The method according to claim 1, training a product recommendation model based on the keyword-product group, so that the product recommendation model learns to recommend the target product according to the target keyword, includes: Constructing an information injection prompt word based on the keyword-product group; Inputting the information injection prompt word into the product recommendation model, so that the product recommendation model learns to recommend the target product according to the target keyword.

7. A product recommendation method, comprising: Receiving the interactive dialogue text to be processed; Extracting at least one target keyword from the interactive dialogue text to be processed, and constructing a product recommendation prompt word based on each target keyword; Input the product recommendation prompt into the product recommendation model to obtain the target recommended product output by the product recommendation model, where the product recommendation model is trained by the training method described in any one of claims 1-6.

8. A computing device, comprising: A memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium storing computer programs / instructions, and when the computer programs / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.

10. A computer program product comprising computer programs / instructions, and when the computer programs / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Keyword corpus annotation training extraction tool

    CN110298033A

  • Model training method and device and keyword extraction method and device

    CN113887206A

  • Product recommendation method and device, equipment and computer readable storage medium

    CN113888265A

  • A method for constructing promotional copy training corpus and related devices

    CN119782816A

  • Determining order preferences and item suggestions

    US11348160B1