Training method and device of prediction model, processing equipment and storage medium
By constructing a dual-tower model and combining multiple loss functions and popularity negative sampling strategies, the problem of distinguishing between user interests and herd behavior in content recommendation systems was solved, achieving more accurate personalized content recommendations and improving user experience and system stability.
Patent Information
- Application Number
- CN202310388891.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-12
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-04-12
AI Technical Summary
Existing content recommendation systems fail to effectively distinguish between users' personalized interests and herd behavior, resulting in recommendations that do not meet user needs and negatively impacting user experience.
By constructing a dual-tower model, the latent vectors of user interest and conformity are predicted separately. After merging, the click prediction model is trained. The Bayesian personalized ranking loss function (BPR) and cross-entropy loss function are used for training. The selection of training samples is optimized by combining the popularity negative sampling strategy.
It enables more accurate personalized content recommendations, improves user experience, adapts to diverse user needs, and enhances the stability and robustness of the recommendation system.
Smart Images

Figure CN116561414B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of content recommendation, and in particular to a training method and device of a prediction model for content recommendation, a processing apparatus, and a storage medium. BACKGROUND
[0002] In the field of content recommendation, a recommendation system mostly infers user interests based on observed interaction data. However, the interaction of a user with a material can be triggered by the user's own interest, or by the user's blind following of popular materials, or both. In order to eliminate the influence of the user's blind following, in one scenario embodiment, deviation is corrected from the perspective of popularity deviation. This approach often treats the popularity of a material as a global and unified scalar, ignoring the diversity of the user's conformity: a user's conformity to different materials can be different, and different users' conformity to a material can also be different, thereby causing the content recommendation to be unable to adapt to user demand, and bringing a poor experience to the user. SUMMARY
[0003] In view of this, the present disclosure discloses a training method and device of a prediction model for content recommendation, a processing apparatus, and a storage medium, to at least achieve better adaptation to user demand, accurately recommend personalized content to the user, and bring a better experience to the user.
[0004] According to a first aspect of the present disclosure, a training method of a prediction model for content recommendation is provided, the method comprising:
[0005] determining a training sample pair, the training sample pair comprising a first training sample pair and a second training sample pair; the first training sample pair comprising a clicked material sample and an unclicked material sample, the clicked material sample having a higher degree of popularity than the unclicked material sample; the second training sample pair comprising a clicked material sample and an unclicked material sample, the clicked material sample having a lower degree of popularity than the unclicked material sample;
[0006] training an initial first prediction model for conformity latent vector prediction using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set comprising at least two first training sample pairs;
[0007] training an initial second prediction model for interest latent vector prediction using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set comprising at least two second training sample pairs;
[0008] training the initial click prediction model for predicting the interest score and the conformity score using the first training sample set and the second training sample set until a third training condition is met to obtain a trained click prediction model; wherein the initial click prediction model comprises the first prediction model and the second prediction model.
[0009] In one embodiment, the initial click prediction model comprises a dual tower model, the dual tower model further comprises a first tower model and a second tower model, the first tower model is used for predicting the interest score, and the second tower model is used for predicting the conformity score; and the training the initial click prediction model for predicting the interest score and the conformity score using the first training sample set and the second training sample set until a third training condition is met to obtain a trained click prediction model comprises:
[0010] inputting the first training sample pair into the first prediction model to predict the interest hidden vector to obtain a corresponding interest hidden vector of the first training sample pair;
[0011] inputting the second training sample pair into the second prediction model to predict the conformity hidden vector to obtain a corresponding conformity hidden vector of the second training sample pair;
[0012] merging the interest hidden vector and the conformity hidden vector to obtain a merged vector;
[0013] inputting the merged vector into the dual tower model for training until the third training condition is met to obtain the trained click prediction model.
[0014] In one embodiment, the method further comprises:
[0015] in response to a predetermined loss function converging, determining that the first training condition, the second training condition and / or the third training condition are met;
[0016] wherein the predetermined loss function is a Bayesian personalized ranking (BPR) loss function, or a loss function determined based on the BPR loss function and a cross-entropy loss function.
[0017] In one embodiment,
[0018] the label value of the conformity score of the clicked material sample in the first training sample pair is greater than the label value of the conformity score of the non-clicked material sample; and the sum of the label value of the conformity score of the clicked material sample and the label value of the interest score of the clicked material sample is greater than the sum of the label value of the conformity score of the non-clicked material sample and the label value of the interest score of the non-clicked material sample.
[0019] and / or,
[0020] the label value of the interest score of the clicked material sample is greater than the label value of the interest score of the unclicked material sample; and the label value of the conformity score of the clicked material sample is less than the label value of the conformity score of the unclicked material sample; and the sum of the label value of the conformity score of the clicked material sample and the label value of the interest score of the clicked material sample is greater than the sum of the label value of the conformity score of the unclicked material sample and the label value of the interest score of the unclicked material sample.
[0021] In an embodiment, the determining the training sample pair comprises:
[0022] determining the training sample pair from the interaction sample for content recommendation based on a popularity negative sampling (PNSM) strategy.
[0023] In an embodiment, the method further comprises:
[0024] determining the popularity degree of the clicked material sample and / or the unclicked material sample based on a predetermined parameter;
[0025] The predetermined parameter comprises at least one of the following: the number of reposts, the number of comments, and the number of likes.
[0026] In an embodiment, the method further comprises:
[0027] determining that the popularity degree of the clicked material sample is greater than the popularity degree of the unclicked material sample in response to the popularity degree determined based on the number of reposts, the number of comments, and the number of likes of the clicked material sample each being greater than the popularity degree determined based on the number of reposts, the number of comments, and the number of likes of the unclicked material sample, respectively;
[0028] or,
[0029] determining that the popularity degree of the clicked material sample is less than the popularity degree of the unclicked material sample in response to the popularity degree determined based on the number of reposts, the number of comments, and the number of likes of the clicked material sample each being less than the popularity degree determined based on the number of reposts, the number of comments, and the number of likes of the unclicked material sample, respectively.
[0030] According to a second aspect of the embodiments of the present disclosure, a training device for a prediction model for content recommendation is provided, and the device comprises:
[0031] The determining module is configured to determine training sample pairs, the training sample pairs including first training sample pairs and second training sample pairs; the first training sample pairs include clicked material samples and unclicked material samples, the clicked material samples having a higher popularity than the unclicked material samples; the second training sample pairs include clicked material samples and unclicked material samples, the clicked material samples having a lower popularity than the unclicked material samples;
[0032] The training module is configured to train an initial first prediction model for predicting a popularity hidden vector until a first training condition is met, using a first training sample set, to obtain a trained first prediction model; the first training sample set includes at least two first training sample pairs;
[0033] train an initial second prediction model for predicting an interest hidden vector until a second training condition is met, using a second training sample set, to obtain a trained second prediction model; the second training sample set includes at least two second training sample pairs;
[0034] train an initial click prediction model for predicting an interest score and a popularity score until a third training condition is met, using the first training sample set and the second training sample set, to obtain a trained click prediction model; the initial click prediction model includes the first prediction model and the second prediction model.
[0035] According to a third aspect of embodiments of the present disclosure, a processing device is provided, and the processing device includes:
[0036] a memory configured to store an executable program;
[0037] a processor configured to implement a method according to any of embodiments of the present disclosure when executing the executable program stored in the memory.
[0038] According to a fourth aspect of embodiments of the present disclosure, a computer storage medium is provided, and the computer storage medium stores an executable program, and the executable program is executed by a processor to implement a method according to any of embodiments of the present disclosure.
[0039] In the embodiments of the present disclosure, the training sample pairs include the first training sample pairs and the second training sample pairs, and the material samples in the first training sample pairs and the second training sample pairs are determined based on user behavior features and popularity, the initial first prediction model and the initial second prediction model can be trained by using the first sample set and / or the second sample set, and the initial click prediction model including the conformity hidden vector and the interest hidden vector for predicting the interest score and the conformity score is trained based on the first training sample set and the second training sample set to obtain the trained click prediction model. In this way, the interest score and the conformity score can be predicted by using the trained click prediction model, compared with the way of obtaining a single interest score, since the sample pairs including user behavior features and popularity are introduced and the training of the initial click prediction model is performed in a joint training manner, when the content recommendation is performed by using the trained click prediction model, the user demand can be better adapted to, the personalized content can be accurately recommended to the user, and a better experience can be brought to the user. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 a schematic diagram of a collision structure according to an example embodiment;
[0041] Figure 2 a flowchart of a training method of a prediction model for content recommendation according to an example embodiment;
[0042] Figure 3 a schematic diagram of a double-tower model according to an example embodiment;
[0043] Figure 4 a flowchart of a content recommendation method according to an example embodiment;
[0044] Figure 5 a schematic diagram of a training device of a prediction model for content recommendation according to an example embodiment. DETAILED DESCRIPTION
[0045] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0046] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0047] In the following description, the terms "first", "second", "third" are only to distinguish similar objects, and do not represent a specific order of the objects. Understandably, "first", "second", "third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this application is for the purpose of describing the embodiments of the application only, and is not intended to limit the application.
[0049] In order to better understand the embodiments of the present disclosure, the following describes the scenario in the related art through exemplary embodiments:
[0050] In order to eliminate the influence of the user's blind following, the deviation is often corrected from the perspective of popularity. The deviation of popularity does not consider the diversity of users, nor does it fully extract the information related to the user's interest in the interaction between the user and the material. Therefore, a more appropriate method is to decouple the user's true interest and the user's conformity, and to represent them with their own latent vectors. If according to the matrix decomposition method, factor decomposition machine or deep neural network method, each user or material can obtain the corresponding latent vector, and the inner product of the latent vectors of different users and material pairs is the degree to which the material meets the user's interest. In the present disclosure, the latent vectors of users and materials are refined: each user has an interest latent vector representing its own interest, and also has a conformity latent vector representing its blind following; each material also has a corresponding interest latent vector and a conformity latent vector, i.e. the material should be decomposed into a field latent vector and a popularity latent vector. In order to unify the expression, it is unified into an interest latent vector and a conformity latent vector.
[0051] In one embodiment, please refer to Figure 1 , a collision structure including interest, click and conformity is constructed, and a prediction model is trained based on the collision effect.
[0052] As shown in Figure 2 , the present disclosure provides a training method of a prediction model for content recommendation, the method comprising:
[0053] Step S21, determining training sample pairs, the training sample pairs including first training sample pairs and second training sample pairs; the first training sample pairs including clicked material samples and unclicked material samples, the clicked material samples having a higher popularity than the unclicked material samples; the second training sample pairs including clicked material samples and unclicked material samples, the clicked material samples having a lower popularity than the unclicked material samples;
[0054] Step S22, training an initial first prediction model for predicting the conformity vector using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set including at least two first training sample pairs;
[0055] Step S23, training an initial second prediction model for predicting the interest vector using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set including at least two second training sample pairs;
[0056] Step S24, training an initial click prediction model for predicting the interest score and the conformity score using the first training sample set and the second training sample set until a third training condition is met, to obtain a trained click prediction model; wherein the initial click prediction model includes the first prediction model and the second prediction model.
[0057] The training method of the prediction model for content recommendation of the present disclosure can be applied in an electronic device. The electronic device related to the present disclosure can be, but is not limited to, a computer, a mobile phone, a wearable device, a vehicle-mounted terminal, a road side unit (RSU), a smart home terminal, an industrial sensing device, a medical device, and the like.
[0058] It should be noted that the above method corresponds to the training process of the initial click prediction model, and the training process can be performed on a dedicated device. After training the initial click prediction model, a trained click prediction model can be obtained, and the trained click prediction model can be transplanted to an electronic device for click prediction model application and applied. Of course, the training process of the initial click prediction model and the trained click prediction model can also be performed on the same electronic device, which is not limited herein. When the training process of the initial click prediction model is performed on the dedicated device, after the initial click prediction model is trained, the trained click prediction model can be transplanted from the dedicated device to the electronic device for applying the model.
[0059] In one embodiment, a training sample pair is determined, which includes a first training sample pair and a second training sample pair; the first training sample pair includes a clicked material sample and a non-clicked material sample, the clicked material sample has a higher popularity than the non-clicked material sample; the second training sample pair includes a clicked material sample and a non-clicked material sample, the clicked material sample has a lower popularity than the non-clicked material sample. A first prediction model for predicting conformity hidden vectors is trained using a first training sample set until a first training condition is met, obtaining a trained first prediction model; the first training sample set includes at least two first training sample pairs. A second prediction model for predicting interest hidden vectors is trained using a second training sample set until a second training condition is met, obtaining a trained second prediction model; the second training sample set includes at least two second training sample pairs. An initial click prediction model for predicting interest scores and conformity scores is trained using the first training sample set and the second training sample set until a third training condition is met, obtaining a trained click prediction model; wherein the initial click prediction model includes the first prediction model and the second prediction model. An interaction sample is input into the trained click prediction model, obtaining an interest score and a conformity score corresponding to the interaction sample, wherein the interest score and the conformity score can be used for content recommendation. For example, content with a high interest score and / or a high conformity score can be recommended to a user. The interaction sample in the present disclosure can be a video, audio, text, etc. affected by user behavior, for example, a video clicked by a user.
[0060] In one embodiment, a training sample pair is determined, the training sample pair including a first training sample pair and a second training sample pair; the first training sample pair including a clicked material sample and an unclicked material sample, the clicked material sample having a higher popularity than the unclicked material sample; the second training sample pair including a clicked material sample and an unclicked material sample, the clicked material sample having a lower popularity than the unclicked material sample. A first prediction model for predicting a conformity hidden vector is trained using a first training sample set until a first loss function converges or a first predetermined training number is reached, obtaining a trained first prediction model; the first training sample set including at least two first training samples. A second prediction model for predicting an interest hidden vector is trained using a second training sample set until a second loss function converges or a second predetermined training number is reached, obtaining a trained second prediction model; the second training sample set including at least two second training sample pairs. An initial click prediction model for predicting an interest score and a conformity score is trained using the first training sample set and the second training sample set until a third loss function converges or a third predetermined training number is reached, obtaining a trained click prediction model; wherein the initial click prediction model includes the first prediction model and the second prediction model. The first predetermined training number, the second predetermined training number, and the third predetermined training number can be pre-set.
[0061] In one embodiment, the first loss function, the second loss function, and / or the third loss function can be a Bayesian personalized ranking (BPR) loss function.
[0062] In one embodiment, a BPR loss function is introduced. Through this loss function, the model can fully identify positive samples and negative samples by expanding the distance between positive samples and negative samples. The loss function is expressed as follows:
[0063]
[0064] wherein S i is defined as the predicted score of the pos_item clicked by the model user, S j is defined as the predicted score of the neg_item not clicked by the model for the user. Substituting into the formula can determine that the greater the difference between the two scores, the smaller the loss function.
[0065] In one embodiment, a training sample pair is determined, the training sample pair including a first training sample pair and a second training sample pair; the first training sample pair including a clicked material sample and a non-clicked material sample, a popularity degree of the clicked material sample being greater than a popularity degree of the non-clicked material sample; the second training sample pair including a clicked material sample and a non-clicked material sample, a popularity degree of the clicked material sample being less than a popularity degree of the non-clicked material sample. A first prediction model for predicting a conformity hidden vector is trained using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set including at least two first training sample pairs. A second prediction model for predicting an interest hidden vector is trained using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set including at least two second training sample pairs. An initial click prediction model for predicting an interest score and a conformity score is trained using the first training sample set and the second training sample set until a third training condition is met, to obtain a trained click prediction model; wherein the initial click prediction model includes the first prediction model and the second prediction model. Wherein, in response to a predetermined loss function converging, it is determined that the first training condition, the second training condition and / or the third training condition are met; wherein the predetermined loss function is: a Bayesian personalized ranking (BPR) loss function, or a loss function determined based on the BPR loss function and a cross-entropy loss function.
[0066] In one embodiment, the initial click prediction model further comprises a double tower model, the double tower model comprising a first tower model and a second tower model, the first tower model being configured to predict an interestingness score, and the second tower model being configured to predict a conformity score. A training sample pair is determined, the training sample pair comprising a first training sample pair and a second training sample pair; the first training sample pair comprising a clicked material sample and a non-clicked material sample, the clicked material sample having a higher popularity than the non-clicked material sample; and the second training sample pair comprising a clicked material sample and a non-clicked material sample, the clicked material sample having a lower popularity than the non-clicked material sample. The initial first prediction model for conformity hidden vector prediction is trained using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set comprising at least two first training sample pairs. The initial second prediction model for interestingness hidden vector prediction is trained using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set comprising at least two second training sample pairs. The first training sample pair is input into the first prediction model to predict an interestingness hidden vector corresponding to the first training sample pair; and the second training sample pair is input into the second prediction model to predict a conformity hidden vector corresponding to the second training sample pair. The interestingness hidden vector and the conformity hidden vector are combined to obtain a combined vector. The combined vector is input into the double tower model for training until a third training condition is met, to obtain a trained click prediction model.
[0067] See Figure 3 , input is an input training sample pair, X _i represents an interesting model input obtained by concatenating the interestingness hidden vector, X _j represents a model input obtained by concatenating the conformity hidden vector. After processing by the model, two outputs are obtained, which are the interestingness prediction score and the conformity prediction score of the two model sample pairs. The results obtained by the BPR formula are used as the training loss.
[0068] When training the model, the framework can well decouple the interest and conformity latent vectors and achieve good offline evaluation indicators. However, as the model is trained, the service becomes very unstable, specifically, the service score fluctuates greatly, resulting in that the effect is not robust enough when combined with other online models. After analysis, it is concluded that the scoring fluctuation problem is mainly caused by the training method. The model trained based on the BPR loss function is different from the traditional click prediction task based on cross-entropy. Instead of learning how to predict the label by fitting the distribution of real samples, the relative distance between input samples is calculated, so the interest score and conformity score obtained by the model cannot directly reflect the distribution of sample labels. Therefore, in addition to using the BPR loss, a cross-entropy loss function is also used in the training stage to fit the distribution of real samples. Experiments prove that after adding the cross-entropy loss, the model obtains more robust service effect online.
[0069] In an embodiment, a training sample pair is determined from an interaction sample for content recommendation based on a popularity negative sampling (PNSM) strategy. The training sample pair includes a first training sample pair and a second training sample pair; the first training sample pair includes a clicked material sample and an unclicked material sample, and the popularity of the clicked material sample is greater than the popularity of the unclicked material sample; the second training sample pair includes a clicked material sample and an unclicked material sample, and the popularity of the clicked material sample is less than the popularity of the unclicked material sample. A first prediction model for predicting a conformity latent vector is trained using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set includes at least two first training sample pairs. A second prediction model for predicting an interest latent vector is trained using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set includes at least two second training sample pairs. An initial click prediction model for predicting an interest score and a conformity score is trained using the first training sample set and the second training sample set until a third training condition is met, to obtain a trained click prediction model; wherein the initial click prediction model includes the first prediction model and the second prediction model.
[0070] In an embodiment, a popularity degree of the clicked material sample and / or the unclicked material sample is determined based on a predetermined parameter; wherein the predetermined parameter comprises at least one of the following: a forwarding number, a comment number and a like number. The training sample pair comprises a first training sample pair and a second training sample pair; the first training sample pair comprises a clicked material sample and an unclicked material sample, and the clicked material sample has a higher popularity degree than the unclicked material sample; the second training sample pair comprises a clicked material sample and an unclicked material sample, and the clicked material sample has a lower popularity degree than the unclicked material sample. A first prediction model for predicting the conformity hidden vector is trained using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set comprises at least two first training sample pairs. A second prediction model for predicting the interest hidden vector is trained using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set comprises at least two second training sample pairs. An initial click prediction model for predicting the interest score and the conformity score is trained using the first training sample set and the second training sample set until a third training condition is met, to obtain a trained click prediction model; wherein the initial click prediction model comprises the first prediction model and the second prediction model.
[0071] In one embodiment, the popularity degree of the clicked material sample is determined to be greater than the popularity degree of the unclicked material sample in response to the popularity degrees respectively determined based on the number of reposts, the number of comments and the number of likes of the clicked material sample all corresponding to being greater than the popularity degrees respectively determined based on the number of reposts, the number of comments and the number of likes of the unclicked material sample, or the popularity degree of the clicked material sample is determined to be less than the popularity degree of the unclicked material sample in response to the popularity degrees respectively determined based on the number of reposts, the number of comments and the number of likes of the clicked material sample all corresponding to being less than the popularity degrees respectively determined based on the number of reposts, the number of comments and the number of likes of the unclicked material sample. The training sample pairs include first training sample pairs and second training sample pairs; the first training sample pairs include a clicked material sample and an unclicked material sample, and the popularity degree of the clicked material sample is greater than the popularity degree of the unclicked material sample; the second training sample pairs include a clicked material sample and an unclicked material sample, and the popularity degree of the clicked material sample is less than the popularity degree of the unclicked material sample. An initial first prediction model for predicting the conformity hidden vector is trained using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set includes at least two first training sample pairs; an initial second prediction model for predicting the interest hidden vector is trained using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set includes at least two second training sample pairs; and an initial click prediction model for predicting the interest score and the conformity score is trained using the first training sample set and the second training sample set until a third training condition is met, to obtain a trained click prediction model; wherein the initial click prediction model includes the first prediction model and the second prediction model.
[0072] In one embodiment, a training sample pair is determined, which includes first training sample pairs and second training sample pairs; the first training sample pairs include a clicked material sample and an unclicked material sample, and the popularity degree of the clicked material sample is greater than the popularity degree of the unclicked material sample;
[0073] The label value of the conformity score of the clicked material sample in the first training sample pair is greater than the label value of the conformity score of the unclicked material sample; and the sum of the label value of the conformity score of the clicked material sample and the label value of the interest score of the clicked material sample is greater than the sum of the label value of the conformity score of the unclicked material sample and the label value of the interest score of the unclicked material sample; and / or, the label value of the interest score of the clicked material sample in the second training sample pair is greater than the label value of the interest score of the unclicked material sample; and the label value of the conformity score of the clicked material sample is less than the label value of the conformity score of the unclicked material sample; and the sum of the label value of the conformity score of the clicked material sample and the label value of the interest score of the clicked material sample is greater than the sum of the label value of the conformity score of the unclicked material sample and the label value of the interest score of the unclicked material sample. The initial first prediction model for predicting the conformity hidden vector is trained using the first training sample set until the first training condition is met, to obtain the trained first prediction model; the first training sample set includes at least two first training sample pairs; the initial second prediction model for predicting the interest hidden vector is trained using the second training sample set until the second training condition is met, to obtain the trained second prediction model; the second training sample set includes at least two second training sample pairs; and the initial click prediction model for predicting the interest score and the conformity score is trained using the first training sample set and the second training sample set until the third training condition is met, to obtain the trained click prediction model; wherein the initial click prediction model includes the first prediction model and the second prediction model.
[0074] It should be noted that the label value can be a value annotated to the training sample according to the attribute of the training sample (for example, the actual corresponding conformity score and interest score, etc.). The label value is different from the prediction value obtained based on the click prediction model in the present disclosure.
[0075] In one embodiment, the label value of the conformity score can be the value of the matrix of the conformity score; and the label value of the interest score can be the value of the matrix of the interest score.
[0076] In one embodiment, a training sample pair is determined, the training sample pair including a first training sample pair and a second training sample pair; the first training sample pair including a clicked material sample and an unclicked material sample, the clicked material sample having a higher popularity than the unclicked material sample; the clicked material sample in the first training sample pair having a value of a conformity score matrix greater than a value of a conformity score matrix of the unclicked material sample; and a sum of the value of the conformity score matrix of the clicked material sample and a value of an interest score matrix of the clicked material sample being greater than a sum of the value of the conformity score matrix of the unclicked material sample and a value of the interest score matrix of the unclicked material sample; the second training sample pair including a clicked material sample and an unclicked material sample, the clicked material sample having a lower popularity than the unclicked material sample; the clicked material sample in the second training sample pair having a value of the interest score matrix greater than a value of the interest score matrix of the unclicked material sample; and a value of the conformity score matrix of the clicked material sample being less than a value of the conformity score matrix of the unclicked material sample; and a sum of the value of the conformity score matrix of the clicked material sample and a value of the interest score matrix of the clicked material sample being greater than a sum of the value of the conformity score matrix of the unclicked material sample and a value of the interest score matrix of the unclicked material sample. A first prediction model for predicting a conformity latent vector is trained using a first training sample set until a first training condition is met, obtaining a trained first prediction model; the first training sample set including at least two first training sample pairs; a second prediction model for predicting an interest latent vector is trained using a second training sample set until a second training condition is met, obtaining a trained second prediction model; the second training sample set including at least two second training sample pairs; and an initial click prediction model for predicting an interest score and a conformity score is trained using the first training sample set and the second training sample set until a third training condition is met, obtaining a trained click prediction model; wherein the initial click prediction model includes the first prediction model and the second prediction model.
[0077] By way of example, Table 1 shows a set of symbols used in the training process according to the present disclosure.
[0078] Table 1:
[0079]
[0080] As shown in the above table, two training sets are constructed, for example, a training set of the first sample and a training set of the second sample. The samples of the two training sets can be represented by (pos_item, neg_item). Wherein, pos_item represents the material clicked by the user, and neg_item represents the material not clicked by the user. The representation is the same, but the sampling logic of pos_item and neg_item is different. The training sample set can be specifically differentiated into the following two cases:
[0081] Case 1: The user u clicks the material pos_item, does not click the material neg_item, and the popularity of the material pos_item is greater than that of the material neg_item, and there is:
[0082]
[0083]
[0084] Case 2: The user u clicks the material pos_item, does not click the material neg_item, and the popularity of the material pos_item is less than that of the material neg_item, and there is:
[0085]
[0086]
[0087]
[0088] Based on the above cases, the following conclusions can be drawn: The inequality of case 1 represents the relationship between the conformity model score and the total model score, so based on the conformity data set (corresponding to the training set of the second sample), the conformity hidden vector can be learned in some way; The inequality of case 2 represents the relationship between the conformity model score, the interest model score and the total model score, so based on the interest data set (corresponding to the training set of the first sample), the conformity hidden vector and the interest hidden vector can be learned in some way.
[0089] Exemplarily, based on the data sets O i and O c , the conformity can be modeled by using the BPR loss,
[0090]
[0091]
[0092]
[0093] Based on the data set O i , the interest can be modeled by using the BPR loss,
[0094]
[0095] And for the overall task, through the collision structure of causal inference, the click behavior of the user is either from interest or from conformity, that is, the click behavior can be modeled by using the BPR loss,
[0096]
[0097] user click =user con ||user int
[0098] pos_item click =pos_item con ||pos_item int
[0099] neg_item click =neg_item con ||neg_item int
[0100] Wherein, || represents concatenating two latent vectors.
[0101] In the embodiment of the present disclosure, the training sample pairs include the first training sample pairs and the second training sample pairs, and the material samples in the first training sample pairs and the second training sample pairs are determined based on user behavior features and popularity, the initial first prediction model and the initial second prediction model can be trained by using the first sample set and / or the second sample set, and the initial click prediction model including the conformity latent vector and the interest latent vector for predicting the interest score and the conformity score is trained based on the first training sample set and the second training sample set to obtain the trained click prediction model. In this way, the interest score and the conformity score can be predicted by using the trained click prediction model, compared with the way of obtaining a single interest score, since the sample pairs including user behavior features and popularity are introduced and the training of the initial click prediction model is performed in a joint training manner, when the content recommendation is performed by using the trained click prediction model, the user demand can be better adapted to, the personalized content can be accurately recommended to the user, and the user can have a better experience.
[0102] It should be noted that those skilled in the art can understand that the method provided by the embodiment of the present disclosure can be executed alone or together with some methods in some methods or related technologies in the embodiment of the present disclosure.
[0103] As Figure 4As shown, the content recommendation method provided in the embodiments of the present disclosure includes:
[0104] In step S41, the interaction sample is input into the trained click prediction model to obtain the interest score and the conformity score corresponding to the interaction sample.
[0105] In step S42, content recommendation is performed based on the interest score and the conformity score.
[0106] In one embodiment, a training sample pair is determined, the training sample pair including a first training sample pair and a second training sample pair; the first training sample pair includes a clicked material sample and an unclicked material sample, the popularity of the clicked material sample being greater than the popularity of the unclicked material sample; the second training sample pair includes a clicked material sample and an unclicked material sample, the popularity of the clicked material sample being less than the popularity of the unclicked material sample. An initial first prediction model for conformity latent vector prediction is trained using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set includes at least two first training sample pairs. An initial second prediction model for interest latent vector prediction is trained using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set includes at least two second training sample pairs. An initial click prediction model for predicting interest scores and conformity scores is trained using the first training sample set and the second training sample set until a third training condition is met, to obtain a trained click prediction model; wherein the initial click prediction model includes the first prediction model and the second prediction model. An interaction sample is input into the trained click prediction model to obtain the interest score and the conformity score corresponding to the interaction sample. Content recommendation is performed based on the interest score and the conformity score. For example, content with a high interest score and / or a high conformity score can be recommended to a user. The interaction sample in the present disclosure can be a video, audio, text, etc. that is to be recommended and acted on by user behavior, for example, a video that has been clicked by a user.
[0107] In one embodiment, training sample pairs are determined, including a first training sample pair and a second training sample pair; the first training sample pair includes clicked material samples and unclicked material samples, wherein the popularity of the clicked material samples is greater than the popularity of the unclicked material samples; the second training sample pair includes clicked material samples and unclicked material samples, wherein the popularity of the clicked material samples is less than the popularity of the unclicked material samples. An initial first prediction model for conformity latent vector prediction is trained using the first training sample set until a first loss function converges or a first predetermined number of training iterations is reached, resulting in a trained first prediction model; the first training sample set includes at least two first training samples. An initial second prediction model for interest latent vector prediction is trained using the second training sample set until a second loss function converges or a second predetermined number of training iterations is reached, resulting in a trained second prediction model; the second training sample set includes at least two second training sample pairs. The initial click prediction model for predicting interest ratings and conformity ratings is trained using the first and second training sample sets until the third loss function converges or a third predetermined number of training iterations are reached, resulting in a trained click prediction model. The initial click prediction model includes the first and second prediction models. Interaction samples are input into the trained click prediction model to obtain the interest rating and conformity rating corresponding to the interaction samples. Content recommendation is then performed based on the interest rating and conformity rating.
[0108] It should be noted that those skilled in the art will understand that the methods provided in the embodiments of this disclosure can be executed alone or together with some methods in the embodiments of this disclosure or some methods in related technologies.
[0109] like Figure 5 As shown in the present disclosure, an embodiment provides a training apparatus for a prediction model for content recommendation, characterized in that the apparatus includes:
[0110] The determination module 51 is configured to determine training sample pairs, the training sample pairs including a first training sample pair and a second training sample pair; the first training sample pair includes clicked material samples and unclicked material samples, the popularity of the clicked material samples is greater than the popularity of the unclicked material samples; the second training sample pair includes clicked material samples and unclicked material samples, the popularity of the clicked material samples is less than the popularity of the unclicked material samples.
[0111] Training module 52 is configured as follows:
[0112] training an initial first prediction model for predicting the popularity hidden vector using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set comprises at least two first training sample pairs;
[0113] training an initial second prediction model for predicting the interest hidden vector using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set comprises at least two second training sample pairs;
[0114] training an initial click prediction model for predicting the interest score and the popularity score using the first training sample set and the second training sample set until a third training condition is met, to obtain a trained click prediction model; wherein the initial click prediction model comprises the first prediction model and the second prediction model.
[0115] In one embodiment, the initial click prediction model comprises a dual tower model, the dual tower model further comprises a first tower model and a second tower model, the first tower model is used for predicting the interest score, and the second tower model is used for predicting the popularity score; the training module 52 is further configured to:
[0116] inputting a first training sample pair into the first prediction model to predict the interest hidden vector corresponding to the first training sample pair;
[0117] inputting a second training sample pair into the second prediction model to predict the popularity hidden vector corresponding to the second training sample pair;
[0118] merging the interest hidden vector and the popularity hidden vector to obtain a merged vector;
[0119] inputting the merged vector into the dual tower model for training until the third training condition is met, to obtain the trained click prediction model.
[0120] In one embodiment, the training module 52 is further configured to
[0121] in response to a predetermined loss function converging, determining that the first training condition, the second training condition and / or the third training condition are met;
[0122] wherein the predetermined loss function is a Bayesian personalized ranking (BPR) loss function, or a loss function determined based on the BPR loss function and a cross-entropy loss function.
[0123] In one embodiment, the determination module 51 is further configured to:
[0124] the label value of the conformity score of the clicked material sample is greater than the label value of the conformity score of the unclicked material sample in the first training sample pair; and the sum of the label value of the conformity score of the clicked material sample and the label value of the interest score of the clicked material sample is greater than the sum of the label value of the conformity score of the unclicked material sample and the label value of the interest score of the unclicked material sample.
[0125] and / or,
[0126] the label value of the interest score of the clicked material sample is greater than the label value of the interest score of the unclicked material sample in the second training sample pair; and the label value of the conformity score of the clicked material sample is less than the label value of the conformity score of the unclicked material sample; and the sum of the label value of the conformity score of the clicked material sample and the label value of the interest score of the clicked material sample is greater than the sum of the label value of the conformity score of the unclicked material sample and the label value of the interest score of the unclicked material sample.
[0127] In an embodiment, the determining module 51 is further configured to:
[0128] determine the training sample pair from the interaction sample for content recommendation based on a popularity negative sampling (PNSM) strategy.
[0129] In an embodiment, the determining module is further configured to:
[0130] determine the popularity degree of the clicked material sample and / or the unclicked material sample based on a predetermined parameter;
[0131] wherein the predetermined parameter comprises at least one of the following: the number of reposts, the number of comments, and the number of likes.
[0132] In an embodiment, the determining module 51 is further configured to:
[0133] determine that the popularity degree of the clicked material sample is greater than the popularity degree of the unclicked material sample in response to the popularity degree determined based on the number of reposts, the number of comments, and the number of likes of the clicked material sample each being greater than the popularity degree determined based on the number of reposts, the number of comments, and the number of likes of the unclicked material sample, respectively;
[0134] or,
[0135] In response to the popularity degrees respectively determined based on the forwarding times, the comment quantities and the like-quantity of the clicked material sample all corresponding to being less than the popularity degrees respectively determined based on the forwarding times, the comment quantities and the like-quantity of the un-clicked material sample, it is determined that the popularity degree of the clicked material sample is less than the popularity degree of the un-clicked material sample.
[0136] It should be noted that those skilled in the art can understand that the method provided by the embodiments of the present disclosure can be executed alone or together with some methods in some methods or related technologies in the embodiments of the present disclosure.
[0137] The embodiments of the present disclosure provide a processing device, comprising:
[0138] a memory for storing executable programs;
[0139] a processor for executing the executable programs stored in the memory, and realizing the method according to any one of the embodiments of the present disclosure.
[0140] It can be understood that the memory can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM). The magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), sync link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory described in the embodiments of the present application is intended to include, but not limited to, these and any other suitable types of memory.
[0141] The method disclosed in the present application can be applied to or implemented by the processor. The processor can be an integrated circuit chip with processing capability. In the implementation process, the steps of the method for speech conversion can be completed by the integrated logic circuit or the instruction of software form in the processor. The processor mentioned above can be a general processor, a digital signal processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The processor can implement or execute the disclosed methods, steps and logic block diagrams in the present application. The general processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the present application, the method can be directly embodied as a hardware decoding processor to be executed, or be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory. The processor reads the information in the memory and combines the hardware to complete the steps of the method for speech conversion provided in the embodiments of the present application.
[0142] The present application further provides a computer storage medium, which stores an executable program. When the executable program is executed by a processor, the method according to any one of the embodiments of the present application is implemented. Specifically, the computer storage medium can be a computer readable storage medium, such as a memory for storing a computer program, which can be executed by a processor of a processing device to complete the steps of the method according to the embodiments of the present application. The computer readable storage medium can be a ROM, a PROM, an EPROM, an EEPROM, a flash memory, a magnetic surface memory, an optical disc, or a CD-ROM, etc.
[0143] The above description is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for training a prediction model for content recommendation, characterized in that, The method comprises: determining training sample pairs, the training sample pairs comprising first training sample pairs and second training sample pairs; the first training sample pairs comprising clicked material samples and unclicked material samples, the clicked material samples having a higher popularity than the unclicked material samples; the second training sample pairs comprising clicked material samples and unclicked material samples, the clicked material samples having a lower popularity than the unclicked material samples; training an initial first prediction model for predicting a popularity hidden vector using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set comprising at least two first training sample pairs; training an initial second prediction model for predicting an interest hidden vector using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set comprising at least two second training sample pairs; training an initial click prediction model for predicting an interest score and a popularity score using the first training sample set and the second training sample set until a third training condition is met, to obtain a trained click prediction model; wherein the initial click prediction model comprises the first prediction model and the second prediction model.
2. The method of claim 1, wherein, The initial click prediction model further comprises a dual tower model, the dual tower model comprising a first tower model and a second tower model, the first tower model being used for predicting an interest score, and the second tower model being used for predicting a popularity score; The training of the initial click prediction model for predicting an interest score and a popularity score using the first training sample set and the second training sample set until a third training condition is met, to obtain a trained click prediction model, comprises: inputting a first training sample pair into the first prediction model to predict an interest hidden vector corresponding to the first training sample pair; inputting a second training sample pair into the second prediction model to predict a popularity hidden vector corresponding to the second training sample pair; merging the interest hidden vector and the popularity hidden vector to obtain a merged vector; inputting the merged vector into the dual tower model to predict an interest score and a popularity score; repeating the above iterative training process until the third training condition is met, to obtain a trained click prediction model.
3. The method of claim 1, wherein, The method further comprises: in response to a predetermined loss function converging, determining that the first training condition, the second training condition and / or the third training condition are met; wherein the predetermined loss function is a Bayesian personalized ranking (BPR) loss function, or a loss function determined based on the BPR loss function and a cross-entropy loss function.
4. The method of claim 1, wherein a label value of a conformity score of the clicked material sample in the first training sample pair is greater than a label value of a conformity score of the unclicked material sample; and a sum of the label value of the conformity score of the clicked material sample and a label value of an interest score of the clicked material sample is greater than a sum of the label value of the conformity score of the unclicked material sample and a label value of an interest score of the unclicked material sample; and / or, a label value of an interest score of the clicked material sample in the second training sample pair is greater than a label value of an interest score of the unclicked material sample; and a label value of a conformity score of the clicked material sample is less than a label value of a conformity score of the unclicked material sample; and a sum of the label value of the conformity score of the clicked material sample and the label value of the interest score of the clicked material sample is greater than a sum of the label value of the conformity score of the unclicked material sample and the label value of the interest score of the unclicked material sample.
5. The method of claim 1, wherein, The determining the training sample pairs comprises: determining the training sample pairs from the interaction samples for content recommendation based on a popularity negative sampling (PNSM) strategy.
6. The method of claim 1, wherein, The method further comprises: determining the popularity degrees of the clicked material sample and / or the unclicked material sample based on predetermined parameters; wherein the predetermined parameters comprise at least one of the following: a number of reposts, a number of comments, and a number of likes.
7. The method of claim 6, wherein, The method further comprises: in response to the popularity degrees respectively determined based on the number of reposts, the number of comments, and the number of likes of the clicked material sample all being greater than the popularity degrees respectively determined based on the number of reposts, the number of comments, and the number of likes of the unclicked material sample, determining that the popularity degree of the clicked material sample is greater than the popularity degree of the unclicked material sample; or, in response to the popularity degrees respectively determined based on the number of reposts, the number of comments, and the number of likes of the clicked material sample all being less than the popularity degrees respectively determined based on the number of reposts, the number of comments, and the number of likes of the unclicked material sample, determining that the popularity degree of the clicked material sample is less than the popularity degree of the unclicked material sample. 8.A device for training a prediction model for content recommendation, characterized in that, The apparatus comprises: a determining module configured to determine training sample pairs, the training sample pairs comprising first training sample pairs and second training sample pairs; the first training sample pairs comprising a clicked material sample and an unclicked material sample, a popularity degree of the clicked material sample being greater than a popularity degree of the unclicked material sample; the second training sample pairs comprising a clicked material sample and an unclicked material sample, a popularity degree of the clicked material sample being less than a popularity degree of the unclicked material sample; a training module configured to train an initial first prediction model for conformity latent vector prediction using a first training sample set until a first training condition is met, to obtain a trained first prediction model; the first training sample set comprising at least two first training sample pairs; training an initial second prediction model for interest latent vector prediction using a second training sample set until a second training condition is met, to obtain a trained second prediction model; the second training sample set comprises at least two second training sample pairs; training an initial click prediction model for predicting interest score and conformity score using the first training sample set and the second training sample set until a third training condition is met, to obtain a trained click prediction model; wherein the initial click prediction model comprises the first prediction model and the second prediction model.
9. A processing device, characterized by The processing device comprises: a memory for storing an executable program; a processor for executing the executable program stored in the memory, to implement the method of any one of claims 1 to 7.
10. A computer storage medium, characterized in that The computer storage medium stores an executable program, and the executable program is executed by the processor to implement the method of any one of claims 1 to 7. The computer storage medium stores an executable program, and the executable program is executed by the processor to implement the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Recommendation model training method, recommendation method, apparatus, and computer-readable medium
US20210248651A1
Application recommendation method, apparatus and device, and computer-readable storage medium
WO2023000491A1