A model training method, a content recommendation method, a device, and an electronic device.

By training a first and a second model in a video recommendation system and adjusting sparse features using prediction weights, the problems of high model training costs and limited sample size in different scenarios are solved, resulting in more accurate content recommendation and improved user experience.

CN116975442BActive Publication Date: 2026-03-10BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-20
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, video recommendation systems suffer from high training costs and limited sample sizes due to the need to train ranking models separately for different scenarios, which affects the accuracy of recommendation results.

Method used

By acquiring user attribute features, content attribute features, and context features from different applications that are associated with the same content database, a first training model and a second training model are trained. The sparse features are then adjusted using prediction weights to achieve full training of the model and personalized recommendations.

Benefits of technology

It enables more accurate matching of user interests and preferences across different applications, improves the targeting and accuracy of recommended content, reduces model training costs, and enhances user experience and content consumption metrics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116975442B_ABST
    Figure CN116975442B_ABST
Patent Text Reader

Abstract

This invention provides a model training method, content recommendation method, apparatus, and electronic device. The method includes: acquiring first user attribute features, sample content attribute features, and sample context features of sample users under different applications associated with the same content database; for each application, acquiring second user attribute features of sample users under that application, and inputting the second user attribute features into a first model to be trained to obtain prediction weights; inputting the first user attribute features, sample content attribute features, and sample context features into a second model to be trained, adjusting the sparse features of the second model to be trained using the prediction weights, and predicting sample user behavior to obtain predicted behavior labels; calculating the loss of the second model to be trained based on the behavior labels and predicted behavior labels, and adjusting the parameters of the first and second models to be trained based on the loss. Applying this invention enables sufficient model training, resulting in accurate content recommendations for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of content recommendation technology, and in particular to a model training method, a content recommendation method, an apparatus, and an electronic device. Background Technology

[0002] In the field of video recommendation, video recommendation systems typically have multiple entry points, corresponding to multiple applications or multiple interfaces of a single application, with each branch corresponding to a specific scenario. In related technologies, to accurately recommend videos to users in different scenarios, ranking models are trained separately for each scenario. Then, in each scenario, the ranking model trained for that specific scenario is used to rank the videos to be recommended, and finally, videos are recommended to the user based on the ranking results.

[0003] Training ranking models separately for different scenarios is costly, and because the ranking model is trained for a single scenario, there is a problem of small traffic in small scenarios, which limits the number of samples used for training. This may result in insufficient training of the ranking model, which in turn affects the video recommendation results. Summary of the Invention

[0004] The purpose of this invention is to provide a model training method, a content recommendation method, a device, and an electronic device to fully train the model and accurately recommend content to users. The specific technical solution is as follows:

[0005] In a first aspect of this invention, a model training method is provided, the method comprising:

[0006] The system obtains the first user attribute features of sample users under different applications associated with the same content database, the sample content attribute features of sample content accessed by the sample users, and the sample context features when the sample users access the sample content. Each sample user has a corresponding behavior tag, which is used to represent the actual operation information of the sample user when accessing the sample content. The sample context features are used to characterize the environmental features when the sample user accesses the sample content.

[0007] For each application, obtain the second user attribute features of the sample users in that application;

[0008] The second user attribute features of the sample users in the application are input into the first model to be trained for weight prediction, so as to obtain the predicted weights of the sample users in the application.

[0009] The first user attribute features, the sample content attribute features, and the sample context features of the sample user are input into the second training model. The sparse features of the second training model are adjusted using the prediction weights. The behavior of the sample user is predicted to obtain the predicted behavior label of the sample user for the sample content under the application.

[0010] Based on the behavior label and the predicted behavior label, the loss of the second model to be trained is calculated, and the parameters of the first model to be trained and the second model to be trained are adjusted according to the loss.

[0011] In one possible implementation, the first user attribute features include: the user ID, age, gender, VIP attribute, login attribute, viewing history behavior attribute, click history behavior attribute, and at least one of long-term profile and short-term profile of the sample user; the sample content attribute features include: at least one of content ID, content type, content uploader ID, and content uploader attribute; the sample context features include: at least one of holidays, time, location, season, and weather.

[0012] In one possible implementation, the behavioral tags include at least one of: click-through rate, viewing duration, comment rate, like rate, and completion rate; the second user attribute features include: scene ID, average viewing duration per person in the scene, VIP attribute, login attribute, viewing history behavior attribute, click history behavior attribute, and at least one of long-term profile and short-term profile of the sample user.

[0013] In one possible implementation, adjusting the sparse features of the second model to be trained using the prediction weights includes:

[0014] The first user attribute features, the sample content attribute features, and the sample context features of the sample users are concatenated to obtain the sparse features of the second model to be trained.

[0015] The predicted weights are used as the embedding weights for the sparse features of the second model to be trained.

[0016] In one possible implementation, the first model to be trained has the same structure as the second model to be trained.

[0017] In a second aspect of the present invention, a content recommendation method is provided, the method comprising:

[0018] Obtain the target user attribute characteristics of the target user in the target application;

[0019] For each piece of content to be sorted, obtain the candidate user attribute features, candidate content attribute features, and candidate context features corresponding to that content.

[0020] The target user attribute features are input into a pre-trained first model for weight prediction to obtain the target predicted weight of the target user in the target application.

