Video recommendation method and device, equipment and storage medium
By dividing video interest types and adjusting the recommendation degree in the rough sorting stage of the recommendation system, the information cocoon effect is solved, the diversity of the recommendation system and the improvement of user experience are achieved, and the recommendation of niche content and the comprehensive satisfaction of user interests are ensured.
Patent Information
- Application Number
- CN202510850981.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-19
AI Technical Summary
Existing recommendation systems are prone to leading to the information cocoon effect, overfitting users' historical behavior, ignoring users' potential interest expansion needs, resulting in a gradual narrowing of content scope and limiting users' opportunities to obtain diverse information.
By dividing videos into key interest videos and non-key interest videos in the rough ranking stage, and using interest type weight parameters to dynamically adjust the initial recommendation degree of the video, the recommendation degree of key interest videos is appropriately reduced, while the recommendation degree of non-key interest videos is appropriately increased, ensuring the recommendation of niche and diverse content.
It avoids the recommendation system's excessive concentration on popular content, improves the diversity of the recommendation system and user experience, stimulates users' desire to explore, and enhances users' stickiness and satisfaction on the platform.
Smart Images

Figure CN120676209A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of recommendation systems, and in particular to a video recommendation method and device, an electronic device, and a storage medium. Background Art
[0002] With the widespread adoption of recommendation systems across various content distribution platforms (such as short videos, music, news, and shopping), optimizing user experience and platform ecosystems has become a core goal of system design. Recommendation systems typically consist of four stages: recall, rough sorting, fine sorting, and re-ranking. Through layer-by-layer screening and sorting, they match user interests with massive amounts of content and provide high-quality recommendations.
[0003] However, the design of recommendation systems in related technologies generally suffers from a significant problem: overfitting to users' historical behavior, focusing on satisfying their frequent historical interests while ignoring their potential to expand their interests. This flaw gradually narrows the range of content users are exposed to, creating the so-called "information cocoon" effect, which limits users' access to diverse information. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a video recommendation method to avoid the information cocoon of video recommendation and improve the diversity of the recommendation system. The specific technical solution is as follows:
[0005] In a first aspect of the present invention, a method for recommending a video is provided, the method comprising:
[0006] Obtaining initial recommendation degrees of at least two videos, where the initial recommendation degrees are initial recommendation degrees of the videos generated according to a preset model;
[0007] Get the user's historical video viewing data;
[0008] Determining an interest type weight parameter of the video based on the historical video viewing data of the user; the interest type weight parameter includes a key interest weight parameter of a key interest video and a non-key interest weight parameter of a non-key interest video, the non-key interest weight parameter being greater than the key interest weight parameter, the key video being a video whose degree of user interest is higher than or equal to a first preset threshold, the non-key video being a video whose degree of user interest is lower than or equal to a second preset threshold, and the first preset threshold being greater than the second preset threshold;
[0009] Adjusting the initial recommendation degrees of at least two of the videos using the interest type weight parameter to obtain a target recommendation degree;
[0010] The video is recommended according to the target recommendation degree.
[0011] Optionally, determining the interest type weight parameter of the video according to the historical video viewing data of the user includes:
[0012] Building a user profile of the user based on the historical video viewing data;
[0013] Classifying the video into the key interest video and the non-key interest video according to the user portrait;
[0014] The key interest weight parameter and the non-key interest weight parameter are set according to the historical video viewing data.
[0015] Optionally, the adjusting the initial recommendation degrees of the at least two videos by using the interest type weight parameter to obtain a target recommendation degree includes:
[0016] If the video is the key interest video, the product of the key interest weight parameter and the initial recommendation degree corresponding to the video is used as the target recommendation degree of the video;
[0017] If the video is the non-critical interest video, the product of the non-critical interest weight parameter and the initial recommendation degree corresponding to the video is used as the target recommendation degree of the video.
[0018] Optionally, the user has a corresponding user identifier, and constructing a user profile of the user based on the historical video viewing data includes:
[0019] Calculating the user's interest in the video based on the historical video viewing data;
[0020] Determining the video interest type to which the video belongs according to the interest tendency; the video interest type includes the key interest video and the non-key interest video;
[0021] A user profile of the user is constructed based on the user identifier, the interest tendency and the video interest type.
[0022] Optionally, the user's interest level in the video is expressed as an interest percentage, and determining the video interest type to which the video belongs based on the interest tendency includes:
[0023] Calculating the interest percentage according to the interest tendency;
[0024] If the interest percentage is greater than or equal to the first preset threshold, determining the video interest type to which the video belongs as the key interest video;
[0025] If the interest percentage is less than or equal to the second preset threshold, the video interest type to which the video belongs is determined to be the non-key interest video.
[0026] Optionally, the setting of the key interest weight parameter and the non-key interest weight parameter according to the historical video viewing data includes:
[0027] Calculating the initial key weight of the key interest video and the initial non-key weight of the non-key interest video based on the historical video viewing data;
[0028] Obtaining a key inverse document frequency of the key interest video and a non-key inverse document frequency of the non-key interest video, wherein the key inverse document frequency is inversely proportional to the appearance frequency of the key interest video in the historical video viewing data, and the non-key inverse document frequency is inversely proportional to the appearance frequency of the non-key interest video in the historical video viewing data;
[0029] The product of the initial key weight and the key inverse document frequency is used as the key interest weight parameter;
[0030] The product of the initial non-critical weight and the non-critical inverse document frequency is used as the non-critical interest weight parameter.
[0031] Optionally, the preset model is a coarse ranking model, and obtaining the initial recommendation degrees of at least two videos includes:
[0032] Obtaining the video to be screened and the rough sorting model;
[0033] The coarse ranking model is used to calculate the initial recommendation degrees of the videos to be screened, and the videos to be screened are pre-screened according to the initial recommendation degrees to obtain at least two videos and at least two initial recommendation degrees corresponding to the videos.
[0034] In a second aspect of the present invention, a video recommendation device is provided, comprising:
[0035] An initial recommendation degree acquisition module, configured to acquire initial recommendation degrees of at least two videos, wherein the initial recommendation degrees are initial recommendation degrees of the videos generated according to a preset model;
[0036] A historical data acquisition module is used to obtain the user's historical video viewing data;
[0037] An interest weight determination module is configured to determine an interest type weight parameter of the video based on the historical video viewing data of the user; the interest type weight parameter includes a key interest weight parameter of a key interest video and a non-key interest weight parameter of a non-key interest video, the non-key interest weight parameter being greater than the key interest weight parameter, the key video being a video whose degree of user interest is higher than or equal to a first preset threshold, the non-key video being a video whose degree of user interest is lower than or equal to a second preset threshold, and the first preset threshold being greater than the second preset threshold;
[0038] a recommendation degree adjustment module, configured to adjust the initial recommendation degrees of at least two of the videos using the interest type weight parameter to obtain a target recommendation degree;
[0039] The video recommendation module is used to recommend the video according to the target recommendation degree.
[0040] In another aspect of the present invention, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When the computer-readable storage medium is executed on a computer, the computer executes any of the above-mentioned methods for recommending videos.
[0041] In yet another aspect of the present invention, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is enabled to execute any of the above-mentioned methods for recommending videos.
[0042] The video recommendation method provided by the embodiment of the present invention divides videos into key interest videos and non-key interest videos in the rough sorting stage, and dynamically adjusts the initial recommendation degree of the video using the interest type weight parameter, so that the recommendation degree of the key interest video is appropriately reduced, while the recommendation degree of the non-key interest video is appropriately increased. This can avoid the system concentrating all recommendations on the key interests of the user, thereby ensuring that niche and diverse non-key interest videos are recommended, avoiding information cocoons, improving the diversity of the recommendation system, enhancing the user experience, and effectively balancing the concentration and diversity of the recommended videos. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments or the prior art.
[0044] Figure 1 This is a flowchart of a method for recommending a video according to an embodiment of the present invention;
[0045] Figure 2 This is a schematic diagram of a rough arrangement of videos according to an embodiment of a method for recommending videos of the present invention;
[0046] Figure 3 1 is a schematic diagram of a system structure of an embodiment of a video recommendation method of the present invention;
[0047] Figure 4 This is a structural block diagram of an embodiment of a video recommendation device of the present invention;
[0048] Figure 5 It is a structural diagram of a device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
[0050] The video recommendation method shown in the present invention can be applied to a recommendation system, and the recommendation system can be integrated into various content distribution platforms, including but not limited to short video, music, news, shopping and other platforms.
[0051] In an optional embodiment, the recommendation system can be composed of four stages: recall, rough ranking, fine ranking, and re-ranking. Recall is to quickly screen out a batch of items related to the user's interests from a massive candidate set; rough ranking is to perform a preliminary sorting of the large number of candidate items returned in the recall stage to screen out a higher-quality candidate set; fine ranking is to perform a refined sorting of the candidate items screened in the rough ranking stage to generate a final recommendation list; and re-ranking is to adjust and optimize the recommendation list generated in the fine ranking stage to improve diversity, fairness, and user experience.
[0052] The video recommendation method described in this invention can be specifically applied to the rough ranking stage of a recommendation system. After the rough ranking of videos is completed, the video recommendation method of this invention is used to dynamically adjust the initial recommendation level of the videos, thereby encouraging the distribution of content that is of non-critical interest to users, such as mid- to long-tail and niche interests. This allows users' interests to be more comprehensively satisfied, improving the user experience while building a recommendation system with a sound ecosystem.
[0053] Reference Figure 1 , is a flowchart of an embodiment of a video recommendation method of the present invention, comprising the following steps:
[0054] Step 101: Obtain initial recommendation degrees of at least two videos, where the initial recommendation degrees are initial recommendation degrees of the videos generated according to a preset model.
[0055] Step 102: Obtain the user's historical video viewing data.
[0056] Step 103: Determine the interest type weight parameter of the video based on the historical video viewing data of the user; the interest type weight parameter includes a key interest weight parameter of a key interest video and a non-key interest weight parameter of a non-key interest video, the non-key interest weight parameter is greater than the key interest weight parameter, the key video is a video in which the degree of user interest is higher than or equal to a first preset threshold, the non-key video is a video in which the degree of user interest is lower than or equal to a second preset threshold, and the first preset threshold is greater than the second preset threshold.
[0057] Step 104: Use the interest type weight parameter to adjust the initial recommendation degree of at least two of the videos to obtain a target recommendation degree.
[0058] Step 105: Recommend the video according to the target recommendation degree.
[0059] In step 101 of the embodiment of the present invention, the initial recommendation degree of at least two videos is first obtained. In one embodiment, the initial recommendation degree of a video can be the initial recommendation degree of the video calculated by the coarse ranking model of the recommendation system. The video to be screened is input into the coarse ranking model, and the coarse ranking model outputs the coarsely ranked video and the initial recommendation degree corresponding to the video. The initial recommendation degree is the coarse ranking score of the video. The coarse ranking score represents the recommendation degree of the video in the coarse ranking stage, that is, the recommendation degree used for the preliminary sorting of a large number of videos returned in the recall stage in the coarse ranking stage. The recommendation system can further refine and re-rank the video according to the initial recommendation degree, so as to recommend the video to the user. In the embodiment of the present invention, the initial recommendation degree needs to be adjusted, and then the video is recommended according to the target recommendation degree obtained by the adjustment.
[0060] In step 102, historical video viewing data for the user is obtained. In one embodiment, user interaction records with the video are obtained, and behavioral data such as click count, play duration, and dwell time are extracted from the interaction records. This behavioral data is then aggregated for each user by video category. In one example, video categories may include action, comedy, documentary, science fiction, horror, romance, animation, adventure, fantasy, and the like.
[0061] In step 103, based on the user's historical video viewing data, the videos are divided into key interest videos and non-key interest videos. Key interest videos can be high-frequency interest videos, where high-frequency interests are strong and frequent interests that users generally show, and high-frequency interests are usually concentrated on popular or popular content. High-frequency interest videos are videos in which the user's degree of interest is higher than or equal to a first preset threshold; non-key interest videos can be medium- and long-tail interest videos, where medium- and long-tail interests are personalized, niche or low-frequency interests of users, and medium- and long-tail interest videos are videos in which the user's degree of interest is lower than or equal to a second preset threshold, and the first preset threshold is greater than the second preset threshold. The degree of user interest can be represented by an interest percentage. In one embodiment, a user profile for the user can be constructed based on statistics of historical video viewing data, and videos can be divided into key interest videos and non-key interest videos based on the user profile.
[0062] Furthermore, corresponding key interest weight parameters and non-key interest weight parameters are set for key interest videos and non-key interest videos, respectively, wherein the non-key interest weight parameters are greater than the key interest weight parameters. Since the initial recommendation degree of a video calculated by the coarse ranking model in the coarse ranking stage is generally proportional to the user's interest in the video, the higher the user's interest in the video, the higher the initial recommendation degree of the video. Therefore, after adjusting the higher initial recommendation degree with a lower key interest weight parameter, the recommendation degree of the adjusted key interest video can be appropriately reduced, avoiding the clustering of videos of a single user interest, while the recommendation degree of non-key interest videos can be appropriately improved, encouraging the distribution of diverse interests.
[0063] In step 104, the key interest weight parameters and non-key interest weight parameters are used to adjust the initial recommendation degrees of key interest videos and non-key interest videos respectively, so as to obtain the target recommendation degrees of the videos, and the roughly ranked videos are re-sorted according to the target recommendation degrees.
[0064] In step 105, after the target recommendation degree is obtained through adjustment, the videos may be refined and rearranged according to the target recommendation degree, and then the videos may be recommended to the user according to the processing results of the recommendation system.
[0065] The video recommendation method provided by the embodiment of the present invention divides videos into key interest videos and non-key interest videos, and dynamically adjusts the initial recommendation degree of the video using the interest type weight parameter, so that the recommendation degree of the key interest video is appropriately reduced, while the recommendation degree of the non-key interest video is appropriately increased. This can avoid the system concentrating all recommendations on the user's key interests, thereby ensuring that niche and diverse non-key interest videos are recommended, avoiding information cocoons, improving the diversity of the recommendation system, enhancing user experience, and effectively balancing the concentration and diversity of recommended videos.
[0066] The embodiments of the present invention ensure that more diverse content is displayed by increasing the weight of non-critical interest content in recommendations, avoiding the system recommending only popular and common content. In this way, users can discover more content that matches their potential interests, thereby improving the diversity of the recommendation system. The user experience is significantly improved because the recommendation system not only pays attention to the user's general interests, but also stimulates the user's desire to explore through diversified recommendations, thereby enhancing the user's stickiness and satisfaction on the platform. Users can not only browse the popular content they often follow, but also discover unpopular and niche high-quality content, which helps to widely disseminate and diversify the platform's content and improve the breadth and depth of content discovery.
[0067] Optionally, the preset model is a coarse-grained model, and step 101 includes:
[0068] Obtaining the video to be screened and the rough sorting model;
[0069] The coarse ranking model is used to calculate the initial recommendation degrees of the videos to be screened, and the videos to be screened are pre-screened according to the initial recommendation degrees to obtain at least two videos and at least two initial recommendation degrees corresponding to the videos.
[0070] Reference Figure 2 , is a schematic diagram of a rough arrangement of videos according to an embodiment of a video recommendation method of the present invention.
[0071] like Figure 2 As shown in the figure, user_feature, context_feature and item_feature can be used as training samples to train a sorting deep network model, which is used as a coarse sorting model. The coarse sorting model is used to calculate the initial recommendation degree of the video to be screened, and the video to be screened is pre-screened according to the initial recommendation degree, so as to obtain the coarsely sorted videos and the initial recommendation degree corresponding to the videos.
[0072] Among them, user_feature is the user-side feature, which may include the user's age, gender, etc.; context_feature is the context feature, which may include the user's browsing data, etc.; item_feature is the video-side feature, which may include video attributes, etc.
[0073] The embodiment of the present invention roughly ranks the videos to be screened first, and then adjusts the roughly ranked videos and the initial recommendation degrees corresponding to the videos, thereby achieving diversified and comprehensive satisfaction of interests.
[0074] Optionally, step 103 specifically includes:
[0075] Building a user profile of the user based on the historical video viewing data;
[0076] Classifying the video into the key interest video and the non-key interest video according to the user portrait;
[0077] The key interest weight parameter and the non-key interest weight parameter are set according to the historical video viewing data.
[0078] In this embodiment, when determining the interest type weight parameter of a video based on the user's historical video viewing data, a user profile of the user can be first constructed based on the historical video viewing data, and then the videos can be classified into key interest videos and non-key interest videos based on the user profile, thereby further setting the key interest weight parameter corresponding to the key interest video and the non-key interest weight parameter corresponding to the non-key interest video based on the historical video viewing data. In one example, the key interest weight parameter and the non-key interest weight parameter can also be set according to actual needs. For example, the key interest weight parameter can be set to 0.5, and the non-key interest weight parameter can be set to 1.5.
[0079] In the embodiment of the present invention, the key interest weight parameters corresponding to the key interest videos and the non-key interest weight parameters corresponding to the non-key interest videos can be set according to historical video viewing data or actual needs. In addition to achieving the effect of appropriately reducing the recommendation degree of key interest videos and appropriately improving the recommendation degree of non-key interest videos, it is necessary to set the non-key interest weight parameter to be greater than the key interest weight parameter. In the embodiment of the present invention, no restrictions are imposed on the specific values of the key interest weight parameter and the non-key interest weight parameter, and those skilled in the art can set them according to actual needs.
[0080] The embodiment of the present invention constructs a corresponding user portrait for each user and uses the corresponding user portrait to classify videos. It can adjust the initial recommendation degree of different videos for different users, so that the recommendation system can provide highly personalized video content and improve user satisfaction.
[0081] Optionally, the user has a corresponding user identifier, and constructing a user profile of the user based on the historical video viewing data includes:
[0082] Calculating the user's interest in the video based on the historical video viewing data;
[0083] Determining the video interest type to which the video belongs according to the interest tendency; the video interest type includes the key interest video and the non-key interest video;
[0084] A user profile of the user is constructed based on the user identifier, the interest tendency and the video interest type.
[0085] In this embodiment, the specific method of constructing a user portrait may include the following steps: First, based on historical video viewing data, the user's interest tendency for videos is calculated, that is, for each user, the user's interest tendency for videos of different categories is counted.
[0086] In one embodiment, the interest tendency can be calculated using the number of clicks and play time data in the historical video viewing data. For each user, the number of clicks and play time are summarized by video category. Based on the number of clicks and play time, the following formula (1) is used to calculate the interest tendency for the video category for the user.
[0087] Interest tendency = number of clicks × w clicks + playback time × w duration (1)
[0088] Among them, interest tendency is the interest tendency of the video category, number of clicks is the number of clicks the user has made on the videos of this video category, wclick is the historical data weight corresponding to the number of clicks, playback time is the playback time the user has made on the videos of this video category, and wduration is the historical data weight corresponding to the playback time.
[0089] For example, if you need to calculate user A's interest in documentary videos, you need to collect the number of clicks on all documentary videos on the platform and the playback time of all documentary videos on the platform, and set the historical data weights corresponding to the number of clicks and the historical data weights corresponding to the playback time, so as to calculate user A's interest in documentary videos.
[0090] In this example, assume there are videos of type A and type B. For these two different types of videos, a user might click on type A less frequently but play it for a longer time, indicating that the user is likely more interested in type A. Meanwhile, a user might click on type B more frequently but play it for a shorter time, indicating that the user is not particularly interested in type B. Therefore, historical data weights need to be set for different historical video viewing data to achieve a balanced view of the different historical video viewing data.
[0091] In one embodiment, the historical data weight may be set according to the results of AB testing (A / B Testing), or may be set according to actual needs.
[0092] After obtaining the interest propensity, the video's video interest category is determined based on the interest propensity, specifically categorizing the video's video interest category as either a key interest video or a non-key interest video. A user profile is constructed based on the user ID, interest propensity, and video interest category. For example, for a particular user, documentary videos are categorized as key interest videos, action videos are categorized as non-key interest videos, and so on. The user profile is then constructed based on the user ID, the interest propensity corresponding to the video category, and the video categories that fall under key interest and those that fall under non-key interest.
[0093] The embodiment of the present invention calculates the user's interest tendency in different videos, divides the videos into key interest videos or non-key interest videos according to the interest tendency, and constructs user portraits, which can be used to subsequently adjust the initial recommendation degree of different videos for different users, thereby improving user stickiness and satisfaction on the platform through diversified recommended content.
[0094] In one embodiment, after constructing a user profile for a user, videos are classified into key interest videos and non-key interest videos based on the user profile. Specifically, the following steps may be included: obtaining the video interest category in the user profile, and determining whether the video is a key interest video or a non-key interest video based on the video interest category. For example, if the user profile indicates that key interest videos include documentaries and comedies, and non-key interest videos include action films, then if the video is a documentary, the video interest category of the video is determined to be a key interest video.
[0095] The embodiment of the present invention classifies videos into key interest videos and non-key interest videos according to the video interest categories in the user's user portrait, which can be used to subsequently adjust the initial recommendation degree for different videos, so that the weight of non-key interest videos in the recommendation is improved, ensuring that more diverse content is displayed and avoiding the system only recommending popular and common content.
[0096] Optionally, the user's interest level in the video is expressed as an interest percentage, and determining the video interest type to which the video belongs based on the interest tendency includes:
[0097] Calculating the interest percentage according to the interest tendency;
[0098] If the interest percentage is greater than or equal to the first preset threshold, determining the video interest type to which the video belongs as the key interest video;
[0099] If the interest percentage is less than or equal to the second preset threshold, the video interest type to which the video belongs is determined to be the non-key interest video.
[0100] In this embodiment, the specific method for determining the video category of a video based on the interest tendency can first calculate the interest percentage based on the interest tendency. Specifically, the interest tendencies corresponding to all video types are added to obtain the total interest tendency value, and then the ratio of the interest tendency of the target video category to the total interest tendency value is used as the interest percentage of the target video category. Afterwards, the interest percentage of the target video category is compared with the first preset threshold and the second preset threshold to determine whether the video interest category is marked as a key interest video or a non-key interest video, wherein the first preset threshold is greater than the second preset threshold. Specifically, if the interest percentage is greater than or equal to the first preset threshold, the video category is marked as a key interest video; if the interest percentage is less than or equal to the second preset threshold, the video category is marked as a non-key interest video; if the interest percentage is between the first preset threshold and the second preset threshold, the video category is not processed.
[0101] In one example, assuming there are video type A and video type B, and the interest tendency of video type A is 30 and the interest tendency of video type B is 70, then the interest percentage of video type A is 30 ÷ (30 + 70) × 100% = 30%, and the interest percentage of video type B is 70 ÷ (30 + 70) × 100% = 70%. If the first preset threshold is 60% and the second preset threshold is 40%, video type A can be marked as a non-key interest video, and video type B can be marked as a key interest video.
[0102] In one embodiment, historical video viewing data (such as the number of clicks, play time, dwell time, etc.) may also be used to calculate the interest percentage in the same manner.
[0103] The embodiment of the present invention does not limit the specific numerical settings of the first preset threshold and the second preset threshold, and those skilled in the art can set them according to actual needs.
[0104] The embodiment of the present invention calculates the interest percentage and divides the video categories according to the first preset threshold and the second preset threshold, which can be used to subsequently adjust the initial recommendation degree for different videos and improve the diversity of the recommendation system.
[0105] Optionally, the setting of the key interest weight parameter and the non-key interest weight parameter according to the historical video viewing data includes:
[0106] Calculating the initial key weight of the key interest video and the initial non-key weight of the non-key interest video based on the historical video viewing data;
[0107] Obtaining a key inverse document frequency of the key interest video and a non-key inverse document frequency of the non-key interest video, wherein the key inverse document frequency is inversely proportional to the appearance frequency of the key interest video in the historical video viewing data, and the non-key inverse document frequency is inversely proportional to the appearance frequency of the non-key interest video in the historical video viewing data;
[0108] The product of the initial key weight and the key inverse document frequency is used as the key interest weight parameter;
[0109] The product of the initial non-critical weight and the non-critical inverse document frequency is used as the non-critical interest weight parameter.
[0110] In this embodiment, the specific steps of setting the key interest weight parameters and non-key interest weight parameters according to the historical video viewing data are as follows. First, the initial key weights of the key interest videos and the initial non-key weights of the non-key interest videos are calculated according to the historical video viewing data. Taking the calculation using the number of video clicks in the historical video viewing data as an example, the sum of the number of video clicks of the video category corresponding to the key interest video and the number of video clicks of the video category corresponding to the non-key interest video is calculated to obtain the total number of clicks. The initial key weight is the ratio of the number of video clicks of the video category corresponding to the key interest video to the total number of clicks, and the initial non-key weight is the ratio of the number of video clicks of the video category corresponding to the non-key interest video to the total number of clicks. Similarly, other types of historical video viewing data such as viewing time can be used to calculate the initial key weight and the initial non-key weight, or the interest tendency can be used to calculate the initial key weight and the initial non-key weight.
[0111] Since videos in the video category corresponding to key interest videos tend to receive more clicks than videos in the video category corresponding to non-key interest videos, the initial key weight is greater than the initial non-key weight. Therefore, it is necessary to adjust the initial key weight using the key inverse document frequency, and the initial non-key weight using the non-key inverse document frequency. Inverse Document Frequency (IDF) is a statistical metric used to measure the importance of words or interests. Its core concept is that the fewer documents (or users) a word or interest appears in, the stronger its discriminative power and the higher its weight, that is, the higher the inverse document frequency.
[0112] In this embodiment, the key inverse document frequency is inversely proportional to the frequency of occurrence of key interest videos in historical video viewing data, and the non-key inverse document frequency is inversely proportional to the frequency of occurrence of non-key interest videos in historical video viewing data. Therefore, the key inverse document frequency is low and the non-key inverse document frequency is high. After adjusting the initial key weight using the key inverse document frequency, the resulting key interest weight parameter will be lower than the initial key weight; and after adjusting the initial non-key weight using the non-key inverse document frequency, the resulting non-key interest weight parameter will be higher than the initial non-key weight, thereby obtaining the key interest weight parameter and non-key interest weight parameter used to adjust the initial recommendation degree of the video.
[0113] In an embodiment of the present invention, the initial key weight can be adjusted by using the key inverse document frequency, and the initial non-key weight can be adjusted by using the non-key inverse document frequency, so as to reduce the higher initial key weight to the key interest weight parameter and increase the lower initial non-key weight to the non-key interest weight parameter, so that the non-key interest weight parameter satisfies the requirement of being greater than the key interest weight parameter. When the key interest weight parameter and the non-key interest weight parameter are used to adjust the initial recommendation degree of the video, it can be achieved to ensure that niche and diverse non-key interest videos are recommended.
[0114] Optionally, step 104 specifically includes:
[0115] If the video is the key interest video, the product of the key interest weight parameter and the initial recommendation degree corresponding to the video is used as the target recommendation degree of the video;
[0116] If the video is the non-critical interest video, the product of the non-critical interest weight parameter and the initial recommendation degree corresponding to the video is used as the target recommendation degree of the video.
[0117] In this embodiment, the target recommendation degree can be calculated according to the following formula (2).
[0118] Target recommendation degree = initial recommendation degree × interest weight parameter (2)
[0119] That is, if the video is a key interest video, the product of the key interest weight parameter and the initial recommendation degree corresponding to the video will be used as the target recommendation degree of the video; if the video is a non-key interest video, the product of the non-key interest weight parameter and the initial recommendation degree corresponding to the video will be used as the target recommendation degree of the video.
[0120] The embodiment of the present invention obtains the target recommendation degree of the video by adjusting the initial recommendation degree corresponding to the video using a key interest weight parameter or a non-key interest weight parameter. Since the initial recommendation degree of a video is generally proportional to the user's interest in the video, the initial recommendation degree of the key interest video is higher. The initial recommendation degree of the non-key interest video is lower. Therefore, by using a lower key interest weight parameter to adjust the initial recommendation degree of the key interest video, and using a higher non-key interest weight parameter to adjust the initial recommendation degree corresponding to the non-key interest video, it is possible to avoid the clustering of videos of a single interest to the user, and to appropriately improve the recommendation degree of non-key interest videos, thereby encouraging the distribution of diverse interests.
[0121] In order to enable those skilled in the art to further understand the technical solution of the present invention, Figure 3 A video recommendation method of the present invention is described in detail.
[0122] Reference Figure 3 , is a system structure diagram of an embodiment of a video recommendation method of the present invention.
[0123] like Figure 3 As shown in the figure, the videos to be screened are first roughly ranked using a coarse ranking model to obtain the coarsely ranked videos and the corresponding initial recommendation degree (i.e., the original coarse ranking score). The coarse ranking model is composed of multiple ReLU (Rectified Linear Units), only three of which are shown in the figure. By inputting the video ID (Identifier), video attributes, video uploader (Uploader), and uploader attributes into the coarse ranking model, the coarsely ranked videos and the corresponding original coarse ranking score are obtained.
[0124] After obtaining the original coarse ranking score, the original coarse ranking score is adjusted through the user interest module. The user's historical video viewing data, such as the number of clicks, playback duration, and other behavioral data, is collected and summarized by user and video category. The interest score (i.e., interest tendency) is calculated according to the above formula (2). The user interest distribution (i.e., user profile) including the interest score is written into the database. The interest weight corresponding to the video is obtained based on the user profile, and the original coarse ranking score is adjusted using the interest weight to obtain the adjusted coarse ranking score (i.e., target recommendation degree).
[0125] It should be noted that for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0126] Based on the above embodiment, this embodiment further provides a video recommendation device, which is applied to electronic devices such as terminal devices and servers.
[0127] Reference Figure 4 , shows a structural block diagram of an embodiment of a video recommendation device of the present invention, which may specifically include the following modules:
[0128] An initial recommendation degree acquisition module 401 is used to acquire initial recommendation degrees of at least two videos, where the initial recommendation degrees are initial recommendation degrees of the videos generated according to a preset model;
[0129] A historical data acquisition module 402 is used to acquire the user's historical video viewing data;
[0130] An interest weight determination module 403 is configured to determine an interest type weight parameter of the video based on the historical video viewing data of the user; the interest type weight parameter includes a key interest weight parameter of a key interest video and a non-key interest weight parameter of a non-key interest video, wherein the non-key interest weight parameter is greater than the key interest weight parameter, the key video is a video whose degree of user interest is higher than or equal to a first preset threshold, and the non-key video is a video whose degree of user interest is lower than or equal to a second preset threshold, wherein the first preset threshold is greater than the second preset threshold;
[0131] A recommendation degree adjustment module 404 is configured to adjust the initial recommendation degrees of at least two of the videos using the interest type weight parameter to obtain a target recommendation degree;
[0132] The video recommendation module 405 is configured to recommend the video according to the target recommendation degree.
[0133] Optionally, the interest weight determination module 403 includes:
[0134] A user portrait construction submodule, configured to construct a user portrait of the user based on the historical video viewing data;
[0135] A video classification submodule, configured to classify the video into the key interest video and the non-key interest video according to the user portrait;
[0136] The weight acquisition submodule is used to set the key interest weight parameter and the non-key interest weight parameter according to the historical video viewing data.
[0137] Optionally, the recommendation degree adjustment module 404 includes:
[0138] a first adjustment submodule, configured to, if the video is the key interest video, use the product of the key interest weight parameter and the initial recommendation degree corresponding to the video as the target recommendation degree of the video;
[0139] The second adjustment submodule is configured to, if the video is the non-critical interest video, use the product of the non-critical interest weight parameter and the initial recommendation degree corresponding to the video as the target recommendation degree of the video.
[0140] Optionally, the user has a corresponding user identifier, and the user portrait construction submodule further includes:
[0141] an interest tendency calculation unit, configured to calculate the user's interest tendency for the video based on the historical video viewing data;
[0142] an interest category determining unit, configured to determine a video interest category to which the video belongs according to the interest tendency; the video interest category includes the key interest video and the non-key interest video;
[0143] A portrait construction unit is used to construct a user portrait of the user based on the user identifier, the interest tendency and the video interest type.
[0144] Optionally, the user's interest level in the video is expressed as an interest percentage, and the interest category determination unit is specifically configured to:
[0145] Calculating the interest percentage according to the interest tendency;
[0146] If the interest percentage is greater than or equal to the first preset threshold, determining the video interest type to which the video belongs as the key interest video;
[0147] If the interest percentage is less than or equal to the second preset threshold, the video interest type to which the video belongs is determined to be the non-key interest video.
[0148] Optionally, the weight acquisition submodule includes:
[0149] an initial weight calculation unit, configured to calculate an initial key weight of the key interest video and an initial non-key weight of the non-key interest video based on the historical video viewing data;
[0150] an inverse document frequency acquisition unit, configured to acquire a key inverse document frequency of the key interest video and a non-key inverse document frequency of the non-key interest video, wherein the key inverse document frequency is inversely proportional to the frequency of occurrence of the key interest video in the historical video viewing data, and the non-key inverse document frequency is inversely proportional to the frequency of occurrence of the non-key interest video in the historical video viewing data;
[0151] a first weight determination unit, configured to take the product of the initial key weight and the key inverse document frequency as the key interest weight parameter;
[0152] The second weight determination unit is configured to take the product of the initial non-key weight and the non-key inverse document frequency as the non-key interest weight parameter.
[0153] Optionally, the preset model is a coarse ranking model, and the initial recommendation degree acquisition module 401 includes:
[0154] A submodule for obtaining videos to be screened, used for obtaining videos to be screened and the rough sorting model;
[0155] The video rough ranking submodule is used to calculate the initial recommendation degree of the videos to be screened using the rough ranking model, and pre-screen the videos to be screened according to the initial recommendation degree to obtain at least two videos and the initial recommendation degrees corresponding to at least two videos.
[0156] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0157] Memory 503, used for storing computer programs;
[0158] The processor 501 is configured to execute the program stored in the memory 503 by performing the following steps:
[0159] Obtaining initial recommendation degrees of at least two videos, where the initial recommendation degrees are initial recommendation degrees of the videos generated according to a preset model;
[0160] Get the user's historical video viewing data;
[0161] Determining an interest type weight parameter of the video based on the historical video viewing data of the user; the interest type weight parameter includes a key interest weight parameter of a key interest video and a non-key interest weight parameter of a non-key interest video, the non-key interest weight parameter being greater than the key interest weight parameter, the key video being a video whose degree of user interest is higher than or equal to a first preset threshold, the non-key video being a video whose degree of user interest is lower than or equal to a second preset threshold, and the first preset threshold being greater than the second preset threshold;
[0162] Adjusting the initial recommendation degrees of at least two of the videos using the interest type weight parameter to obtain a target recommendation degree;
[0163] The video is recommended according to the target recommendation degree.
[0164] Optionally, determining the interest type weight parameter of the video according to the historical video viewing data of the user includes:
[0165] Building a user profile of the user based on the historical video viewing data;
[0166] Classifying the video into the key interest video and the non-key interest video according to the user portrait;
[0167] The key interest weight parameter and the non-key interest weight parameter are set according to the historical video viewing data.
[0168] Optionally, the adjusting the initial recommendation degrees of the at least two videos by using the interest type weight parameter to obtain a target recommendation degree includes:
[0169] If the video is the key interest video, the product of the key interest weight parameter and the initial recommendation degree corresponding to the video is used as the target recommendation degree of the video;
[0170] If the video is the non-critical interest video, the product of the non-critical interest weight parameter and the initial recommendation degree corresponding to the video is used as the target recommendation degree of the video.
[0171] Optionally, the user has a corresponding user identifier, and constructing a user profile of the user based on the historical video viewing data includes:
[0172] Calculating the user's interest in the video based on the historical video viewing data;
[0173] Determining the video interest type to which the video belongs according to the interest tendency; the video interest type includes the key interest video and the non-key interest video;
[0174] A user profile of the user is constructed based on the user identifier, the interest tendency and the video interest type.
[0175] Optionally, the user's interest level in the video is expressed as an interest percentage, and determining the video interest type to which the video belongs based on the interest tendency includes:
[0176] Calculating the interest percentage according to the interest tendency;
[0177] If the interest percentage is greater than or equal to the first preset threshold, determining the video interest type to which the video belongs as the key interest video;
[0178] If the interest percentage is less than or equal to the second preset threshold, the video interest type to which the video belongs is determined to be the non-key interest video.
[0179] Optionally, the setting of the key interest weight parameter and the non-key interest weight parameter according to the historical video viewing data includes:
[0180] Calculating the initial key weight of the key interest video and the initial non-key weight of the non-key interest video based on the historical video viewing data;
[0181] Obtaining a key inverse document frequency of the key interest video and a non-key inverse document frequency of the non-key interest video, wherein the key inverse document frequency is inversely proportional to the appearance frequency of the key interest video in the historical video viewing data, and the non-key inverse document frequency is inversely proportional to the appearance frequency of the non-key interest video in the historical video viewing data;
[0182] The product of the initial key weight and the key inverse document frequency is used as the key interest weight parameter;
[0183] The product of the initial non-critical weight and the non-critical inverse document frequency is used as the non-critical interest weight parameter.
[0184] Optionally, the preset model is a coarse ranking model, and obtaining the initial recommendation degrees of at least two videos includes:
[0185] Obtaining the video to be screened and the rough sorting model;
[0186] The coarse ranking model is used to calculate the initial recommendation degrees of the videos to be screened, and the videos to be screened are pre-screened according to the initial recommendation degrees to obtain at least two videos and at least two initial recommendation degrees corresponding to the videos.
[0187] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0188] The communication interface is used for communication between the above terminal and other devices.
[0189] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0190] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0191] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the video recommendation method described in any one of the above embodiments.
[0192] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer is enabled to execute the video recommendation method described in any one of the above embodiments.
[0193] In the above embodiments, all or part of the embodiments can be implemented through software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented 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 a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0194] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0195] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.
[0196] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.
Claims
1. A video recommendation method, characterized in that: The method comprises: Obtaining initial recommendation degrees of at least two videos, where the initial recommendation degrees are initial recommendation degrees of the videos generated according to a preset model; Get the user's historical video viewing data; Determining an interest type weight parameter of the video based on the historical video viewing data of the user; the interest type weight parameter includes a key interest weight parameter of a key interest video and a non-key interest weight parameter of a non-key interest video, the non-key interest weight parameter being greater than the key interest weight parameter, the key video being a video whose degree of user interest is higher than or equal to a first preset threshold, the non-key video being a video whose degree of user interest is lower than or equal to a second preset threshold, and the first preset threshold being greater than the second preset threshold; Adjusting the initial recommendation degrees of at least two of the videos using the interest type weight parameter to obtain a target recommendation degree; The video is recommended according to the target recommendation degree.
2. The method according to claim 1, characterized in that The determining of the interest type weight parameter of the video according to the historical video viewing data of the user includes: Building a user profile of the user based on the historical video viewing data; Classifying the video into the key interest video and the non-key interest video according to the user portrait; The key interest weight parameter and the non-key interest weight parameter are set according to the historical video viewing data.
3. The method according to claim 1, characterized in that The adjusting the initial recommendation degrees of the at least two videos by using the interest type weight parameter to obtain a target recommendation degree includes: If the video is the key interest video, the product of the key interest weight parameter and the initial recommendation degree corresponding to the video is used as the target recommendation degree of the video; If the video is the non-critical interest video, the product of the non-critical interest weight parameter and the initial recommendation degree corresponding to the video is used as the target recommendation degree of the video.
4. The method according to claim 2, characterized in that The user has a corresponding user identifier, and constructing a user profile of the user based on the historical video viewing data includes: Calculating the user's interest in the video based on the historical video viewing data; Determining the video interest type to which the video belongs according to the interest tendency; the video interest type includes the key interest video and the non-key interest video; A user profile of the user is constructed based on the user identifier, the interest tendency and the video interest type.
5. The method according to claim 4, characterized in that The degree of user interest in the video is expressed in an interest percentage, and determining the video interest type to which the video belongs based on the interest tendency includes: Calculating the interest percentage according to the interest tendency; If the interest percentage is greater than or equal to the first preset threshold, determining the video interest type to which the video belongs as the key interest video; If the interest percentage is less than or equal to the second preset threshold, the video interest type to which the video belongs is determined to be the non-key interest video.
6. The method according to claim 2, characterized in that The step of setting the key interest weight parameter and the non-key interest weight parameter according to the historical video viewing data includes: Calculating the initial key weight of the key interest video and the initial non-key weight of the non-key interest video based on the historical video viewing data; Obtaining a key inverse document frequency of the key interest video and a non-key inverse document frequency of the non-key interest video, wherein the key inverse document frequency is inversely proportional to the appearance frequency of the key interest video in the historical video viewing data, and the non-key inverse document frequency is inversely proportional to the appearance frequency of the non-key interest video in the historical video viewing data; The product of the initial key weight and the key inverse document frequency is used as the key interest weight parameter; The product of the initial non-critical weight and the non-critical inverse document frequency is used as the non-critical interest weight parameter.
7. The method according to claim 1, characterized in that The preset model is a coarse ranking model, and obtaining the initial recommendation degree of at least two videos includes: Obtaining the video to be screened and the rough sorting model; The coarse ranking model is used to calculate the initial recommendation degrees of the videos to be screened, and the videos to be screened are pre-screened according to the initial recommendation degrees to obtain at least two videos and at least two initial recommendation degrees corresponding to the videos.
8. A video recommendation device, characterized in that: The device comprises: An initial recommendation degree acquisition module, configured to acquire initial recommendation degrees of at least two videos, wherein the initial recommendation degrees are initial recommendation degrees of the videos generated according to a preset model; A historical data acquisition module is used to obtain the user's historical video viewing data; An interest weight determination module is configured to determine an interest type weight parameter of the video based on the historical video viewing data of the user; the interest type weight parameter includes a key interest weight parameter of a key interest video and a non-key interest weight parameter of a non-key interest video, the non-key interest weight parameter being greater than the key interest weight parameter, the key video being a video whose degree of user interest is higher than or equal to a first preset threshold, the non-key video being a video whose degree of user interest is lower than or equal to a second preset threshold, and the first preset threshold being greater than the second preset threshold; a recommendation degree adjustment module, configured to adjust the initial recommendation degrees of at least two of the videos using the interest type weight parameter to obtain a target recommendation degree; The video recommendation module is used to recommend the video according to the target recommendation degree.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.