A recommendation method, a training method for a recommendation model, and related devices
Through the multi-objective recommendation model, the feature information of the user and the object to be recommended is predicted, and the recommendation results are corrected using the deviation prediction value, which solves the prediction deviation problem caused by data deviation in the existing recommendation model, and improves the accuracy of recommendation and user experience .
Patent Information
- Application Number
- CN202210335224.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2042-03-31
AI Technical Summary
The existing recommendation model reduces the effectiveness of recommendations and user experience due to prediction bias caused by data bias.
The multi-objective recommendation model is used to predict the user feature information and the feature information of the object to be recommended. The comprehensive click prediction value is corrected by correcting the deviation prediction value to obtain the target click prediction value, thereby achieving deviation correction of the recommendation result.
Improve the accuracy and user experience of recommendations, avoid the defect of using pre-set fixed values for deviation correction, and enhance the effect of deviation correction.
Smart Images

Figure CN114661999B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a recommendation method, a training method for a recommendation model, a terminal device, and a computer-readable storage medium. Background Art
[0002] With the development of information technology, recommendation systems have emerged to recommend more suitable products or content to users based on recommendation models. However, existing recommendation models may have recommendation biases due to factors such as the popularity of the recommended object, which reduces the effectiveness of the recommendation.
[0003] In the related art, the method of eliminating popularity bias can use anti-propensity scores. That is, anti-propensity scores are added in the training stage to solve the popularity bias problem, construct unbiased data to obtain an unbiased recommendation model. However, anti-propensity scores have relatively strong assumptions that are inconsistent with most actual situations, resulting in poor recommendation effects in specific applications, which actually reduces the accuracy of recommendations.
[0004] Therefore, how to eliminate the prediction bias of the recommendation model caused by data bias and improve the user experience is a key issue that technical personnel in this field are concerned about. Summary of the invention
[0005] The core of this application is to provide a recommendation method, a training method for a recommendation model, a terminal device, and a computer-readable storage medium to eliminate the prediction bias of the recommendation model due to data bias and improve the user experience.
[0006] To solve the above technical problems, this application provides a recommended method, including:
[0007] Obtaining user feature information and feature information of the object to be recommended;
[0008] The trained multi-objective recommendation model is used to predict the user feature information and the feature information of the object to be recommended, and a comprehensive click prediction value and a deviation prediction value are obtained; wherein the deviation prediction value is used to characterize the degree of prediction deviation;
[0009] The comprehensive click prediction value is corrected based on the deviation prediction value to obtain a target click prediction value;
[0010] Recommending the corresponding object to be recommended to the user based on the target click prediction value;
[0011] Among them, the multi-objective recommendation model is a model trained according to sample data and a total loss function; the total loss function is the sum of a loss function based on click-through rate feature information in user feature information and a loss function based on object feature information.
[0012] Optionally, the training process of the multi-objective recommendation model includes:
[0013] Acquire the sample data and an initial multi-objective recommendation model; wherein the sample data includes user feature information and object feature information; the initial multi-objective recommendation model includes a first sub-model based on the user feature information and the object feature information and a second sub-model based on the object feature information;
[0014] generating a feature vector based on the sample data;
[0015] Performing training based on the feature vector and the initial multi-objective recommendation model, and calculating a total loss function of the multi-objective recommendation model after training;
[0016] When the total loss function of the multi-objective recommendation model after training is minimized, stop training the multi-objective recommendation model; wherein the product of the output value of the first sub-model and the output value of the second sub-model is the comprehensive click prediction value output by the multi-objective recommendation model, and the output value of the second sub-model is the deviation prediction value output by the multi-objective recommendation model.
[0017] Optionally, the second sub-model includes a preset number of feature extraction layers and an output layer; the feature extraction layer is connected to the output layer; the feature extraction layer is used to extract feature information of the object and input the feature extraction result to the output layer.
[0018] Optionally, the second sub-model also includes a partial feature extraction layer of preset dimensions; the partial feature extraction layer is connected to the output layer of the second sub-model; the partial feature extraction layer is used to extract language feature information and / or genre feature information of the object feature information, and input the feature extraction results into the output layer.
[0019] Optionally, generating a feature vector based on the sample data;
[0020] Encoding the sample data to obtain high-dimensional sparse features;
[0021] The high-dimensional sparse feature map is used to obtain the low-dimensional feature vector.
[0022] Optionally, when the object to be recommended is music, recommending the corresponding object to be recommended to the user based on the target click prediction value includes:
[0023] Sorting all the objects to be recommended based on the target click prediction value to obtain a sorting result;
[0024] Part of the sorting results whose target click prediction values are greater than a preset value are sent to the user.
[0025] The present application also provides a training method for a recommendation model, including:
[0026] Acquire the sample data and an initial multi-objective recommendation model; wherein the sample data includes user feature information and object feature information; the initial multi-objective recommendation model includes a first sub-model based on the user feature information and the object feature information and a second sub-model based on the object feature information;
[0027] generating a feature vector based on the sample data;
[0028] Training is performed based on the feature vector and the initial multi-objective recommendation model, and a total loss function of the multi-objective recommendation model after training is calculated; wherein the total loss function is the sum of a loss function based on click-through rate feature information in user feature information and a loss function based on object feature information;
[0029] When the total loss function of the multi-objective recommendation model after training is minimized, stop training the multi-objective recommendation model; wherein the product of the output value of the first sub-model and the output value of the second sub-model is the comprehensive click prediction value output by the multi-objective recommendation model, and the output value of the second sub-model is the deviation prediction value output by the multi-objective recommendation model.
[0030] Optionally, the second sub-model includes a preset number of feature extraction layers and an output layer; the feature extraction layer is connected to the output layer; the feature extraction layer is used to extract feature information of the object and input the feature extraction result to the output layer.
[0031] Optionally, the second sub-model also includes a partial feature extraction layer of preset dimensions; the partial feature extraction layer is connected to the output layer of the second sub-model; the partial feature extraction layer is used to extract language feature information and / or genre feature information of the object feature information, and input the feature extraction results into the output layer.
[0032] The present application also provides a terminal device, including:
[0033] Memory for storing computer programs;
[0034] A processor is used to implement the steps of the recommendation method and / or the steps of the training method described above when executing the computer program.
[0035] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the recommendation method and / or the steps of the training method described above are implemented.
[0036] A recommendation method provided by the present application includes: obtaining user feature information and feature information of an object to be recommended; using a trained multi-objective recommendation model to predict the user feature information and the feature information of the object to be recommended to obtain a comprehensive click prediction value and a deviation prediction value; wherein the deviation prediction value is used to characterize the degree of prediction deviation; based on the deviation prediction value, the comprehensive click prediction value is corrected to obtain a target click prediction value; based on the target click prediction value, the corresponding object to be recommended is recommended to the user; wherein the multi-objective recommendation model is a model trained according to sample data and a total loss function; the total loss function is the sum of a loss function based on click-through rate feature information in the user feature information and a loss function based on object feature information.
[0037] The user feature information and the feature information of the object to be recommended are predicted through a multi-objective recommendation model. Since the multi-objective recommendation model is trained based on the loss function of the click rate feature information of the sample data and the sum of the loss function based on the object feature information, a comprehensive click prediction value and a deviation prediction value are obtained. The deviation prediction value represents the degree of deviation caused by the object feature information. Finally, the comprehensive click prediction value is corrected based on the deviation prediction value to obtain the final target click prediction value. This realizes the correction of the deviation of the recommendation result based on the predicted value instead of using a pre-set fixed value, thereby improving the effect of deviation correction and the accuracy of recommendation.
[0038] The present application also provides a training method for a recommendation model, a terminal device, and a computer-readable storage medium, which have the above beneficial effects and are not elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0040] Figure 1 A flowchart of a recommended method provided in an embodiment of the present application;
[0041] Figure 2 A flowchart of a training method for a recommendation model provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of a model structure of a recommendation model provided in an embodiment of the present application;
[0043] Figure 4 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The core of this application is to provide a recommendation method, a training method for a recommendation model, a terminal device, and a computer-readable storage medium to eliminate the prediction bias of the recommendation model due to data bias and improve the user experience.
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0046] In the related art, the method of eliminating popularity bias can use anti-propensity scores. That is, anti-propensity scores are added in the training stage to solve the popularity bias problem, construct unbiased data to obtain an unbiased recommendation model. However, anti-propensity scores have relatively strong assumptions that are inconsistent with most actual situations, resulting in poor recommendation effects in specific applications, which actually reduces the accuracy of recommendations.
[0047] Therefore, the present application provides a recommendation method, which predicts user feature information and feature information of the object to be recommended through a multi-objective recommendation model. Since the multi-objective recommendation model is trained based on the loss function of the click-through rate feature information of the sample data and the sum of the loss function based on the object feature information, a comprehensive click prediction value and a deviation prediction value are obtained, and the deviation prediction value represents the degree of deviation caused by the object feature information. Finally, the comprehensive click prediction value is corrected based on the deviation prediction value to obtain the final target click prediction value, thereby realizing the correction of the deviation of the recommendation result based on the predicted numerical value, rather than using a pre-set fixed value, thereby improving the effect of deviation correction and the accuracy of recommendation.
[0048] A recommended method provided by the present application is described below through an example.
[0049] Please refer to Figure 1 , Figure 1 A flowchart of a recommended method provided in an embodiment of the present application.
[0050] In this embodiment, the method may include:
[0051] S101, obtaining user feature information and feature information of the object to be recommended;
[0052] It can be seen that this step aims to obtain the user feature information and the feature information of the object to be recommended.
[0053] The user characteristic information is characteristic information obtained by processing characteristics related to the user, including but not limited to characteristics such as the user's age, gender, favorite songs, and preferred genres.
[0054] The feature information of the object to be recommended is feature information obtained by processing features related to the object to be recommended. The object to be recommended may be a product, content or service. Different objects to be recommended may be selected based on different application environment contents. When the object to be recommended or the object is music, the features related to the object to be recommended (features related to the object) include but are not limited to features such as music audio, genre, language and playback status.
[0055] The acquired features need to be processed and then processed by the multi-objective model. The processing methods include but are not limited to encoding, embedding and other operations, so as to map high-dimensional sparse features into low-dimensional dense feature vectors.
[0056] S102, using the trained multi-objective recommendation model to predict the user feature information and the feature information of the recommended object to obtain a comprehensive click prediction value and a deviation prediction value; wherein the deviation prediction value is used to characterize the degree of prediction deviation;
[0057] Based on S101, this step aims to use the trained multi-objective recommendation model to predict the user feature information and the feature information of the recommended object to obtain the comprehensive click prediction value and the deviation prediction value. Among them, the multi-objective recommendation model is a model that optimizes the prediction of multiple objectives, that is, multiple optimization results can be obtained in one prediction process.
[0058] Furthermore, the deviation prediction value obtained in this embodiment is used to characterize the degree of deviation in this prediction process. That is, the size of the prediction deviation can be determined, and then the prediction result can be corrected based on the deviation to obtain a more accurate prediction result. Among them, the comprehensive click prediction value is the prediction result with deviation.
[0059] This is mainly because in the prior art, if an inverse tendency score is used, the inverse tendency score has a relatively strong assumption, which is inconsistent with most actual situations, resulting in poor recommendation effects in specific applications, and actually reducing the accuracy of recommendations. Another way to eliminate bias requires the use of a random strategy and the collection of this part of user feedback information. In turn, the recommendation experience of some users needs to be sacrificed because these users cannot enjoy a personalized experience, which ultimately affects the retention of these users. That is, in the prior art, one way is to add a hypothetical score to the training process to reduce the degree of bias, and the other way is to obtain unbiased training data through improvements in data acquisition on the front end. However, no matter which method is used, it will cause other more serious defects and reduce the accuracy of recommendations.
[0060] Therefore, the technical solution of this application directly makes predictions based on the original biased data (user feature information and feature information of the recommended object), avoiding changes to the original recommended data and affecting the user. In addition, due to the use of a multi-objective recommendation model, the biased comprehensive click prediction value and the biased prediction value can be directly predicted, so that the comprehensive click prediction value can be corrected based on the biased prediction value. Instead of correcting the deviation based on the artificially assumed score, the actual user's true preference prediction value is determined, which improves the accuracy of the recommendation.
[0061] That is to say, in this embodiment, the comprehensive click prediction value is synthesized from the real preference prediction value and the deviation prediction value. In addition, due to the limitation of training data, only biased data sets are used. Therefore, the biased data set can be used to directly train the multi-objective model to predict the comprehensive click prediction value and the deviation prediction value, so that on the basis of the comprehensive click prediction value, the deviation prediction value can be removed to obtain the user's real preference prediction value. It can be known that the comprehensive click prediction value is the prediction value obtained by the general recommendation model after training and predicting based on the biased data set, and is a biased prediction value.
[0062] The prediction deviation degree represented by the deviation prediction value may be the prediction deviation degree caused by object characteristics, the prediction deviation degree caused by environmental factors, or the prediction deviation degree caused by copyright factors.
[0063] When the deviation prediction value is used to characterize the degree of prediction deviation based on object features, the multi-objective recommendation model can predict the corresponding deviation prediction value based on the feature information of the object to be recommended.
[0064] Furthermore, the multi-objective recommendation model is a model obtained by training based on sample data and a total loss function; the total loss function is the sum of a loss function based on click rate feature information in user feature information and a loss function based on object feature information. That is, the comprehensive click prediction value and the deviation prediction value based on object features are used as training targets.
[0065] The click rate feature information in the user feature information indicates the probability of a user clicking on an object. However, in actual applications, the user may have more click rates due to factors such as the popularity of the object, which forms a Matthew effect.
[0066] As can be seen, taking music recommendation as an example, the user characteristics and music item characteristics are used on a biased data set to predict the user's click probability on the music, and it is assumed that the click probability is equivalent to the user's real preference for the music. However, the click probability includes the user's real preference for the music and the deviation caused by popular music (such as more exposure, more attractive to click). Therefore, the traditional ranking model will mix the two together, resulting in biased and inaccurate prediction results, and ultimately causing the recommendation system to form a Matthew effect.
[0067] Furthermore, the multi-objective recommendation model in this embodiment may include a first sub-model based on user feature information and object feature information and a second sub-model based on object feature information. Therefore, the user feature information and the feature information of the object to be recommended are input into the first sub-model, and the feature information of the object to be recommended is input into the second sub-model.
[0068] S103, correcting the comprehensive click prediction value based on the deviation prediction value to obtain a target click prediction value;
[0069] Based on S102, this step aims to correct the comprehensive click prediction value based on the deviation prediction value to obtain the target click prediction value. That is, the comprehensive click prediction value is corrected based on the determination of the prediction deviation degree to obtain the target click prediction value. That is, the actual true preference prediction value of the user is obtained.
[0070] For example, in this embodiment, the comprehensive click prediction value of the user for the music is obtained through the multi-objective model. and click probability due to item popularity , then the final user's music preference score calculation formula is as follows:
[0071]
[0072] in, is a super parameter, is the sigmoid function (S-type function), is the preference score, is the user's actual preferred click probability (target click prediction value).
[0073] S104, recommending the corresponding to-be-recommended object to the user based on the target click prediction value;
[0074] Based on S103, this step aims to recommend the corresponding recommended object to the user based on the target click prediction value. It can be seen that the target click prediction value used in this step has corrected the corresponding deviation, which is more in line with the user's real preference and can recommend objects more accurately.
[0075] Furthermore, in order to improve the accuracy of recommendations based on target click prediction values and the precision of recommendations, this step may include:
[0076] S1031, sorting all the objects to be recommended based on the target click prediction value to obtain a sorting result;
[0077] S1032, sending to the user some of the sorting results whose target click prediction values are greater than the preset values.
[0078] It can be seen that this optional solution mainly explains how to make recommendations based on target click prediction values. In this optional solution, all objects to be recommended are sorted based on the target click prediction values to obtain sorting results, and the sorting results in which the target click prediction values are greater than the preset values are sent to the user. Among them, the preset value can be set based on expert experience, or the target click prediction values of the top 60 percent of objects can be used, or the user's click quantity preference can be used to set it. It can be seen that the setting method of the preset value in this optional solution is not unique, and no specific limitation is made here.
[0079] In summary, this embodiment predicts user feature information and feature information of the object to be recommended through a multi-objective recommendation model. Since the multi-objective recommendation model is trained based on the loss function of the click-through rate feature information of the sample data and the sum of the loss function based on the object feature information, a comprehensive click prediction value and a deviation prediction value are obtained. The deviation prediction value represents the degree of deviation caused by the object feature information. Finally, the comprehensive click prediction value is corrected based on the deviation prediction value to obtain the final target click prediction value. This realizes the correction of the deviation of the recommendation result based on the predicted numerical value instead of using a pre-set fixed value, thereby improving the effect of deviation correction and the accuracy of recommendation.
[0080] Furthermore, in order to train a model that can predict the comprehensive click prediction value and the deviation prediction value based on the initial multi-objective model, the training process of the recommendation model of the recommendation method in the technical solution of the present application is further explained below through a specific embodiment.
[0081] Please refer to Figure 2 , Figure 2 A flowchart of a training method for a recommendation model provided in an embodiment of the present application.
[0082] In this embodiment, the training method may include:
[0083] S201, obtaining sample data and an initial multi-objective recommendation model; wherein the sample data includes user feature information and object feature information; the initial multi-objective recommendation model includes a first sub-model based on the user feature information and the object feature information and a second sub-model based on the object feature information;
[0084] This step aims to obtain sample data and an initial multi-objective recommendation model, wherein the sample data includes user feature information and object feature information.
[0085] The initial multi-objective recommendation model includes a first sub-model based on user feature information and object feature information and a second sub-model based on object feature information. That is, the first sub-model inputs user feature information and object feature information, and the second sub-model inputs object features, so as to predict the degree of deviation after training.
[0086] Among them, the first sub-model can adopt DeepFM (Deep Factorization Machines), MMoe (Modeling Task Relationships in Multi-task Learning with Multi-gate Mixture-of-Experts, a multi-task learning model), DIN (Deep Interest Network), etc., and the second sub-model can adopt DNN (Deep Neural Networks), or other models, such as the Transformer (attention structure) structure for processing text, and the CNN (Convolutional Neural Networks) structure for processing images and audio.
[0087] The sample data is the collected training data. The click-through rate feature information in the user feature information of the sample data records the user's click on the music, rather than the user's rating of the music, so it cannot effectively represent the user's true preference and is biased data.
[0088] Furthermore, taking music as an example, in order to more accurately extract the object features of music, the second sub-model includes a preset number of feature extraction layers and an output layer; the feature extraction layer is connected to the output layer; the feature extraction layer is used to extract the feature information of the object and input the feature extraction result to the output layer. In this way, the deviation caused by the object features can be better extracted during the prediction process, and the prediction deviation can be effectively eliminated, so as to better explore the real preferences of users.
[0089] Furthermore, based on the structure of the previous second sub-model, some features in the music features are further highlighted to improve the accuracy of predicting the deviation prediction value. The second sub-model also includes a partial feature extraction layer of a preset dimension; the partial feature extraction layer is connected to the output layer of the second sub-model; the partial feature extraction layer is used to extract the language feature information and / or genre feature information of the object feature information, and input the feature extraction result to the output layer.
[0090] That is, a new prediction tower is added to the second sub-model so that some features can be extracted again through the prediction tower to highlight the influence of the language and / or genre.
[0091] In addition, more prediction towers can be added, such as predicting the impact of "clickbait" on click rate based on cover and title features, eliminating these impacts to better explore users' true preferences.
[0092] S202, generating a feature vector based on the sample data;
[0093] Based on S201, this step aims to generate a feature vector based on the sample data, that is, extracting the corresponding feature vector from the sample data, and any feature vector extraction method provided by the prior art can be used, which is not specifically limited here.
[0094] Furthermore, this step may include:
[0095] S2021, encoding the sample data to obtain high-dimensional sparse features;
[0096] S2022, map the high-dimensional sparse features to obtain a low-dimensional feature vector.
[0097] It can be seen that this step is intended to illustrate how to generate the corresponding feature vector. In this optional solution, the sample data is encoded to obtain high-dimensional sparse features, and the high-dimensional sparse features are mapped to obtain low-dimensional feature vectors, so as to eliminate irrelevant features in the features, reduce the redundancy of the features, and improve the effectiveness of the features.
[0098] S203, training based on the feature vector and the initial multi-objective recommendation model, and calculating the total loss function of the multi-objective recommendation model after training; wherein the total loss function is the sum of the loss function based on the click rate feature information in the user feature information and the loss function based on the object feature information;
[0099] Based on S202, this step aims to perform training based on the feature vector and the initial multi-objective recommendation model, and calculate the total loss function of the multi-objective recommendation model after training;
[0100] The total loss function is the sum of the loss function based on the click rate feature information in the user feature information and the loss function based on the object feature information. A form of the loss function can refer to the content of the subsequent examples, which is not specifically limited here.
[0101] S204, when the total loss function of the multi-objective recommendation model after training is minimized, stop training the multi-objective recommendation model; wherein the product of the output value of the first sub-model and the output value of the second sub-model is the comprehensive click prediction value output by the multi-objective recommendation model, and the output value of the second sub-model is the deviation prediction value output by the multi-objective recommendation model.
[0102] On the basis of S203, this step aims to stop training the multi-objective recommendation model when the total loss function of the multi-objective recommendation model after training is minimized;
[0103] Among them, the product of the output value of the first sub-model and the output value of the second sub-model is the comprehensive click prediction value output by the multi-objective recommendation model, and the output value of the second sub-model is the deviation prediction value output by the multi-objective recommendation model.
[0104] Based on the technical solutions of S201 to S204 above, the training process of the recommendation model is illustrated by taking music recommendation as an example.
[0105] Please refer to Figure 3 , Figure 3 A schematic diagram of the model structure of a recommendation model provided in an embodiment of the present application.
[0106] Based on the model structure, the training process can include:
[0107] S301, the model input includes user features and music item features, which need to be subjected to the commonly used encoding, embedding and other operations in the industry, and high-dimensional sparse feature mapping is used to obtain low-dimensional dense feature vectors, namely user feature information and music item feature information (i.e. object feature information).
[0108] Among them, user feature information includes user age, gender, favorite songs, preferred genres and other features, and music features include music audio, genre, language and playback status and other features.
[0109] S302, the user feature information and music item feature information processed in S301 are input into the traditional sorting model on the left, such as DeepFM, MMoe, DIN, etc., which are widely used in the industry. This part has strong scalability and can select appropriate models based on different feature types to predict the user's true preference for items. (1D output).
[0110] S303, input the music item feature information processed in S301 into the item popularity prediction tower on the right. The item popularity prediction tower is divided into two parts, and the operation process may include:
[0111] S3031, all the music item feature information (including language feature information and genre feature information) is input on the left side, and after passing through two layers of DNN, which are 256 and 128 dimensions respectively, a 128-dimensional vector is finally obtained; S3032, only the language and genre of the music are input on the right side, and after passing through a layer of 32-dimensional DNN, a 32-dimensional vector is finally obtained.
[0112] S304, concatenate the vector outputs of the two DNNs in S303 item popularity prediction tower to obtain a 160-dimensional vector, which is input into the final item popularity prediction neuron (one-dimensional output), indicating the click probability caused by item popularity. (deviation from predicted value).
[0113] S305, based on the output of S302 and the output of S304, calculate the comprehensive click probability of the end user for the music (comprehensive click prediction value), the formula is as follows:
[0114]
[0115] in, is the sigmoid function.
[0116] S306, the model training process is to make the model obtained in S305 predict the user's comprehensive click probability of the music and the click probability caused by the popularity of the item obtained in S304 Fitting the real results.
[0117] The actual data set collects users’ music click behaviors rather than their music ratings, so it is impossible to directly predict users’ true preferences for music. . You can record the comprehensive click probability The loss function is , click probability due to item popularity The loss function is The loss functions are as follows:
[0118] ;
[0119] .
[0120] Among them, D represents the actual biased data set, Representative User Is the music actually clicked? , is the comprehensive click probability predicted by the model, The click probability caused by the item popularity predicted by the model.
[0121] The total loss function of the final training The calculation method is as follows, where is a hyperparameter that affects the weight of popularity deviation training, which can be as follows:
[0122] .
[0123] It can be seen that through the above-mentioned trained model, this embodiment predicts the comprehensive click probability and the click probability caused by the popularity of the item in a biased data set, so that the user's real preference for music and the click caused by popularity can be decoupled, and the biased data can be directly used for training. After obtaining the biased recommendation model result, the popularity deviation factor is eliminated to obtain an unbiased result, thereby improving the effect of bias correction and the accuracy of recommendation.
[0124] This application also provides a terminal device, please refer to Figure 4 , Figure 4 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application, the terminal device may include:
[0125] Memory for storing computer programs;
[0126] The processor is used to implement the steps of any one of the recommendation methods and / or training methods described above when executing a computer program.
[0127] like Figure 4 , which is a schematic diagram of the structure of a terminal device, the terminal device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 communicate with each other through the communication bus 13.
[0128] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.
[0129] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in an embodiment of a recommendation method or a training method.
[0130] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:
[0131] Obtaining user feature information and feature information of the object to be recommended;
[0132] The trained multi-objective recommendation model is used to predict the user feature information and the feature information of the recommended object to obtain the comprehensive click prediction value and the deviation prediction value; wherein the deviation prediction value is used to characterize the degree of prediction deviation;
[0133] The comprehensive click prediction value is corrected based on the deviation prediction value to obtain the target click prediction value;
[0134] Recommend the corresponding recommended object to the user based on the target click prediction value;
[0135] Among them, the multi-objective recommendation model is a model trained according to sample data and a total loss function; the total loss function is the sum of a loss function based on click-through rate feature information in user feature information and a loss function based on object feature information.
[0136] and / or obtaining sample data and an initial multi-objective recommendation model; wherein the sample data includes user feature information and object feature information; the initial multi-objective recommendation model includes a first sub-model based on the user feature information and the object feature information and a second sub-model based on the object feature information;
[0137] Generate feature vectors based on sample data;
[0138] Training is performed based on the feature vector and the initial multi-objective recommendation model, and a total loss function of the multi-objective recommendation model after training is calculated; wherein the total loss function is the sum of a loss function based on click-through rate feature information in the user feature information and a loss function based on object feature information;
[0139] When the total loss function of the multi-objective recommendation model after training is minimized, stop training the multi-objective recommendation model; wherein the product of the output value of the first sub-model and the output value of the second sub-model is the comprehensive click prediction value output by the multi-objective recommendation model, and the output value of the second sub-model is the deviation prediction value output by the multi-objective recommendation model.
[0140] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
[0141] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
[0142] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.
[0143] Of course, it should be noted that Figure 4 The structure shown does not constitute a limitation on the terminal device in the embodiment of the present application. In actual applications, the terminal device may include Figure 4 More or fewer components than shown, or combinations of certain components.
[0144] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the recommended methods described above can be implemented.
[0145] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0146] For an introduction to the computer-readable storage medium provided in this application, please refer to the above method embodiment, and this application will not go into details here.
[0147] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0148] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0149] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0150] The above is a detailed introduction to a recommendation method, a training method for a recommendation model, a terminal device, and a computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A recommendation method, characterized in that: include: Obtaining user feature information and feature information of the object to be recommended; The trained multi-objective recommendation model is used to predict the user feature information and the feature information of the object to be recommended, and a comprehensive click prediction value and a deviation prediction value are obtained; wherein the deviation prediction value is used to characterize the degree of prediction deviation; The comprehensive click prediction value is corrected based on the deviation prediction value to obtain a target click prediction value; Recommending the corresponding object to be recommended to the user based on the target click prediction value; Wherein, the multi-objective recommendation model is a model obtained by training according to sample data and a total loss function; the total loss function is the sum of a loss function based on click-through rate feature information in user feature information and a loss function based on object feature information; The training process of the multi-objective recommendation model includes: Acquire the sample data and an initial multi-objective recommendation model; wherein the sample data includes user feature information and object feature information; the initial multi-objective recommendation model includes a first sub-model based on the user feature information and the object feature information and a second sub-model based on the object feature information; generating a feature vector based on the sample data; Performing training based on the feature vector and the initial multi-objective recommendation model, and calculating a total loss function of the multi-objective recommendation model after training; When the total loss function of the multi-objective recommendation model after training is minimized, stop training the multi-objective recommendation model; wherein the product of the output value of the first sub-model and the output value of the second sub-model is the comprehensive click prediction value output by the multi-objective recommendation model, and the output value of the second sub-model is the deviation prediction value output by the multi-objective recommendation model.
2. The recommendation method according to claim 1, characterized in that: The second sub-model includes a preset number of feature extraction layers and an output layer; the feature extraction layer is connected to the output layer; the feature extraction layer is used to extract feature information of the object and input the feature extraction result to the output layer.
3. The recommendation method according to claim 2, characterized in that: The second sub-model also includes a partial feature extraction layer of a preset dimension; the partial feature extraction layer is connected to the output layer of the second sub-model; the partial feature extraction layer is used to extract the language feature information and / or genre feature information of the object feature information, and input the feature extraction results to the output layer.
4. The recommendation method according to claim 1, characterized in that: generating a feature vector based on the sample data; Encoding the sample data to obtain high-dimensional sparse features; The high-dimensional sparse feature map is used to obtain the low-dimensional feature vector.
5. The recommendation method according to claim 1, characterized in that: When the object to be recommended is music, recommending the corresponding object to be recommended to the user based on the target click prediction value includes: Sorting all the objects to be recommended based on the target click prediction value to obtain a sorting result; Part of the sorting results whose target click prediction values are greater than a preset value are sent to the user.
6. A training method for a recommendation model, characterized in that: include: Acquire sample data and an initial multi-objective recommendation model; wherein the sample data includes user feature information and object feature information; the initial multi-objective recommendation model includes a first sub-model based on the user feature information and the object feature information and a second sub-model based on the object feature information; generating a feature vector based on the sample data; Training is performed based on the feature vector and the initial multi-objective recommendation model, and a total loss function of the multi-objective recommendation model after training is calculated; wherein the total loss function is the sum of a loss function based on click-through rate feature information in user feature information and a loss function based on object feature information; When the total loss function of the multi-objective recommendation model after training is minimized, stop training the multi-objective recommendation model; wherein the product of the output value of the first sub-model and the output value of the second sub-model is the comprehensive click prediction value output by the multi-objective recommendation model, and the output value of the second sub-model is the deviation prediction value output by the multi-objective recommendation model.
7. The training method according to claim 6, characterized in that: The second sub-model includes a preset number of feature extraction layers and an output layer; the feature extraction layer is connected to the output layer; the feature extraction layer is used to extract feature information of the object and input the feature extraction result to the output layer.
8. The training method according to claim 7, characterized in that: The second sub-model also includes a partial feature extraction layer of a preset dimension; the partial feature extraction layer is connected to the output layer of the second sub-model; the partial feature extraction layer is used to extract the language feature information and / or genre feature information of the object feature information, and input the feature extraction results to the output layer.
9. A terminal device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the recommendation method according to any one of claims 1 to 5 and / or the steps of the training method according to any one of claims 6 to 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the recommendation method according to any one of claims 1 to 5 and / or the steps of the training method according to any one of claims 6 to 8.
Citation Information
Patent Citations
Online model training method, pushing method, device and equipment
CN110321422A
Multi-target sorting model training method and device and user behavior prediction method and device
CN110569427A