[0021] For each piece of content to be sorted, the candidate user attribute features, candidate content attribute features, and candidate context features corresponding to that content are input into a pre-trained second model. The sparse features of the second model are adjusted using the target prediction weights to predict the behavior of the target user, thereby obtaining the target behavior label of the target user in the target application for the content to be sorted. The target behavior label represents the actual operation information of the target user on the content to be sorted. The pre-trained first model and the pre-trained second model are trained using the method described in the first aspect above.

[0022] Calculate the score for each item to be sorted based on the target behavior tags;

[0023] The content to be sorted is sorted according to the scores, and target content is recommended to the target user based on the sorting results.

[0024] In one possible implementation, the target user attribute features include: scene ID, average playback time per person in the scene, and at least one of the target user's VIP attribute, login attribute, viewing history behavior attribute, click history behavior attribute, and long-term profile and short-term profile; the candidate user attribute features include: at least one of user click-through rate, average playback time, and like rate; the candidate content attribute features include: at least one of content ID, content type, content uploader ID, and content uploader attribute; the candidate context features include: at least one of current time, location, weather, and network environment; and the target behavior tags include: at least one of click-through rate, viewing time, comment rate, like rate, and completion rate.

[0025] In one possible implementation, adjusting the sparse features of the second model using the target prediction weights includes:

[0026] The candidate user attribute features, candidate content attribute features, and candidate context features corresponding to the content to be sorted are concatenated to obtain the sparse features of the second model.

[0027] The target prediction weights are used as the embedding weights of the sparse features of the second model.

[0028] In a third aspect of the invention, a model training apparatus is also provided, the apparatus comprising:

[0029] The first data acquisition module is used to acquire the first user attribute features of sample users under different applications associated with the same content database, the sample content attribute features of sample content accessed by the sample users, and the sample context features when the sample users access the sample content. The sample users have corresponding behavior tags, which are used to represent the actual operation information of the sample users when accessing the sample content. The sample context features are used to characterize the environmental features when the sample users access the sample content.

[0030] The second data acquisition module is used to acquire the second user attribute features of the sample users in each application.

[0031] The first weight prediction module is used to input the second user attribute features of the sample users under the application into the first model to be trained to perform weight prediction and obtain the predicted weights of the sample users under the application.

[0032] The first behavior prediction module is used to input the first user attribute features, the sample content attribute features and the sample context features of the sample user into the second training model, adjust the sparse features of the second training model using the prediction weights, and perform behavior prediction on the sample user to obtain the predicted behavior label of the sample user for the sample content under the application.

[0033] The model training module is used to calculate the loss of the second model to be trained based on the behavior label and the predicted behavior label, and to adjust the parameters of the first model to be trained and the second model to be trained based on the loss.

[0034] In a fourth aspect of the invention, a content recommendation device is also provided, the device comprising:

[0035] The third data acquisition module is used to acquire the target user attribute characteristics of the target user in the target application.

[0036] The fourth data acquisition module is used to acquire the candidate user attribute features, candidate content attribute features, and candidate context features corresponding to each content to be sorted.

[0037] The second weight prediction module is used to input the target user attribute features into a pre-trained first model to perform weight prediction, and obtain the target predicted weight of the target user in the target application.

[0038] The second behavior prediction module is used to input the candidate user attribute features, candidate content attribute features, and candidate context features corresponding to each content to be sorted into a pre-trained second model, adjust the sparse features of the second model using the target prediction weights, and predict the behavior of the target user to obtain the target behavior label of the target user in the target application for the content to be sorted; wherein, the target behavior label is used to represent the actual operation information of the target user for the content to be sorted; the pre-trained first model and the pre-trained second model are trained using the method described in the first aspect above;

[0039] The scoring calculation module is used to calculate the score of each item to be sorted based on each target behavior label;

[0040] The content recommendation module is used to sort the contents to be sorted according to the scores, and recommend target content to the target user based on the sorting results.

[0041] In another aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.

[0042] Memory, used to store computer programs;

[0043] When a processor executes a program stored in memory, it implements the steps of any of the methods described above.

[0044] In another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program, when executed by a processor, implements the steps of any of the methods described above.

[0045] In another aspect of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of any of the methods described above.

[0046] The present invention provides a model training method, content recommendation method, apparatus, and electronic device. For each application, a first training model is trained using the second user attribute features of sample users in that application to predict the weights of sample users in that application. The predicted weights are then used to adjust the sparse features of a second training model. Finally, the first and second training models are trained by comprehensively using the first user attribute features, sample content attribute features, sample context features, and behavioral tags corresponding to sample users from different applications that are associated with the same content database. Because it comprehensively trains the first and second training models by utilizing the first user attribute features, sample content attribute features, sample context features, and corresponding behavioral tags of sample users from different applications that are associated with the same content database, it achieves sufficient training for both models. Furthermore, for different applications, the first training model uses the second user attribute features of sample users in that application to predict the weights of sample users in that application, and uses these predicted weights to adjust the sparse features of the second training model. This allows the second training model to more accurately match the interests and preferences of sample users in that application, capture the biases of different users, and thus make the prediction of sample users' content operation information more accurate and targeted. This achieves the goal of using different second models to predict the content operation of different users in different applications, realizing a personalized model for each user, and enabling more accurate content recommendations for users. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0048] Figure 1 This is a schematic diagram of a model training method in an embodiment of the present invention;

[0049] Figure 2 This is a schematic diagram of another model training method in an embodiment of the present invention;

[0050] Figure 3 This is a schematic diagram of the architecture of the model in an embodiment of the present invention;

[0051] Figure 4 This is a schematic diagram of another architecture of the model in an embodiment of the present invention;

