Product recommendation method, product recommendation model training method, device and equipment
By combining the preprocessing and annotation of conversational data and non-conversation data, the product recommendation model is trained, which solves the problems of high training cost and low efficiency of product recommendation models in the existing technology, and achieves accurate recommendation effects in complex scenarios.
Patent Information
- Application Number
- CN202410722780.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, the training cost of product recommendation models is high and the efficiency is low. It is difficult to handle the relationship between complex user behaviors and products, resulting in inaccurate prediction results and low efficiency.
By inputting the user's dialogue data into the pre-trained product tendency prediction model, the user's tendency characteristic data is obtained, and combined with the pre-processed non-dialogue data, it is input into the pre-trained product recommendation model to predict product recommendation results. This method includes labeling and preprocessing the training data to train an initial product recommendation model, and obtaining the trained model to achieve accurate recommendations.
It achieves accurate recommendation results in complex product recommendation scenarios, reduces costs and improves efficiency, and is suitable for complex business scenarios under large-scale data.
Smart Images

Figure CN118628201A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a product recommendation method, a training method, a device and equipment for a product recommendation model. Background Art
[0002] Personalized recommendations driven by big data can provide accurate product recommendations based on the user's historical purchasing behavior and preferences. However, in some areas, product recommendations mainly rely on the experience and manual analysis of account managers, which has problems such as high information acquisition costs, inefficient recommendations, and lack of real-time performance. In other methods, traditional machine learning models are used to predict product purchase tendencies, but this method can only capture low-level interactions between user features and is difficult to handle the complex relationship between user behavior and products under large amounts of data, resulting in inaccurate prediction results and low efficiency. Summary of the invention
[0003] The present application provides a product recommendation method, a product recommendation model training method, a device and equipment to solve the problems of high cost and low efficiency in product recommendation model training.
[0004] In a first aspect, the present application provides a product recommendation method, comprising:
[0005] Inputting the user's conversation data into a pre-trained product tendency prediction model to obtain the user's tendency characteristic data for the product;
[0006] Preprocessing the non-conversation data of the user to obtain preprocessed non-conversation data;
[0007] The preprocessed non-dialogue data and the tendency feature data are input into a pre-trained product recommendation model to obtain the user's recommendation result for the product.
[0008] In an implementable manner, the non-conversation data includes numerical data and non-numerical data; and the pre-processing the non-conversation data of the user to obtain the pre-processed non-conversation data includes:
[0009] Mapping the non-numeric data to different numerical values respectively to obtain mapped numerical data;
[0010] Scaling the value of the numerical data to a preset scale to obtain scaled numerical data;
[0011] The scaled numerical data and the mapped numerical data are used as the pre-processed non-dialog data.
[0012] In a second aspect, the present application provides a method for training a product recommendation model, comprising:
[0013] Input the conversation data to be trained into the pre-trained product tendency prediction model to obtain the tendency feature data to be trained;
[0014] Label the non-conversational data to be trained with recommended labels, and preprocess the non-conversational data to be trained with labels to obtain the non-conversational data to be trained with recommended labels after preprocessing;
[0015] The initial product recommendation model is trained based on the non-dialogue data to be trained with recommendation labels after the preprocessing and the tendency feature data to be trained to obtain a trained product recommendation model.
[0016] In an achievable manner, before inputting the conversation data to be trained into a pre-trained product tendency model to obtain training tendency feature data, the method further includes:
[0017] Labeling the conversation data to be trained with a tendency label;
[0018] Filter the product-related tendency training data from the conversation data to be trained with tendency labels;
[0019] The initial product tendency prediction model is trained based on the tendency training data to obtain the pre-trained product tendency prediction model.
[0020] In one achievable manner, the step of labeling the conversation data to be trained with a tendency label includes:
[0021] labeling a first dialogue data to be trained in the dialogue data to be trained with a tendency label;
[0022] Clustering is performed on the second conversation data to be trained and the first conversation data to be trained in the conversation data to be trained, and the tendency labels of the first conversation data to be trained of the same category are marked for the second conversation data to be trained of the same category.
[0023] In an achievable manner, the step of screening the product-related tendency training data from the to-be-trained conversation data with tendency labels includes:
[0024] Obtaining a correlation value between the to-be-trained dialogue data with the tendency label and a preset product text, wherein the preset product text includes a product tendency dialogue text;
[0025] The conversation data to be trained with tendency labels and whose correlation values are greater than a preset value are used as tendency training data.
[0026] In a third aspect, the present application provides a product recommendation device, comprising: a tendency data acquisition module, for inputting user conversation data into a pre-trained product tendency prediction model to obtain the user's tendency feature data for the product;
[0027] A first preprocessing module, used for preprocessing the non-conversation data of the user to obtain preprocessed non-conversation data;
[0028] The recommendation result acquisition module is used to input the preprocessed non-dialogue data and the tendency feature data into a pre-trained product recommendation model to obtain the user's recommendation result for the product.
[0029] In a fourth aspect, the present application provides a training device for a product recommendation model, comprising:
[0030] A tendency training data acquisition module is used to input the conversation data to be trained into a pre-trained product tendency prediction model to obtain tendency feature data to be trained;
[0031] A second preprocessing module is used to label the non-dialogue data to be trained with recommended labels, and preprocess the non-dialogue data to be trained with the labels to obtain the non-dialogue data to be trained with recommended labels after preprocessing;
[0032] The model training module is used to process the initial product recommendation model based on the non-dialogue data to be trained with recommendation tags after preprocessing and the tendency feature data to be trained to obtain a trained product recommendation model.
[0033] In a fifth aspect, the present application provides an electronic device, comprising: a processor and a memory; the memory is used to store instructions; the processor is used to execute the instructions in the memory, so that the electronic device executes the method as described in the first aspect and the second aspect.
[0034] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the methods described in the first and second aspects.
[0035] In a seventh aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first and second aspects.
[0036] The product recommendation method, product recommendation model training method, device and equipment provided in this application use conversation data to obtain product tendency feature data to enrich user portraits, thereby predicting the recommendation results for the product through the tendency feature data and preprocessed non-conversation data, and obtaining accurate recommendation results. This solution can be applied to complex product recommendation scenarios with low cost and high efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0038] Figure 1 This is an implementation scenario diagram shown for an exemplary embodiment;
[0039] Figure 2 A flowchart of a product recommendation method shown as an exemplary embodiment;
[0040] Figure 3 This is a structural diagram of a product recommendation model shown in an exemplary embodiment;
[0041] Figure 4 A flowchart of a method for training a product recommendation model is shown as an exemplary embodiment;
[0042] Figure 5 This is a structural diagram of a product recommendation system shown as an exemplary embodiment;
[0043] Figure 6 A structural diagram of a training method for a product recommendation device shown as an exemplary embodiment;
[0044] Figure 7 A structural diagram of a training device for a product recommendation model is shown as an exemplary embodiment;
[0045] Figure 8 The present invention is a block diagram of an electronic device showing an exemplary embodiment.
[0046] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0047] 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 implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0048] It should be noted that the user's conversation data, non-conversation data and product-related data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data understood and authorized by the user or fully authorized by all parties, and the collection, use, processing, transmission, provision, disclosure and application of the relevant data comply with the laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and comply with the principles of legality, legitimacy and necessity.
[0049] First, the terms involved in this application are explained:
[0050] User Profile: In marketing and product development, a user profile is a description of a user's characteristics based on information such as user behavior, preferences, and interests. By analyzing user profiles, companies can better understand their target user groups and provide personalized products and services.
[0051] Natural Language Processing: Natural language processing is an artificial intelligence technology that aims to enable computers to understand, process and generate natural language. It covers a range of tasks, including text classification, sentiment analysis, language translation, etc., and can be applied to speech recognition, machine translation, intelligent customer service and other fields.
[0052] Deep Neural Network: A deep neural network is an artificial neural network with multiple hidden layers. Compared with traditional machine learning algorithms, deep neural networks can learn more complex and abstract feature representations, thereby improving the performance and generalization ability of the model.
[0053] Kafka: Kafka is a distributed stream processing platform for publishing and subscribing to real-time data. It has the characteristics of high throughput, low latency and high reliability, and is often used to build real-time data pipelines and stream processing applications.
[0054] Flink: Flink is an open source stream processing framework that supports precise processing and state management based on event time. It provides high-performance stream computing and data stream processing capabilities, and is suitable for scenarios such as real-time data analysis and real-time recommendations.
[0055] FSA scenario: In natural language processing, finite state automata are often used for text analysis and pattern matching. They can identify, classify or analyze input text based on predefined states and transition rules.
[0056] Word2vec: Word2Vec is a word embedding technology used to map words in a text to a low-dimensional vector space. It can capture the semantic relationship between words and is often used for feature representation and semantic analysis in natural language processing tasks.
[0057] DBscan: DBSCAN is a density clustering algorithm that is used to divide data points into clusters connected by different densities. Compared with traditional distance-based clustering algorithms, DBSCAN can automatically identify clusters of different shapes and densities and is suitable for processing data sets with more noise and outliers.
[0058] Bert (Bidirectional Encoder Representations from Transformers): A pre-trained language model based on the Transformer (a network model) architecture. It can be unsupervised pre-trained on large text corpora and fine-tuned in various natural language processing tasks, achieving good results.
[0059] DeepFM: A recommendation model that combines factorization machines and deep neural networks, suitable for handling recommendation problems with high-order interactions. Factorization machines are used to model the interactions between different features of customer profiles, while deep neural networks are a model for learning high-order interactions. By organically combining factorization machines and deep neural networks, low-order and high-order interactions of customer profiles are realized, allowing the recommendation model to better understand the feature interactions between users and marketing products.
[0060] Fine-tune: Fine-tune means fine-tuning the pre-trained model on a task-specific dataset to adapt to the task requirements and data characteristics.
[0061] Activation function: Activation function is a nonlinear function in neural network, which is used to introduce nonlinear transformation and nonlinear features. Common activation functions include sigmoid, ReLU, tanh, etc., which can make neural network have stronger expression and approximation ability.
[0062] Batch Normalization: A neural network training technique used to accelerate network convergence and improve model stability. It standardizes each feature dimension during training to reduce the gradient vanishing and exploding problems and accelerate the network training process.
[0063] The recommendation model driven by massive data has achieved remarkable success in many industries and brought huge economic benefits. For example, in the field of e-commerce, the personalized recommendation system driven by big data can make accurate product recommendations based on the user's historical purchasing behavior and preferences; similarly, in the video streaming industry, the recommendation algorithm based on big data can recommend personalized programs based on the user's viewing history and interests, which greatly improves user retention and viewing time, thereby increasing subscription revenue.
[0064] However, in some areas, product recommendations mainly rely on manual experience and manual analysis. This approach has problems such as high information acquisition costs, inefficient recommendations, and lack of real-time performance. Therefore, how to improve the efficiency of recommendation analysis has become a problem that needs to be solved urgently.
[0065] Some solutions are based on the professional's analysis of user consumption tendencies, rules, product features and other multi-dimensional business experience, and through the establishment of relevant rule sets, the user's purchase tendency analysis is realized to obtain the recommended results for the user's product. This method is highly explanatory and easy to implement in industrial scenarios, but this type of method is highly dependent on business experience, and has high time and labor costs, and is difficult to apply in complex business data scenarios; at the same time, product attributes are uncertain with market fluctuations, and general expert experience cannot adapt well to market changes and user behavior tendencies in a short period of time, so there is a certain lag in user recommendations.
[0066] In other solutions, the recommendation results for users for products are predicted based on traditional machine learning. Based on user business data, a machine learning model is designed to learn the mapping relationship between user data characteristics and purchase tendencies. This type of method mainly uses traditional machine learning methods such as logistic regression and support vector machines to capture low-order interactions between user features and realize user purchase predictions. This method requires fewer computing resources and has strong versatility in business scenarios. However, this type of method can only capture low-order feature interactions and is only suitable for low-level data business scenarios. It is difficult to handle complex user behaviors and business product relationships, which leads to relatively weak performance in complex business scenarios. Especially in cold start business problems, due to the lack of sufficient information to establish accurate user portraits, the performance of this type of method is severely limited. Secondly, this type of method has a high time calculation complexity and may face problems of low execution efficiency or even inability to operate when faced with large-scale data.
[0067] Based on this, this embodiment proposes a product recommendation method, a training method, a device and a device for a product recommendation model, aiming to solve the problems of low product recommendation accuracy, high cost and low efficiency.
[0068] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0069] The training method of the product recommendation model and the product recommendation method provided in this application can be applied to Figure 1 The implementation environment shown is Figure 1 As shown, the implementation environment may include a terminal and a server, and the terminal and the server are communicatively connected.
[0070] Understandably, Figure 1 The number of terminals and servers shown in the figure is 1. In some embodiments, the number of terminals may be one or more. In other embodiments, the number of servers may be one or more.
[0071] In this embodiment, the terminal can receive the user's conversation data and the user's non-conversation data, and then the terminal can send the user's conversation data and the user's non-conversation data to the server. The server predicts the product recommendation result based on the user's conversation data and the user's non-conversation data, obtains the recommendation result, and returns the recommendation result to the terminal to display the product recommendation result through the terminal's own visualization structure.
[0072] In some embodiments, after obtaining the user's conversation data and the user's non-conversation data, the server inputs the user's conversation data into a pre-trained product tendency prediction model to obtain the user's tendency feature data for the product; pre-processes the user's non-conversation data to obtain pre-processed non-conversation data; inputs the pre-processed non-conversation data and the tendency feature data into a pre-trained product recommendation model to obtain the user's recommendation results for the product.
[0073] In other embodiments, the terminal may receive the user's conversation data to be trained and the user's non-conversation data to be trained, and then the terminal may send the user's conversation data to be trained and the user's non-conversation data to be trained to the server. The server trains the product recommendation model based on the user's conversation data to be trained and the user's non-conversation data to be trained, and returns the training result to the terminal.
[0074] In some embodiments, after obtaining the user's conversation data to be trained and the user's non-conversation data to be trained, the server inputs the conversation data to be trained into a pre-trained product tendency prediction model to obtain tendency feature data to be trained; labels the non-conversation data to be trained with recommended labels, and preprocesses the non-conversation data to be trained with the labels to obtain the non-conversation data to be trained with recommended labels after preprocessing; and trains the initial product recommendation model based on the non-conversation data to be trained with recommended labels after preprocessing and the tendency feature data to be trained to obtain the trained product recommendation model.
[0075] In some embodiments, the terminal may be a wired terminal or a wireless terminal with a visual structure. In other embodiments, the terminal may be an electronic device with a visual structure such as a mobile phone, a computer, a tablet, or a vehicle-mounted device.
[0076] In some embodiments, the server may be a physical server, a server cluster, a cloud server, etc., and no specific limitation is given here.
[0077] It is understandable that the training device of the product recommendation model and the product recommendation device can be set in Figure 1 The server in the embodiment shown in FIG. Figure 1 The implementation environment shown is only exemplary. In other embodiments, the home decoration image processing method can also be applied to other implementation environments, and the home decoration image processing device can also be set in other structures in other implementation environments. No specific limitations are made here.
[0078] Figure 2 is a flowchart of a product recommendation method shown in an exemplary embodiment, which is applied to Figure 1 Servers in Figure 2 As shown, the method includes steps S210 to S250, which are described in detail as follows:
[0079] Step S210: Input the user's conversation data into a pre-trained product tendency prediction model to obtain the user's tendency feature data for the product.
[0080] In this embodiment, the conversation data may include user comment information and conversation information. The conversation information may be information that can be converted into text, such as from text messages, interactive applications, emails, or phone calls. The comment information is user comment information on the product.
[0081] The product tendency prediction model is a model that can process text, such as BERT and other models. Its input is the user's conversation data, and its output is the user's tendency towards a certain product. The output is used as the user's tendency feature data for the product.
[0082] In this embodiment, the product can be a specific product (such as a washing machine of a certain model or a mobile phone of a certain brand, etc.), or a certain type of product (such as financial products, fund products, etc.). No specific limitation is made here, but it can be understood that a product should have a product tendency prediction model for the product, so as to input the user's conversation data into the pre-trained product tendency prediction model to obtain the user's tendency feature data for the product.
[0083] The tendency characteristic data can be the probability of the user's tendency towards the product, such as tendency, no tendency or the probability of tendency, etc. The tendency characteristic data is a numerical value. If the output is 1, it is a tendency, and the output is 0, it is no tendency. If the output is a decimal, it is the probability of tendency. Of course, this is for illustration only, and the specific tendency characteristic data can be set differently according to the training requirements of the product tendency model.
[0084] Step S230: preprocessing the user's non-conversational data to obtain preprocessed non-conversational data.
[0085] In this embodiment, in addition to the user's conversation data, there may also be the user's non-conversation data, which may include user attribute data, such as age, income, and gender, etc., and may also include behavioral data, such as preferences, interests, and historical product purchase information, etc. It can be understood that in the user data, other data except non-conversation data can be regarded as non-conversation data.
[0086] It can be understood that the conversation data and non-conversation data are the data of the user within a certain period of time, such as data within the past month, so as to predict the user's recommendation results for the product through the data of nodes close to the current time point.
[0087] In this embodiment, the non-dialog data may include numerical data and non-numerical data. The non-dialog data is processed to obtain data that can be input into a pre-trained product recommendation model, so that the user's recommendation results for the product can be obtained through the pre-trained product recommendation model.
[0088] In some embodiments, the input of the product recommendation model needs to be numerical data, so the non-dialog data needs to be pre-processed.
[0089] The preprocessing process may include mapping the non-numeric data to different numerical values to obtain mapped numerical data; scaling the value of the numerical data to a preset scale to obtain scaled numerical data; and using the scaled numerical data and the mapped numerical data as preprocessed non-dialog data.
[0090] In this embodiment, for non-numeric data, the non-numeric data can be converted into numerical data, such as mapping male data in gender data to one numerical value, and mapping female data to another numerical value. It should be understood that different data in the non-numeric data should be mapped to different numerical values, and the corresponding mapped numerical values can be set by oneself, and no specific restrictions are made here.
[0091] In other embodiments, the mapped value may be an integer or a non-integer, which is not specifically limited here.
[0092] For numerical data, the difference between different types of numerical data is large, which is not convenient for subsequent model processing. Here, the numerical data can be scaled to a preset scale, that is, a numerical range is set for numerical data of different categories, and the numerical values corresponding to the numerical data of this category are scaled to the numerical range in proportion or calculated according to a certain function. The numerical range is the preset scale of this type of numerical data, and there is a distance between different numerical regions, which does not exceed the preset value, so that the distance between numerical regions of different categories is appropriate to avoid imbalance in weights between numerical data.
[0093] In some embodiments, before obtaining the mapped numerical data and the scaled numerical data, the data may be first processed to fill missing values, so as to obtain filled non-numerical data and filled numerical data, and then the mapped numerical data and the scaled numerical data are obtained based on the filled non-numerical data and the filled numerical data. The filling methods of the non-numerical data and the numerical data may be the same or different.
[0094] In other embodiments, after obtaining the mapped numerical data and the scaled numerical data, the linear and nonlinear correlations between the mapped numerical data and the scaled numerical data can be quantified through correlation matrices, mutual information, etc., and redundant feature information can be eliminated to reduce the complexity of the product recommendation model and enhance the interpretability of the product recommendation model; at the same time, based on feature combination, cross-features and other methods, the interactive relationship between the data in the numerical data and the scaled numerical data is captured, and new features are introduced to characterize the interaction effects between features, thereby further improving the accuracy of the output results of the pre-trained product recommendation model.
[0095] Step S250: input the pre-processed non-dialogue data and the tendency feature data into the pre-trained product recommendation model to obtain the user's recommendation results for the product.
[0096] In this embodiment, the tendency feature data is used as a supplementary user portrait, combined with the pre-processed non-dialogue data, and input into a pre-trained product recommendation model to obtain the user's recommendation results for the product.
[0097] The preprocessed non-conversational data is numerical data, and the tendency feature data is also numerical data. Thus, the pre-trained product recommendation model can receive the numerical data and make product recommendation predictions. The obtained recommendation results are used to characterize the probability that the user will accept the product recommendation.
[0098] The product recommendation model in this embodiment can be a predictive machine model, such as DeepFM, etc., and no specific limitation is made here.
[0099] In one embodiment, the structural diagram of the product recommendation model can be referred to Figure 3 The product recommendation model includes an embedding layer, a factorization machine, a deep neural network and an output layer. The factorization machine mainly processes the interactive relationship between the input data, including the first-order linear relationship and the second-order interactive nonlinear relationship. The deep neural network contains multiple hidden layers for learning more complex feature representations.
[0100] In this embodiment, the embedding layer converts the input data into low-dimensional vector representations that capture the relationship between features. The vector dimension is controlled by the hyperparameter emb_size; the factorization machine calculates the weighted sum of the first-order features in the input data, including the first-order representation of the numerical features and the first-order representation of the categorical features in the input data and the cross terms of the second-order features. The output of the factorization machine part is connected to the output of the deep neural network part and input to the model output layer; the deep neural network includes multiple fully connected hidden layers to learn higher-order feature interactions. Each hidden layer includes linear transformation, activation function (usually ReLU) and batch normalization operations; the output layer is a fully connected layer, which is used to generate the final recommendation results.
[0101] In this embodiment, conversation data is used to obtain product tendency feature data to enrich user portraits, so that accurate recommendation results can be obtained by predicting product recommendation results through the tendency feature data and preprocessed non-conversation data. This solution can be applied to complex product recommendation scenarios with low cost and high efficiency.
[0102] Figure 4 This is an exemplary embodiment showing a method for training a product recommendation model, which can be applied in Figure 1 In the server shown, Figure 4 As shown, the method includes steps S410 to S450, which are explained in detail as follows:
[0103] Step S410: input the conversation data to be trained into the pre-trained product tendency prediction model to obtain tendency feature data to be trained.
[0104] In this embodiment, the conversation data to be trained may be historical data. The conversation data in the user's historical data is input into a pre-trained product tendency prediction model to obtain tendency feature data to be trained. The tendency feature data to be trained serves as a supplementary user portrait for the non-conversation data to be trained and is used for the subsequent training of the initial product recommendation model.
[0105] In some embodiments, the pre-trained product tendency prediction model can be obtained by training the conversation data to be trained, annotating tendency labels for the conversation data to be trained, screening product-related tendency training data from the conversation data to be trained with tendency labels, and training the initial product tendency prediction model based on the tendency training data to obtain the pre-trained product tendency prediction model.
[0106] In this embodiment, each piece of data in the to-be-trained conversation data may be annotated with a tendency label based on manual experience or the actual result of the user receiving the recommendation for the product.
[0107] In some embodiments, a tendency label is annotated on first conversation data to be trained in conversation data to be trained; the first conversation data to be trained is data obtained by random sampling in the conversation data to be trained, and then second conversation data to be trained and the first conversation data to be trained in the conversation data to be trained are clustered, and the second conversation data to be trained is data other than the first conversation data to be trained, so as to obtain conversation data to be trained of different categories, and for conversation data to be trained in a category, which may include the first conversation data to be trained and the second conversation data to be trained, the tendency label of the first conversation data to be trained in the same category is annotated, that is, for the same category, the second conversation data to be trained in the category has the same tendency label as the first conversation data to be trained in the category, so that there is no need to annotate each conversation data to be trained with a tendency label, which can improve the efficiency of tendency label annotation.
[0108] In some embodiments, before the training conversation data are labeled with tendency labels, the training conversation data may be screened using data cleaning technology, spline interpolation, etc., so as to label the filtered training conversation data with tendency labels.
[0109] In other embodiments, after obtaining the conversation data to be trained with tendency labels, the tendency training data that conforms to the FSA scenario can also be screened. Of course, it is understandable that in some embodiments, the tendency training data that conforms to the FSA scenario can be screened first, and then the tendency training data that conforms to the FSA scenario can be annotated with tendency labels.
[0110] In this embodiment, the correlation value between the conversation data to be trained with the tendency label and the preset product text is obtained, and the preset product text includes the product tendency conversation text; the conversation data to be trained with the tendency label whose correlation value is greater than the preset value is used as the tendency training data.
[0111] The preset product text can be a professional text constructed based on expert rules. The preset product texts corresponding to different products can be the same or different. The conversation data to be trained with tendency labels are aggregated with the preset product text, and the correlation value between each conversation data to be trained with tendency labels and the preset product text is calculated. The conversation data to be trained with tendency labels whose correlation value is greater than the preset value is used as tendency training data.
[0112] The preset value can be obtained through empirical parameters and can also be set according to needs. Through the correlation value, the correlation between each conversation data to be trained with a tendency label and the product can be obtained, so as to extract the conversation data to be trained related to the product tendency, reduce the volume of the conversation data to be trained, and improve the scene matching degree of the conversation data to be trained, so that the calculation of the pre-trained product tendency prediction model obtained is more accurate.
[0113] In this embodiment, after obtaining the tendency training data, the tendency training data all have tendency labels, and the initial product tendency prediction model can be trained, such as converting the text into word vectors based on word2vec technology, and then clustering it through the DBscan clustering method, and screening and purifying the input data again, and finally inputting this part of the word vectors into the BERT large model to complete fine-tuning. After training, the pre-trained product tendency prediction model corresponding to the product is obtained.
[0114] Step S430: labeling the non-dialogue data to be trained with recommended labels, and preprocessing the non-dialogue data to be trained with the labels to obtain the preprocessed non-dialogue data to be trained with recommended labels.
[0115] In this embodiment, the recommended labels for the non-conversational data to be trained can be determined through manual experience or the results of the corresponding users' actual reception of recommendations for the product. In some embodiments, the labeling of tendency labels can be referred to, and a part of the non-conversational data to be trained is first labeled, and then clustered. The non-conversational data to be trained of the same category share a recommended label.
[0116] The process of preprocessing the labeled non-conversational data to be trained can refer to the process of preprocessing the user's non-conversational data in step S230, scaling the numerical data in the non-conversational data to be trained to a preset scale, and mapping the non-numerical data in the non-conversational data to be trained to different numerical values, so as to obtain a trained product recommendation model.
[0117] Step S450: training the initial product recommendation model based on the pre-processed non-dialogue data to be trained with recommendation labels and the tendency feature data to be trained to obtain a trained product recommendation model.
[0118] In this embodiment, the initial product recommendation model is trained based on the non-conversation data to be trained with recommendation labels after preprocessing and the tendency feature data to be trained. For a user, the user includes the non-conversation data to be trained with recommendation labels after preprocessing and the tendency feature data to be trained. The non-conversation data to be trained and the tendency feature data to be trained are input into the initial product recommendation model to obtain predicted labels. By comparing the predicted labels with the corresponding recommended labels, the parameters in the initial product recommendation model are adjusted to obtain the trained product recommendation model.
[0119] In this embodiment, the non-conversational data to be trained with recommendation labels and the tendency feature data to be trained obtained after preprocessing can be divided into a training set, a test set and a validation set, providing a training data basis for the initial product recommendation model. The initial product recommendation model is trained through the training set, the performance of the trained product recommendation model is tested with the test set, and the network parameters are selected with the validation set.
[0120] The trained product recommendation model opens a production operation interface, and the business end inputs production environment user data, including Figure 2 The trained product recommendation model uses conversational data and non-conversational data, and sets the proportion of clues at each level based on product characteristics. The output of the trained product recommendation model is the recommendation result of the user's received product recommendation, that is, the probability score of inclined purchase. By sorting the recommendation result values and dividing the proportions, the sequence of recommendation results for users of each level is output.
[0121] The user's recommendation results set the production data return time period. Each time it is triggered, the conversion effect corresponding to the user's recommendation results within this time period will be tracked. The user's recommendation label is determined based on whether the user purchases, so that the user's data and recommendation label-related data are returned to the preset training data set, and a sliding time window is used to maintain the consistency of the data set magnitude. The preset training data set is used to iteratively optimize the training to fine-tune the parameters in the trained product recommendation model, so that the trained product recommendation model can adapt to product market changes in real time, effectively adjust the output of the trained product recommendation model, and improve the accuracy of the output.
[0122] In one embodiment, different trained product recommendation models are obtained for different product training. By setting up scheduled model training and batch scheduled task mechanisms, a regular output stream of recommendation results for users can be achieved to meet the high timeliness requirements of product recommendations. It is understandable that the actual feedback data of the output results of the trained product recommendation model and the pre-trained product tendency prediction model will also be included in the new round of data training set of the corresponding model to achieve continuous model parameter improvement and adapt to the temporal changes in product and user needs. In addition, the size of the product recommendation model network weight reflects the strength of the correlation with the corresponding user's purchasing tendency, which can be adjusted and optimized from the aspects of client content presentation, user operation behavior sequence, etc., to achieve explainable product recommendation scenario optimization.
[0123] Figure 5 A schematic diagram of the structure of a product recommendation system is shown. The product recommendation system is set in Figure 1 In the server, such as Figure 5 As shown, the product recommendation system may include a data processing module, a text emotion interaction module and a product recommendation module.
[0124] The data processing module is responsible for data processing and aggregation. It uses Kafka and Flink to ensure efficient data stream transmission and real-time processing and calculation. It collects, cleans and stores user-related data from various channels, including conversation data and non-conversation data, conversation data to be trained and non-conversation data to be trained, in order to build a comprehensive user portrait.
[0125] User-related data has the following characteristics: there is a large amount of redundant data in the sections corresponding to different products. For the same user, there is corresponding data in the section corresponding to product A and in the section corresponding to product B. The field names, code table values, data formats, etc. of the data in different sections are different. The data types are rich, including both structured data and data in non-fixed forms such as text and pictures. The data volume is huge, and the traffic varies greatly over time, so the real-time performance of the data on the analysis platform is relatively poor.
[0126] Based on this, the data processing module in this embodiment provides a standard data access interface by adopting an API (interface), which can effectively eliminate differences between systems and facilitate unified storage and management of data. Figure 5Different types of data provide different interfaces. For example, there is one interface for user attribute data and another interface for user conversation data. Different types of data are processed independently, which can improve parallel processing speed, system reliability and scalability. When the system traffic peaks, there may be an imbalance between data access speed and consumption speed. Kafka can be used to decouple the system and reduce traffic peaks. Depending on the data type, the downstream uses multiple consumers such as flink to import data into different storage systems.
[0127] In this embodiment, in addition to setting different interface processing for different types of data, different databases can also be set up to store different types of data, such as Figure 5 db, hbase, hdfs, etc., there is no specific restriction here.
[0128] The text emotion interaction module is provided with a product tendency prediction model corresponding to the product. Different products correspond to different product tendency prediction models, which are used to receive the user's conversation data in the data processing module to obtain the user's tendency feature data for the product, such as Figure 5 The product tendency prediction model of product A and product B is shown in FIG.
[0129] In this embodiment, the text emotion interaction module mines the user's preference label for the product from the conversation text, thereby enriching the user business portrait output by the big data processing module, so that the product recommendation model can better capture user needs.
[0130] The processing process in the text emotion interaction module can refer to step S210 and will not be repeated here.
[0131] The product recommendation module is equipped with pre-trained product recommendation models corresponding to different products. It receives the tendency feature data output by the product tendency prediction model of the corresponding product in the text emotion interaction module, and receives the non-dialogue data of the user in the data processing module, predicts the recommendation results, and outputs the recommendation results.
[0132] Understandably, Figure 5 The models in the product recommendation module and the text sentiment interaction module can be based on Figure 4 The method shown is used to train directly in the product recommendation system. After the training is completed, the user data within a period of time can be used according to Figure 2 The recommendation result prediction is performed in the manner shown.
[0133] In one embodiment, for financial scenarios, taking financial products, fund products and insurance products as examples, Figure 5In the product recommendation system, the text sentiment interaction module corresponds to the product tendency prediction model of financial products, the product tendency prediction model of fund products and the product tendency prediction model of insurance products, and the product recommendation module corresponds to the product recommendation model of financial products, the product recommendation model of fund products and the product recommendation model of insurance products.
[0134] pass Figure 5 The product recommendation system in the text emotion interaction module predicts the recommendation results of users in three categories of products. The data processing module stores the user's non-dialogue data and dialogue data. The dialogue data enters the three product tendency prediction models in the text emotion interaction module respectively, and outputs the supplementary user portraits of different users for the three products, that is, the tendency feature data. The non-dialogue data and the tendency feature data enter the three product recommendation models in the product recommendation module respectively to output the recommendation results of different users for different products. Subsequently, products can be recommended to users based on the recommendation results to achieve targeted user marketing interaction, provide personalized financial product services, and enhance customer satisfaction and financial product purchase conversion rate.
[0135] Figure 6 FIG. 6 is a structural diagram of a product recommendation device shown in an exemplary embodiment. The product recommendation device 600 includes:
[0136] The tendency data acquisition module 610 is used to input the user's conversation data into a pre-trained product tendency prediction model to obtain the user's tendency feature data for the product;
[0137] A first preprocessing module 630, used to preprocess the user's non-conversation data to obtain preprocessed non-conversation data;
[0138] The recommendation result acquisition module 650 is used to input the pre-processed non-dialogue data and the tendency feature data into the pre-trained product recommendation model to obtain the user's recommendation results for the product.
[0139] In one achievable manner, the first preprocessing module 630 training module 830 includes:
[0140] A mapping unit, used for mapping non-numeric data into different numerical values to obtain mapped numerical data;
[0141] A scaling unit, used to scale the value of the numerical data to a preset scale to obtain scaled numerical data;
[0142] The first preprocessing unit is used to use the scaled numerical data and the mapped numerical data as preprocessed non-dialog data.
[0143] Figure 7: is a structural diagram of a training device for a product recommendation model shown in an exemplary embodiment. The training device 700 for a product recommendation model includes:
[0144] The tendency training data acquisition module 710 is used to input the conversation data to be trained into the pre-trained product tendency prediction model to obtain the tendency feature data to be trained;
[0145] The second preprocessing module 730 is used to label the non-dialogue data to be trained with recommended labels, and preprocess the non-dialogue data to be trained with the labels to obtain the non-dialogue data to be trained with the recommended labels after preprocessing;
[0146] The model training module 750 is used to process the initial product recommendation model based on the non-dialogue data to be trained with recommendation tags after preprocessing and the tendency feature data to be trained to obtain a trained product recommendation model.
[0147] In one possible implementation, the product recommendation model training device 700 further includes:
[0148] A tendency labeling module is used to label the tendency labels for the dialogue data to be trained;
[0149] A data screening module is used to screen the product-related tendency training data from the conversation data to be trained with tendency labels;
[0150] The product tendency model training module is used to train the initial product tendency prediction model based on the tendency training data to obtain a pre-trained product tendency prediction model.
[0151] In one possible implementation, the tendency label marking module includes:
[0152] A first tendency labeling unit, used for labeling a tendency label on first to-be-trained dialogue data in the to-be-trained dialogue data;
[0153] The second tendency labeling unit is used to perform clustering processing on the second to-be-trained dialogue data and the first to-be-trained dialogue data in the to-be-trained dialogue data, and label the tendency labels of the first to-be-trained dialogue data of the same category with the tendency labels of the first to-be-trained dialogue data of the same category.
[0154] In one possible implementation, the data screening module includes:
[0155] A correlation acquisition unit, used to acquire a correlation value between the to-be-trained dialogue data with a tendency label and a preset product text, wherein the preset product text includes a product tendency dialogue text;
[0156] The data screening unit is used to use the conversation data to be trained with tendency labels and whose correlation value is greater than a preset value as tendency training data.
[0157] The product recommendation model training device and product recommendation device provided in this embodiment can be used to execute the product recommendation model training method and product recommendation method mentioned above. Their implementation principles and technical effects are similar and will not be described in detail in this embodiment.
[0158] Figure 8 is a block diagram of an electronic device according to an exemplary embodiment. Figure 8 The electronic device 800 may include: a processor 81 and a memory 82, wherein the processor 81 and the memory 82 may communicate; exemplarily, the processor 81 and the memory 82 communicate via a communication bus 83, the memory 82 is used to store instructions, and the processor 81 is used to call the instructions in the memory to execute the training method of the product recommendation model or the product recommendation method shown in any of the above method embodiments.
[0159] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the present application may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0160] The present application provides a computer-readable storage medium having computer-executable instructions stored thereon; when the computer-executable instructions are executed by a processor, they are used to implement a product recommendation model training method or a product recommendation method as in any of the above-mentioned embodiments.
[0161] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the training method of the above-mentioned product recommendation model or the product recommendation method.
[0162] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0163] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A product recommendation method, characterized in that: include: Inputting the user's conversation data into a pre-trained product tendency prediction model to obtain the user's tendency characteristic data for the product; Preprocessing the non-conversation data of the user to obtain preprocessed non-conversation data; The preprocessed non-dialogue data and the tendency feature data are input into a pre-trained product recommendation model to obtain the user's recommendation result for the product.
2. The method according to claim 1, characterized in that The non-conversation data includes numerical data and non-numerical data; the pre-processing of the non-conversation data of the user to obtain the pre-processed non-conversation data includes: Mapping the non-numeric data to different numerical values respectively to obtain mapped numerical data; Scaling the value of the numerical data to a preset scale to obtain scaled numerical data; The scaled numerical data and the mapped numerical data are used as the pre-processed non-dialog data.
3. A training method for a product recommendation model, characterized in that: include: Input the conversation data to be trained into the pre-trained product tendency prediction model to obtain the tendency feature data to be trained; Label the non-conversational data to be trained with recommended labels, and preprocess the non-conversational data to be trained with labels to obtain the non-conversational data to be trained with recommended labels after preprocessing; The initial product recommendation model is trained based on the non-dialogue data to be trained with recommendation labels after the preprocessing and the tendency feature data to be trained to obtain a trained product recommendation model.
4. The method according to claim 3, characterized in that Before inputting the conversation data to be trained into the pre-trained product tendency model to obtain the training tendency feature data, the method further includes: Labeling the conversation data to be trained with a tendency label; Filter the product-related tendency training data from the conversation data to be trained with tendency labels; The initial product tendency prediction model is trained based on the tendency training data to obtain the pre-trained product tendency prediction model.
5. The method according to claim 4, characterized in that The step of labeling the conversation data to be trained with a tendency label includes: labeling a first dialogue data to be trained in the dialogue data to be trained with a tendency label; Clustering is performed on the second conversation data to be trained and the first conversation data to be trained in the conversation data to be trained, and the tendency labels of the first conversation data to be trained of the same category are marked for the second conversation data to be trained of the same category.
6. The method according to claim 4, characterized in that The step of screening the product-related tendency training data from the to-be-trained conversation data with tendency labels includes: Obtaining a correlation value between the to-be-trained dialogue data with the tendency label and a preset product text, wherein the preset product text includes a product tendency dialogue text; The conversation data to be trained with tendency labels and whose correlation values are greater than a preset value are used as tendency training data.
7. A product recommendation device, characterized in that: include: A tendency data acquisition module, used to input the user's conversation data into a pre-trained product tendency prediction model to obtain the user's tendency feature data for the product; A first preprocessing module, used for preprocessing the non-conversation data of the user to obtain preprocessed non-conversation data; The recommendation result acquisition module is used to input the preprocessed non-dialogue data and the tendency feature data into a pre-trained product recommendation model to obtain the user's recommendation result for the product.
8. A training device for a product recommendation model, characterized in that: include: A tendency training data acquisition module is used to input the conversation data to be trained into a pre-trained product tendency prediction model to obtain tendency feature data to be trained; A second preprocessing module is used to label the non-dialogue data to be trained with recommended labels, and preprocess the non-dialogue data to be trained with the labels to obtain the non-dialogue data to be trained with recommended labels after preprocessing; The model training module is used to process the initial product recommendation model based on the non-dialogue data to be trained with recommendation tags after preprocessing and the tendency feature data to be trained to obtain a trained product recommendation model.
9. An electronic device, characterized in that: The electronic device comprises: a processor and a memory; the memory is used to store instructions; the processor is used to execute the instructions in the memory, so that the electronic device executes the method as claimed in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