[0052] Figure 5 This is a flowchart illustrating a content recommendation method in an embodiment of the present invention;

[0053] Figure 6 This is a schematic diagram of a model training device in an embodiment of the present invention;

[0054] Figure 7 This is a schematic diagram of a content recommendation device in an embodiment of the present invention;

[0055] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0056] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.

[0057] Taking video as an example, in the field of video recommendation, short video recommendation systems usually have multiple branch entry points, such as application A, application B, etc. Each branch application corresponds to a scenario. The videos in different scenarios may be the same. Therefore, there may be overlapping video information and differences in user information in different scenarios. This phenomenon is particularly obvious in short video scenarios because user behavior data in short video scenarios exhibits a long-tail distribution.

[0058] In related technologies, ranking models are trained separately for different scenarios, which results in high training costs. Furthermore, since the ranking model is trained for a single scenario, there is a problem of small traffic in small scenarios, which limits the number of samples used for training. This may lead to insufficient training of the ranking model, thereby affecting the video recommendation results.

[0059] To achieve fully trained models and accurate content recommendations for users, embodiments of the present invention provide a model training method, a content recommendation method, a device, and an electronic device. The model training method and content recommendation method provided by these embodiments can be applied to content recommendation scenarios. The content can be any type of multimedia content, such as video, audio, images, or text. Preferably, it can be applied to short video recommendation scenarios. Short videos can be short videos from any application, such as short videos from application A, short videos from application B, etc., implemented by an electronic device, which can be, for example, a client or a server.

[0060] The following is a detailed description of a model training method provided by an embodiment of the present invention:

[0061] like Figure 1 As shown, Figure 1 This is a schematic flowchart of a model training method in an embodiment of the present invention. The method includes:

[0062] S101, obtain the first user attribute features of sample users under different applications associated with the same content database, the sample content attribute features of sample content accessed by sample users, and the sample context features when sample users access sample content.

[0063] Among them, each sample user has a corresponding behavioral label, which is used to represent the actual operational information of the sample user when accessing the sample content, and the sample context features are used to characterize the environmental features when the sample user accesses the sample content.

[0064] S102, for each application, obtain the second user attribute features of the sample users under that application.

[0065] S103, input the second user attribute features of the sample users under the application into the first model to be trained for weight prediction, and obtain the predicted weights of the sample users under the application.

[0066] S104. Input the first user attribute features, sample content attribute features, and sample context features of the sample users into the second training model. Use prediction weights to adjust the sparse features of the second training model and perform behavior prediction on the sample users to obtain the predicted behavior labels of the sample users for the sample content under the application.

[0067] S105, calculate the loss of the second model to be trained based on the behavior label and the predicted behavior label, and adjust the parameters of the first model to be trained and the second model to be trained based on the loss.

[0068] The model training method provided in this embodiment of the invention is used to train a first training model for each application by using the second user attribute features of sample users in that application to predict the weights of sample users in that application. The predicted weights are then used to adjust the sparse features of the second training model. Finally, the first and second training models are trained by comprehensively using the first user attribute features, sample content attribute features, sample context features, and behavioral labels of sample users in different applications that are associated with the same content database. Because it comprehensively trains the first and second training models by utilizing the first user attribute features, sample content attribute features, sample context features, and corresponding behavioral tags of sample users from different applications that are associated with the same content database, it achieves sufficient training for both models. Furthermore, for different applications, the first training model uses the second user attribute features of sample users in that application to predict the weights of sample users in that application, and uses these predicted weights to adjust the sparse features of the second training model. This allows the second training model to more accurately match the interests and preferences of sample users in that application, capture the biases of different users, and thus make the prediction of sample users' content operation information more accurate and targeted. This achieves the goal of using different second models to predict the content operation of different users in different applications, realizing a personalized model for each user, and enabling more accurate content recommendations for users.

[0069] In another embodiment, see Figure 2 , Figure 2 This is another flowchart illustrating the model training method in an embodiment of the present invention. The method includes the following steps:

[0070] S201, obtain the first user attribute features of sample users under different applications associated with the same content database, the sample content attribute features of sample content accessed by sample users, and the sample context features when sample users access sample content.

[0071] In this embodiment of the invention, user operation data on content in different applications can be stored in the same content database, and a single operation data point of any user on any content in different applications can be used as a training sample. In one example, log data of user operations on any content can be read from the content recommendation system of an electronic device, and feature data of user operations on content in different applications can be extracted from the log data to obtain the first user attribute features of sample users in different applications associated with the same content database, the sample content attribute features of sample content accessed by the sample users, and the sample context features when the sample users accessed the sample content. Alternatively, the already obtained first user attribute features of sample users in different applications associated with the same content database, the sample content attribute features of sample content accessed by the sample users, and the sample context features when the sample users accessed the sample content can be read from other devices.

[0072] Each sample user is associated with a behavioral label, which represents the actual actions performed by the user when accessing the sample content, such as clicking, watching, commenting, and liking. Sample context features characterize the environmental factors that influence the user's access to the sample content, such as time, location, and weather.

[0073] In one possible implementation, the first user attribute features of sample users across different applications may include at least one of the following: the user's user ID (identifier), age, gender, VIP (Very Important Person) attribute, login attribute, viewing history behavior attribute, click history behavior attribute, and long-term profile, short-term profile, etc. The user ID can be represented by numbers, codes, or the user's name, etc. The VIP attribute indicates whether the user is a VIP user; the login attribute indicates whether the user is logged in; the viewing history behavior attribute can be information about content accessed by the user within a preset time period before the current time, such as content IDs, etc. The preset time period can be set according to actual conditions, such as one hour, one day, or one week, etc. The click history behavior attribute can be information about content clicked by the user the most recently preset number of times, such as content IDs, etc. The preset number can be set according to actual conditions, such as 30 times, 50 times, or 80 times, etc. The long-term profile is used to represent the user's long-term interests and can be determined based on the user's long-term content access behavior data. This long-term period can, for example, represent the time period after the user's first access to the content, or a corresponding time period such as one year, two years, or ten years. Short-term profiles are used to represent a user's short-term interests. They can be determined based on the user's content access behavior data within a short period of time, such as an hour, a week, or a month.

[0074] The sample content attribute characteristics of sample content accessed by sample users under different applications may include at least one of the following: content ID, content type, content uploader (uploader, UP master) ID, and content uploader attributes. The content ID can be represented by numbers, codes, or the content name. The content type may be, for example, a TV series, movie, children's content, variety show, comedy, horror movie, etc. The content uploader ID can be represented by numbers, codes, or the content uploader's name. Content uploader attributes may include: the content uploader's age, gender, number of uploads, popularity, click-through rate, and view rate, etc.

[0075] The sample context features when sample users access sample content under different applications may include at least one of the following: holidays, time, location, season, weather, etc., which represent the environmental features when sample users access sample content.

[0076] The behavioral tags corresponding to the sample users may include at least one of the following: click-through rate, viewing time, comment rate, like rate, and completion rate. These behavioral tags can be obtained by statistically analyzing and converting the actual operation information of the sample users on the sample content. For example, the click-through rate can be determined by the sample users' clicks on the sample content, and the viewing time and completion rate can be determined by the sample users' viewing and commenting on the sample content, etc.

[0077] In this embodiment of the invention, the first user attribute features of sample users under different applications associated with the same content database, the sample content attribute features of sample content accessed by sample users, and the sample context features when sample users access sample content are used to better integrate user-side, content-side, and contextual features under different applications during model training, thereby achieving sufficient model training and enabling more accurate content recommendations for users.

[0078] S202, For each application, obtain the second user attribute features of the sample users in that application.

[0079] For different applications, the second user attribute features of sample users under each application are obtained separately. The second user attribute features of sample users represent the attributes of sample users under each application. In one possible implementation, the second user attribute features may include at least one of the following: scene ID, average playback time per person in the scene, VIP attribute, login attribute, viewing history behavior attribute, click history behavior attribute, and long-term profile, short-term profile, etc. The scene ID can be represented by numbers, codes, characters, or the name of the application, etc. The average playback time per person in the scene represents the average time spent accessing content in that application. In this embodiment of the invention, one application corresponds to one scene.

[0080] S203, input the second user attribute features of the sample users under the application into the first model to be trained for weight prediction, and obtain the predicted weights of the sample users under the application.

[0081] For each application, the second user attribute features of the sample users in that application are used as the input of the first model to be trained, and the weights of the sample users in that application are predicted to obtain the predicted weights of the sample users in that application.

[0082] S204. Input the first user attribute features, sample content attribute features, and sample context features of the sample users into the second model to be trained. Concatenate the first user attribute features, sample content attribute features, and sample context features of the sample users to obtain the sparse features of the second model to be trained. Use the prediction weights as the embedding weights of the sparse features of the second model to be trained to predict the behavior of the sample users and obtain the predicted behavior labels of the sample users for the sample content under the application.

[0083] In one possible implementation, the first and second training models have the same structure. For example, both the first and second training models are M-layer DNNs (Deep Neural Networks) or convolutional neural networks, where M refers to the number of hidden layers in the model. M is a positive integer that can be set according to actual needs, such as 3 layers, 5 layers, etc. The identical structure of the first and second training models saves training time.

[0084] A user's action on a piece of content within an application is considered a training sample. For each application, the first user attribute features, sample content attribute features, and sample context features of sample users obtained from different applications associated with the same content database are used as input to the second model to be trained. The first user attribute features, sample content attribute features, and sample context features of the sample users are concatenated to obtain the sparse features of the second model to be trained. The prediction weights obtained for this application are used as the embedding weights of the sparse features of the second model to achieve scene alignment for the application, so as to predict the behavior of the sample users and obtain the predicted behavior labels of the sample users for the sample content in this application.

[0085] The first user attribute feature represents the user-side features, the sample content attribute feature represents the content-side features of the sample content accessed by the sample user, and the sample context feature represents the environmental features when the sample user accesses the sample content. The user-side features, content-side features, and environmental features are fused to fully fit the interests and preferences of the sample user. Then, the predicted weights of the sample user under different applications are combined with the predicted weights and used as the embedding weights of the sparse features of the second model to be trained, so as to achieve the effect of aligning the feature expressions under different applications. In this way, based on the interests and preferences of the sample user, the predicted behavior labels of the sample user for the sample content under different applications can be predicted more accurately.

[0086] S205, calculate the loss of the second model to be trained based on the behavior label and the predicted behavior label, and adjust the parameters of the first model to be trained and the second model to be trained based on the loss.

[0087] In this embodiment of the invention, the second model to be trained is used as the main model and the first model to be trained is used as the sub-model. The sub-model is trained by using scene IDs from different applications, average playback time per scene, VIP attributes, login attributes, viewing history behavior attributes, click history behavior attributes of sample users, as well as long-term profiles and short-term profiles. The weights predicted by the sub-model are then used as the embedding weights of the sparse features of the main model, and the main model and the sub-model are trained simultaneously.

[0088] During model training, the loss of the second model to be trained is calculated based on the behavior labels and the predicted behavior labels output by the second model to be trained. Then, the parameters of the first and second models to be trained are adjusted according to the loss until the preset termination condition is met, and the trained first and second models are obtained.

[0089] The preset termination condition can be a pre-set number of iterations or the loss reaching a pre-set loss threshold.

[0090] For example, see Figure 3 , Figure 3 This is a schematic diagram of one architecture of the model in an embodiment of the present invention. Figure 3 As shown, the first and second models to be trained have the same structure, both containing three hidden layers. Figure 3 The first training model is represented by three activation function layers, and the second training model is represented by a sparse feature embedding layer and two activation function layers. For each application, the application's scene ID, average playback time per user in the scene, and the VIP attributes, login attributes, viewing history behavior attributes, click history behavior attributes, long-term profiles, and short-term profiles of sample users in the application are used as inputs to the first training model to predict the weights of sample users in that application. The first user attribute features, sample content attribute features, and sample context features of sample users from different applications associated with the same content database are used as inputs to the second training model. The first user attribute features, sample content attribute features, and sample context features are concatenated to obtain the sparse features of the second training model. The prediction weights obtained from the first training model are used as the embedding layer weights of the sparse features of the second training model to predict the behavior of sample users. Figure 3 The first and second training models are trained by measuring click-through rate, comment rate, viewing time, like rate, and completion rate.

[0091] See Figure 4 , Figure 4 This is a schematic diagram of another architecture of the model in an embodiment of the present invention. For example... Figure 4 As shown, training samples are generated using the first user attribute features, sample context features, and sample content attribute features of sample users from different applications associated with the same content database. These training samples are then used to train a deep network model. Figure 4 (Training the first model) to train the second model to be trained.

[0092] The model training method provided in this invention utilizes the first user attribute features, sample content attribute features, sample context features, and corresponding behavioral tags of sample users from different applications associated with the same content database to comprehensively train both the first and second training models. This achieves sufficient training for both models. Furthermore, for different applications, the first training model uses the second user attribute features of sample users within that application to predict their weights. These predicted weights are then used to adjust the sparse features of the second training model, enabling it to more accurately match the interests and preferences of sample users within that application, capturing the biases of different users. This results in more accurate and targeted predictions of user actions related to content. This achieves the goal of using different second models to predict content actions for different users in different applications, realizing personalized content recommendations. It effectively improves the efficiency of business development related to model training across different applications, saves hardware resources, and enhances content consumption metrics and user experience across different applications. Simultaneously, it eliminates the need to train ranking models separately for different applications, reducing training costs and solving the problem of cross-application model training.

[0093] See Figure 5 , Figure 5 This is a flowchart illustrating a content recommendation method in an embodiment of the present invention. The method includes the following steps:

[0094] S501, Obtain the target user attribute characteristics of the target user in the target application.

[0095] In one possible implementation, the target user attribute features of the target user in the target application may include at least one of the following: scene ID, average playback time per person in the scene, VIP attribute, login attribute, viewing history behavior attribute, click history behavior attribute, long-term profile, and short-term profile.

[0096] In one example, for the target user (the object of recommended content) within a target application, we can obtain the application's scene ID, the average playback time per user within that scene, and attribute information such as whether the target user is a VIP user, logged in, content accessed within the past week or month, content clicked in the last 50 times, and long-term and short-term interests. This yields the target user attribute characteristics within the target application. For instance, we can obtain the target user's log information from an electronic device's application and extract the target user attribute characteristics from the log information. The electronic device's application could be a video playback application, for example.

[0097] S502, for each piece of content to be sorted, obtain the candidate user attribute features, candidate content attribute features, and candidate context features corresponding to that piece of content to be sorted.

[0098] The content to be sorted can be any content to be recommended to the target user, or any content that has not yet been sorted and is recalled during the content retrieval / recommendation process.

[0099] In one possible implementation, the candidate user attribute features corresponding to the content to be sorted represent the user attribute features statistically analyzed for the content to be sorted. These candidate user attribute features may include at least one of the following: user click-through rate, average playback duration, and like rate. The candidate content attribute features corresponding to the content to be sorted are the content features of the content to be sorted. These candidate content attribute features may include at least one of the following: content ID, content type, content uploader ID, and content uploader attributes. The candidate context features corresponding to the content to be sorted characterize the current environmental features. These candidate context features may include at least one of the following: current time, location, weather, and network environment.

[0100] It is understandable that user click-through rate, average playback duration, like rate, content uploader attributes, and current time, location, weather, network environment, etc., are dynamic and change over different time periods. Correspondingly, the candidate user attribute characteristics, candidate content attribute characteristics, and candidate context characteristics of the content to be sorted are also different over different time periods.

[0101] S503, input the target user attribute features into the pre-trained first model for weight prediction, and obtain the target prediction weight of the target user in the target application.

[0102] S504, for each content to be sorted, the candidate user attribute features, candidate content attribute features and candidate context features corresponding to the content to be sorted are input into the pre-trained second model. The sparse features of the second model are adjusted using the target prediction weights to predict the behavior of the target user and obtain the target behavior label of the target user in the target application for the content to be sorted.

[0103] The target behavior label represents the actual operational information of the target user on the content to be ranked. This target behavior label may include at least one of the following: click-through rate, viewing duration, comment rate, like rate, and completion rate. The pre-trained first model is obtained by training the first model to be trained using the aforementioned model training method, and the pre-trained second model is obtained by training the second model to be trained using the aforementioned model training method.

[0104] In one possible implementation, the method of adjusting the sparse features of the second model using target prediction weights includes:

[0105] The candidate user attribute features, candidate content attribute features, and candidate context features corresponding to the content to be ranked are concatenated to obtain the sparse features of the second model.

[0106] The target prediction weights are used as the embedding weights for the sparse features of the second model.

[0107] S505: Calculate the score for each item to be sorted based on the target behavior labels.

[0108] In one example, rules for calculating scores can be set, and these rules are used to calculate the scores for each item to be ranked. For instance, a score-to-score table can be set up, containing score values ​​corresponding to different click-through rate (CTR), viewing duration (VLT), comment rate, like rate, and completion rate (CTR) intervals. Then, by looking up the table, the score values ​​corresponding to the CTR, VLT, comment rate, like rate, and CTR for each target behavior tag are determined. Finally, the sum, average, or weighted sum of these score values ​​is calculated to obtain the score for the item to be ranked. Of course, this embodiment of the invention only illustrates the calculation of scores for items to be ranked using a table lookup method; in practical applications, the methods for calculating the scores of each item to be ranked are not limited to this.

[0109] S506: Sort each item to be sorted according to its score, and recommend target content to the target user based on the sorting results.

[0110] For example, the content to be sorted can be sorted in descending order of score, and the top N content can be used as the target content to be recommended. Alternatively, content with a score greater than a preset threshold can be used as the target content to be recommended and recommended to the target user.

[0111] The content recommendation method provided in this invention utilizes the target user attribute features of the target user in the target application. A first model with trained prediction weights is used to predict the target user's weight within the target application. Then, the predicted target weights are used to align the sparse features of a second model trained to predict the target user's actual content operation information with the corresponding application scenario. This allows the adjusted second model to more accurately match the target user's interests and preferences within the target application, resulting in more accurate and targeted predictions of the target user's content operation information. This achieves the goal of using different second models to predict content operations for different users in different applications, realizing a personalized approach for each user. This enables more accurate content recommendations and improves content consumption metrics and user experience across different applications.

[0112] Corresponding to the above method embodiments, the present invention also provides corresponding device embodiments.

[0113] like Figure 6 As shown, Figure 6 This is a schematic diagram of a model training device according to an embodiment of the present invention. The model training device according to this embodiment includes:

[0114] The first data acquisition module 601 is used to acquire the first user attribute features of sample users under different applications associated with the same content database, the sample content attribute features of sample content accessed by the sample users, and the sample context features when the sample users access the sample content. The sample users have corresponding behavior tags, which are used to represent the actual operation information of the sample users when accessing the sample content, and the sample context features are used to characterize the environmental features when the sample users access the sample content.

[0115] The second data acquisition module 602 is used to acquire the second user attribute features of sample users in each application.

[0116] The first weight prediction module 603 is used to input the second user attribute features of the sample users under the application into the first model to be trained to perform weight prediction and obtain the predicted weights of the sample users under the application.

[0117] The first behavior prediction module 604 is used to input the first user attribute features, sample content attribute features and sample context features of the sample user into the second training model, adjust the sparse features of the second training model using prediction weights, perform behavior prediction on the sample user, and obtain the predicted behavior label of the sample user for the sample content under the application.

[0118] The model training module 605 is used to calculate the loss of the second model to be trained based on the behavior label and the predicted behavior label, and to adjust the parameters of the first model to be trained and the second model to be trained based on the loss.

[0119] Using the model training apparatus provided in this embodiment of the invention, for each application, a first training model is trained using the second user attribute features of sample users under that application to predict the weights of sample users under that application. The predicted weights are then used to adjust the sparse features of the second training model. Finally, the first and second training models are trained by comprehensively using the first user attribute features, sample content attribute features, sample context features, and behavioral labels corresponding to sample users under different applications that are associated with the same content database. Because it comprehensively trains the first and second training models by utilizing the first user attribute features, sample content attribute features, sample context features, and corresponding behavioral tags of sample users from different applications that are associated with the same content database, it achieves sufficient training for both models. Furthermore, for different applications, the first training model uses the second user attribute features of sample users in that application to predict the weights of sample users in that application, and uses these predicted weights to adjust the sparse features of the second training model. This allows the second training model to more accurately match the interests and preferences of sample users in that application, capture the biases of different users, and thus make the prediction of sample users' content operation information more accurate and targeted. This achieves the goal of using different second models to predict the content operation of different users in different applications, realizing a personalized model for each user, and enabling more accurate content recommendations for users.

[0120] In one possible implementation, the first user attribute features include: the user ID, age, gender, VIP attribute, login attribute, viewing history behavior attribute, click history behavior attribute, and at least one of long-term profile and short-term profile of the sample user; the sample content attribute features include: at least one of content ID, content type, content uploader ID, and content uploader attribute; the sample context features include: at least one of holidays, time, location, season, and weather.

[0121] In one possible implementation, the aforementioned behavioral tags include at least one of the following: click-through rate, viewing duration, comment rate, like rate, and completion rate; the aforementioned second user attribute features include at least one of the following: scene ID, average viewing duration per person in the scene, VIP attribute, login attribute, viewing history behavior attribute, click history behavior attribute, and long-term profile and short-term profile of the sample user.

[0122] In one possible implementation, the above-mentioned adjustment of the sparse features of the second model to be trained using prediction weights includes:

[0123] The first user attribute features, sample content attribute features, and sample context features of the sample users are concatenated to obtain the sparse features of the second model to be trained.

[0124] The prediction weights are used as the embedding weights for the sparse features of the second model to be trained.

[0125] In one possible implementation, the first model to be trained has the same structure as the second model to be trained.

[0126] like Figure 7 As shown, Figure 7 This is a schematic diagram of a content recommendation device according to an embodiment of the present invention. The content recommendation device according to an embodiment of the present invention includes:

[0127] The third data acquisition module 701 is used to acquire the target user attribute characteristics of the target user in the target application.

[0128] The fourth data acquisition module 702 is used to acquire, for each piece of content to be sorted, the candidate user attribute features, candidate content attribute features and candidate context features corresponding to that content.

[0129] The second weight prediction module 703 is used to input the target user attribute features into the pre-trained first model to perform weight prediction, and obtain the target predicted weight of the target user in the target application.

[0130] The second behavior prediction module 704 is used to input the candidate user attribute features, candidate content attribute features, and candidate context features corresponding to each content to be sorted into a pre-trained second model, adjust the sparse features of the second model using target prediction weights, and predict the behavior of the target user to obtain the target behavior label of the target user in the target application for the content to be sorted; wherein, the target behavior label is used to represent the actual operation information of the target user for the content to be sorted; the pre-trained first model and the pre-trained second model are trained using the above model training method;

[0131] The scoring calculation module 705 is used to calculate the score of each item to be sorted based on each target behavior label;

[0132] The content recommendation module 706 is used to sort each piece of content to be sorted according to its score, and recommend target content to the target user based on the sorting results.

[0133] The content recommendation device provided in this invention utilizes the target user attribute features of the target user in the target application. A first model with trained prediction weights predicts the weight of the target user in the target application. Then, using the predicted target weights, the sparse features of a second model trained to predict the target user's actual content operation information are aligned with the application's corresponding scene. This allows the adjusted second model to more accurately match the target user's interests and preferences in the target application, resulting in more accurate and targeted predictions of the target user's content operation information. This achieves the goal of using different second models to predict content operations for different users in different applications, realizing a personalized model for each user. This enables more accurate content recommendations and improves content consumption metrics and user experience across different applications.

[0134] In one possible implementation, the target user attribute features include: scene ID, average playback time per user in the scene, target user's VIP attribute, login attribute, viewing history behavior attribute, click history behavior attribute, and at least one of long-term profile and short-term profile; the candidate user attribute features include: user click-through rate, average playback time, and like rate; the candidate content attribute features include: content ID, content type, content uploader ID, and at least one of content uploader attribute; the candidate context features include: current time, location, weather, and network environment; the target behavior tags include: click-through rate, viewing time, comment rate, like rate, and completion rate.

[0135] In one possible implementation, the above-mentioned adjustment of the sparse features of the second model using target prediction weights includes:

[0136] The candidate user attribute features, candidate content attribute features, and candidate context features corresponding to the content to be ranked are concatenated to obtain the sparse features of the second model.

[0137] The target prediction weights are used as the embedding weights for the sparse features of the second model.

[0138] This invention also provides an electronic device, such as... Figure 8As shown, it includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804. The processor 801, communication interface 802, and memory 803 communicate with each other via the communication bus 804.

[0139] Memory 803 is used to store computer programs;

[0140] When the processor 801 executes the program stored in the memory 803, it implements the steps of any of the above method embodiments to achieve the same technical effect.

[0141] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0142] The communication interface is used for communication between the aforementioned terminal and other devices.

[0143] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0144] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0145] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of any of the methods described in the above embodiments to achieve the same technical effect.

[0146] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform the steps of any of the methods described in the above embodiments to achieve the same technical effect.

[0147] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).

[0148] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0149] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device / electronic device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0150] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.

Claims

1. A model training method, characterized in that, The method comprises: obtaining first user attribute features of sample users in different application programs associated with a same content database, sample content attribute features of sample contents accessed by the sample users, and sample context features of the sample users when accessing the sample contents, the sample users corresponding to behavior labels, the behavior labels being used to represent actual operation information of the sample users accessing the sample contents, and the sample context features being used to represent environmental features of the sample users when accessing the sample contents; for each application program, obtaining second user attribute features of the sample users in the application program; inputting the second user attribute features of the sample users in the application program into a first to-be-trained model to perform weight prediction, to obtain predicted weights of the sample users in the application program; inputting the first user attribute features of the sample users, the sample content attribute features, and the sample context features into a second to-be-trained model, adjusting sparse features of the second to-be-trained model by using the predicted weights, and performing behavior prediction on the sample users to obtain predicted behavior labels of the sample users in the application program for the sample contents; calculating a loss of the second to-be-trained model according to the behavior labels and the predicted behavior labels, and adjusting parameters of the first to-be-trained model and the second to-be-trained model according to the loss.

2. The method of claim 1, wherein, The first user attribute features comprise at least one of a user ID, an age, a gender, a VIP attribute, a login attribute, a viewing history behavior attribute, a clicking history behavior attribute, and long-term portrait and short-term portrait of the sample users; the sample content attribute features comprise at least one of a content ID, a content type, a content upload user ID, and a content upload user attribute; and the sample context features comprise at least one of a holiday, a time, a location, a season, and weather.

3. The method of claim 1, wherein, The behavior labels comprise at least one of a click rate, a viewing time length, a comment rate, a like rate, and a complete play rate; and the second user attribute features comprise at least one of a scene ID, a scene average play time length, the VIP attribute, the login attribute, the viewing history behavior attribute, the clicking history behavior attribute, the long-term portrait, and the short-term portrait of the sample users.

4. The method according to any of claims 1 to 3, characterized in that, The adjusting of the sparse features of the second to-be-trained model by using the predicted weights comprises: splicing the first user attribute features of the sample users, the sample content attribute features, and the sample context features to obtain sparse features of the second to-be-trained model; using the predicted weights as Embedding weights of the sparse features of the second to-be-trained model.

5. The method of claim 1, wherein, The first to-be-trained model and the second to-be-trained model have the same structure.

6. A content recommendation method characterized by, The method comprises: obtaining target user attribute features of target users in a target application program; for each to-be-ordered content, obtaining candidate user attribute features, candidate content attribute features, and candidate context features corresponding to the to-be-ordered content; inputting the target user attribute feature into a pre-trained first model to perform weight prediction, to obtain a target predicted weight of the target user in the target application program; For each to-be-ordered content, input the candidate user attribute feature, the candidate content attribute feature, and the candidate context feature corresponding to the to-be-ordered content into a pre-trained second model, adjust the sparse features of the second model by using the target predicted weight, perform behavior prediction on the target user, and obtain a target behavior label of the target user in the target application program for the to-be-ordered content; wherein the target behavior label is used to represent actual operation information of the target user on the to-be-ordered content; the pre-trained first model and the pre-trained second model are trained by using any one of the methods in claims 1-5; based on each target behavior label, calculate the score of each to-be-ordered content; According to the score, sort each to-be-ordered content, and according to the sorting result, recommend target content to the target user.

7. The method of claim 6, wherein, The target user attribute feature includes: scene ID, scene per capita play time, at least one of the target user's VIP attribute, login attribute, viewing history behavior attribute, click history behavior attribute, and long-term portrait, short-term portrait; the candidate user attribute feature includes: user click rate, average play time, and at least one of the like rate; the candidate content attribute feature includes: content ID, content type, content upload user ID, and at least one of the content upload user attribute; the candidate context feature includes: at least one of the current time, location, weather, and network environment; the target behavior label includes: at least one of the click rate, viewing time, comment rate, like rate, and completion rate.

8. The method according to claim 6 or 7, characterized in that, The adjustment of the sparse features of the second model by using the target predicted weight includes: Splice the candidate user attribute feature, the candidate content attribute feature, and the candidate context feature corresponding to the to-be-ordered content to obtain the sparse features of the second model; The target predicted weight is used as the Embedding weight of the sparse features of the second model.

9. A model training apparatus characterized by comprising: The device includes: A first data acquisition module is configured to acquire first user attribute features of sample users associated with different application programs of a same content database, sample content attribute features of sample contents visited by the sample users, and sample context features when the sample users visit the sample contents, wherein the sample users correspond to behavior labels, the behavior labels are used to represent actual operation information of the sample users visiting the sample contents, and the sample context features are used to represent environmental features when the sample users visit the sample contents; A second data acquisition module is configured to acquire, for each application program, second user attribute features of the sample users under the application program; A first weight prediction module is configured to input the second user attribute features of the sample users under the application program into a first to-be-trained model to perform weight prediction, to obtain predicted weights of the sample users under the application program; The first behavior prediction module is configured to input the first user attribute feature of the sample user, the sample content attribute feature, and the sample context feature into a second to-be-trained model, adjust sparse features of the second to-be-trained model by using the prediction weight, and perform behavior prediction on the sample user to obtain a predicted behavior label of the sample user for the sample content under the application program. The model training module is configured to calculate a loss of the second to-be-trained model according to the behavior label and the predicted behavior label, and adjust parameters of the first to-be-trained model and the second to-be-trained model according to the loss.

10. A content recommendation apparatus characterized by comprising: The apparatus comprises: The third data acquisition module is configured to acquire a target user attribute feature of a target user in a target application program. The fourth data acquisition module is configured to acquire, for each to-be-ordered content, candidate user attribute features, candidate content attribute features, and candidate context features corresponding to the to-be-ordered content. The second weight prediction module is configured to input the target user attribute feature into a pre-trained first model to perform weight prediction and obtain a target prediction weight of the target user in the target application program. The second behavior prediction module is configured to input, for each to-be-ordered content, the candidate user attribute features, the candidate content attribute features, and the candidate context features corresponding to the to-be-ordered content into a pre-trained second model, adjust sparse features of the second model by using the target prediction weight, perform behavior prediction on the target user, and obtain a target behavior label of the target user for the to-be-ordered content in the target application program. The target behavior label is used to represent actual operation information of the target user for the to-be-ordered content. The pre-trained first model and the pre-trained second model are obtained by training according to any one of the methods in claims 1-5. The score calculation module is configured to calculate scores of the to-be-ordered contents based on the target behavior labels. The content recommendation module is configured to sort the to-be-ordered contents according to the scores, and recommend target contents to the target user according to a sorting result.

11. An electronic device, comprising: The apparatus comprises a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory perform mutual communication through the communication bus. The memory is configured to store a computer program. The processor is configured to execute the program stored on the memory to implement the method steps in any one of claims 1-8.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method steps in any one of claims 1-8. The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the method steps in any one of claims 1-8.

Citation Information

Patent Citations

  • Video SAR moving target detection method in complex scene

    CN115311572A

  • Model training method, click rate determination method and related equipment

    CN116304686A