A video recommendation method and device, electronic equipment and storage medium
By clustering video albums and calculating matching degrees, the problem of low efficiency in cold-start user recommendation models is solved, enabling fast personalized video recommendations and improving server efficiency and recommendation accuracy.
Patent Information
- Application Number
- CN202211599774.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-12-14
AI Technical Summary
Existing video recommendation technologies for cold-start users suffer from slow convergence speeds due to high online computation requirements, impacting server efficiency and hindering fast and effective recommendations.
By clustering the video album collection, multiple categories of video albums are obtained. By combining the user information of cold-start users and the viewing information of video albums, the matching degree is calculated to recommend target video albums, avoiding online calculation and improving recommendation efficiency.
It enables the rapid and effective recommendation of video albums to users during cold starts, with personalized recommendations tailored to user needs, improving server operating efficiency and recommendation accuracy.
Smart Images

Figure CN115878897B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to a video recommendation method, a video recommendation device, an electronic device, and a computer-readable storage medium. Background Technology
[0002] With the continuous development of smart terminals, videos can be watched through video clients on smart terminals. Among them, user cold start plays an important role in video recommendation and is a key to business growth.
[0003] Typically, video albums can be recommended to users experiencing a cold start based on the EE (Exploration and Exploitation) algorithm. This involves recommending content that the cold-start user is interested in while simultaneously uncovering new content that might interest them. When acquiring information generated by the cold-start user on the video client, this type of method requires online computation to update the recommendation model in real time. However, online computation places high demands on model performance. When the sample data for online computation is too large, the model converges slowly, reducing the model's update speed and impacting server efficiency, making it difficult to provide fast and effective recommendations to users. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a video recommendation method, a video recommendation device, an electronic device, and a computer-readable storage medium that overcome or at least partially solve the above problems.
[0005] To address the above problems, embodiments of the present invention disclose a video recommendation method, including:
[0006] Retrieve viewing information for each video album in the video album collection and user information for users experiencing a cold start.
[0007] Based on the viewing information of each video album, the video albums in the video album set are clustered to obtain multiple categories of video albums;
[0008] For each category of video albums, select the video albums to be recommended in that category;
[0009] Based on the user information and the viewing information of each video album to be recommended, calculate the matching degree between the video album to be recommended and the cold start user;
[0010] Based on the matching degree, a target video album is determined to be recommended to the cold-start user.
[0011] Optionally, the step of selecting recommended video albums for each category includes:
[0012] Obtain the cluster center for each category of video albums;
[0013] Calculate the distance between each cluster center and each video album;
[0014] For each cluster center, multiple video albums of each category are selected in order of increasing distance between each cluster center and each video album, according to a preset selection number.
[0015] Optionally, calculating the matching degree between the video album to be recommended and the cold-start user based on the user information and the viewing information of each video album to be recommended includes:
[0016] The weight of the category to which each video album to be recommended belongs is calculated based on the distance between each video album to be recommended and each cluster center.
[0017] Feature extraction is performed on the user information of the cold start user to obtain the user static features of the cold start user; the user static features include VIP status features, age features, occupation features, preference features and city features;
[0018] The user static features of the cold start user are input into a pre-trained classification model for processing to obtain the video preference category of the cold start user;
[0019] Based on the weights of the video preference categories of the cold-start user and the category to which the recommended video album belongs, the matching degree between the recommended video album and the cold-start user is calculated.
[0020] Optionally, the classification model is trained in the following manner:
[0021] Acquire training data, which includes user information of sample users and video preference categories labeled by the sample users;
[0022] Feature extraction is performed on the user information of the sample users to obtain the static user features of the sample users;
[0023] The classification model is trained using the static user features of the sample users and the video preference categories labeled by the sample users to obtain the classification model used to identify video preference categories.
[0024] Optionally, calculating the weight of the category to which each video album to be recommended belongs based on the distance between each video album to be recommended and each cluster center includes:
[0025] The weight of the category to which the video album to be recommended belongs is obtained by normalizing the inverse of the distance between each video album to be recommended and each cluster center.
[0026] Optionally, calculating the matching degree between each video album to be recommended and the cold-start user based on the weights of the video preference categories of the cold-start user and the categories to which the video albums to be recommended belong includes:
[0027] A similarity algorithm is used to calculate the similarity between the video preference category of the cold start user and the category of the video album to be recommended, so as to obtain the similarity between the video album to be recommended and the cold start user;
[0028] The similarity is calculated by weighting the category to which the video album to be recommended belongs, and then the matching degree between the video album to be recommended and the cold start user is obtained.
[0029] Optionally, the step of clustering the video albums in the video album set based on the viewing information of each video album to obtain multiple categories of video albums includes:
[0030] Feature extraction is performed on the viewing information of each video album to obtain the viewing features of each video album;
[0031] Based on the viewing characteristics of each video album, the video albums are clustered to obtain multiple categories of video albums.
[0032] Optionally, before obtaining the viewing information of each video album in the video album set and the user information of the cold start user, the method further includes:
[0033] Users who watch fewer videos than a preset threshold within a preset time period are identified as cold start users. This invention also discloses a video recommendation device, the device comprising:
[0034] The information acquisition module is used to acquire viewing information for each video album in the video album collection and user information for users who are cold-starting.
[0035] The clustering processing module is used to cluster the video albums in the video album set according to the viewing information of each video album to obtain video albums of multiple categories.
[0036] The selection module is used to select recommended video albums for each category.
[0037] The matching module is used to calculate the matching degree between the video album to be recommended and the cold start user based on the user information and the viewing information of each video album to be recommended;
[0038] The recommendation module is used to determine the target video albums to recommend to the cold-start user based on the matching degree.
[0039] This invention also discloses an electronic device, characterized in that it includes: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the video recommendation method as described above.
[0040] This invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the video recommendation method described above.
[0041] The embodiments of the present invention have the following advantages:
[0042] In this embodiment of the invention, multiple categories of video albums are obtained by clustering the video albums in the video album set. Video recommendations can be made based on the video albums to be recommended in each category obtained by the clustering process. The clustering process in this embodiment of the invention does not require the use of a model, so no online calculation is required. Even if there is a lot of data to be clustered, the clustering process will not affect the server's operating efficiency, thereby quickly and effectively recommending video albums to cold-start users. By combining the user information of the cold-start user and the viewing information of the video albums to be recommended, the target video albums to be recommended to the cold-start user are determined. Personalized recommendations can be made for the cold-start user, thereby providing personalized recommendations of target video albums that better meet the needs of the cold-start user. Attached Figure Description
[0043] Figure 1 This is a flowchart of the steps of a video recommendation method provided in an embodiment of the present invention;
[0044] Figure 2 This is a flowchart of another video recommendation method provided in an embodiment of the present invention;
[0045] Figures 2A-2C This is a flowchart of the sub-steps of another video recommendation method provided in an embodiment of the present invention;
[0046] Figure 3 This is a schematic diagram illustrating the training of the classification model to be trained according to an embodiment of the present invention;
[0047] Figure 4This is a schematic diagram illustrating the application of a pre-trained classification model according to an embodiment of the present invention;
[0048] Figure 5 This is a structural block diagram of a video recommendation device provided in an embodiment of the present invention. Detailed Implementation
[0049] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0050] The EE algorithm can recommend video albums to users who need a cold start. This type of method usually requires online computation to update the recommendation model in real time. However, online computation has high requirements for model performance. When there is too much sample data, the model converges slowly, which reduces the model update speed and affects the server's operating efficiency, making it difficult to make fast and effective recommendations to users.
[0051] One of the core concepts of this invention is that, in this embodiment, by clustering video albums in a video album collection to obtain multiple categories of video albums, video recommendations can be made based on the video albums to be recommended in each category obtained through clustering. The clustering process in this embodiment does not require the use of a model, and therefore does not require online computation. Even if there is a large amount of data to be clustered, the clustering process will not affect the server's operating efficiency, thereby quickly and effectively recommending video albums to cold-start users. By combining the user information of cold-start users and the viewing information of the video albums to be recommended to determine the target video albums to be recommended to cold-start users, personalized recommendations can be made for cold-start users, thereby providing personalized recommendations of target video albums that better meet the needs of cold-start users.
[0052] Reference Figure 1 The diagram illustrates a flowchart of a video recommendation method provided by an embodiment of the present invention. The method may specifically include the following steps:
[0053] Step 101: Obtain the viewing information of each video album in the video album collection and the user information of the cold start users.
[0054] The video recommendation method provided in this invention can be applied to a recommendation server. The recommendation server can determine the target video albums to recommend to cold-start users based on viewing information of each video album in the video album set and user information of the cold-start user. When the cold-start user runs the video client on a preset terminal, they can view the target video albums recommended by the recommendation server for that user.
[0055] All videos on the site can be grouped into video album collections. A video album collection can include multiple video albums, and each video album can include multiple videos. The viewing information for each video album can include multi-dimensional information such as the total number of clicks, total number of views, number of videos, and total viewing time for all videos in the video album.
[0056] Cold start users are video client users who need to be started. User information can be basic user information that is a static attribute, including multi-dimensional information such as VIP status, age, occupation, preferences, and city of residence. In this embodiment of the invention, by obtaining multi-dimensional user information of cold start users for video recommendation, it is beneficial to recommend target video albums that are more in line with user characteristics to cold start users, thereby improving the recommendation accuracy for cold start users.
[0057] Step 102: Based on the viewing information of each video album, perform clustering processing on the video albums in the video album set to obtain multiple categories of video albums.
[0058] Based on the viewing information of each video album, the video albums in the set can be clustered to divide them into multiple categories. Each category of video albums can include multiple videos of the same category.
[0059] It should be noted that when video albums are input into a pre-trained video classification model for classification, the classification results for some video albums may be inaccurate because the model is trained based on preset classification rules. This can lead to a situation where video albums recommended to cold-start users do not match their user characteristics. In this embodiment of the invention, by clustering video albums, a set of video albums in multiple categories is obtained, which is not bound by preset classification rules. Videos to be recommended are selected from these sets and matched with cold-start users, thus recommending video albums that match their user characteristics.
[0060] Step 103: For each category of video albums, select the video albums to be recommended in that category.
[0061] In this embodiment of the invention, a preset number of video albums to be recommended can be selected from multiple video albums in each category. For example, m video albums to be recommended can be selected from video albums in category A, and m video albums to be recommended can be selected from video albums in category B.
[0062] Step 104: Calculate the matching degree between the video album to be recommended and the cold start user based on the user information and the viewing information of each video album to be recommended.
[0063] In this embodiment of the invention, by clustering the video albums in the video album set and selecting videos to be recommended from the multiple categories of video albums obtained after clustering, the matching degree between the video albums to be recommended and the cold start users is calculated by combining the user information of the cold start users and the viewing information of the video albums to be recommended, thereby improving the operating efficiency of the recommendation server and facilitating rapid video recommendation.
[0064] It should be noted that traditional recommendation strategies typically involve identifying a candidate group that matches the users needing a cold start, and then recommending video albums corresponding to that candidate group to the users needing a cold start. However, this approach requires developing corresponding recommendation strategies for various user groups. Since the user characteristics of users needing a cold start are limited, it necessitates extensive debugging of recommendation strategies for different user groups, hindering rapid video recommendation. Furthermore, recommending video albums corresponding to matched candidate groups easily overlooks individual user characteristics. In this embodiment of the invention, the recommended video albums are determined by calculating the matching degree between the video album to be recommended and the users needing a cold start. This eliminates the need for debugging the recommendation strategy and allows for rapid video recommendation. Calculating the matching degree based on the user information of the users needing a cold start allows for personalized recommendations to be made for different users.
[0065] Step 105: Based on the matching degree, determine the target video album to recommend to the cold start user.
[0066] Specifically, after calculating the matching degree between the videos to be recommended and the cold-start users, the videos with a high matching degree with the cold-start users can be identified as target video albums and recommended to them. For multiple cold-start users, since the user information of each cold-start user is different, the target video albums with a high matching degree with each cold-start user will also be different. Therefore, video albums that match each cold-start user can be recommended to each cold-start user, thus providing personalized recommendations.
[0067] In this embodiment of the invention, multiple categories of video albums are obtained by clustering the video albums in the video album set. Video recommendations can be made based on the video albums to be recommended in each category obtained by the clustering process. The clustering process in this embodiment of the invention does not require the use of a model, so no online calculation is required. Even if there is a lot of data to be clustered, the clustering process will not affect the server's operating efficiency, thereby quickly and effectively recommending video albums to cold-start users. By combining the user information of the cold-start user and the viewing information of the video albums to be recommended, the target video albums to be recommended to the cold-start user are determined. Personalized recommendations can be made for the cold-start user, thereby providing personalized recommendations of target video albums that better meet the needs of the cold-start user.
[0068] Reference Figure 2 The diagram illustrates a flowchart of another video recommendation method provided by an embodiment of the present invention. The method may specifically include the following steps:
[0069] Step 201: Obtain the viewing information of each video album in the video album collection and the user information of the cold start users.
[0070] In an optional embodiment, before obtaining the viewing information of each video album in the video album set and the user information of the cold start users, the method further includes: identifying users who watch fewer than a preset number of videos within a preset time period as cold start users.
[0071] The recommendation server can identify users who need a cold start, defining them as users who have watched fewer than a preset threshold number of videos within a preset time period. For example, users who have watched ≤2 videos in the last 15 days can be identified as cold start users. After identifying cold start users, the server can retrieve viewing information for each video album in the video album collection, as well as user information for the cold start users from a database used to store user information.
[0072] Step 202: Based on the viewing information of each video album, perform clustering processing on the video albums in the video album set to obtain video albums of multiple categories.
[0073] In an alternative embodiment, refer to Figure 2A The diagram illustrates a flowchart of the sub-steps of another video recommendation method provided by an embodiment of the present invention. Step 202 may include the following sub-steps S11-S12:
[0074] Sub-step S11: Extract features from the viewing information of each video album to obtain the viewing features of each video album.
[0075] Viewing characteristics of a video album can be video features that include viewing information for the video album. This can be achieved using f... doc This represents the viewing characteristics of a video album. For example, if the video album set includes m video albums, after extracting features from the viewing information of each of the m video albums, the viewing characteristics f for each of the m video albums can be obtained. doc1 f doc2 , ..., f docm .
[0076] The number of features N for viewing features can be determined by the dimensions of the viewing information. For example, if the viewing information for video album doc1 includes the total number of clicks, total number of views, number of videos, and total viewing duration for all videos in video album doc1, then the number of features N for viewing features of video album doc1 can be 4, for example, f doc1 =[Total clicks, total views, number of videos, total viewing time] =[1000, 22, 223, 22222].
[0077] Sub-step S12: Based on the viewing characteristics of each video album, perform clustering processing on each video album to obtain multiple categories of video albums.
[0078] Specifically, a feature matrix of the video album set can be constructed based on the viewing characteristics of each video album in the set. The feature matrix can then be clustered to obtain video albums of multiple categories.
[0079] Step 203: Obtain the cluster center corresponding to each category of video albums.
[0080] After extracting features from the viewing information of each video album, a feature matrix F containing the viewing features of each video album can be constructed. doc =[f doc1 f doc2 , ..., f docm ]∈] m×N , m×N F can be represented doc Let m be an m×N feature matrix, where m is the number of video albums and N is the number of features. Based on the viewing features of each video album in the feature matrix, feature points for each video album can be determined in the cluster space. A clustering algorithm is used. First, C initial cluster centers are randomly selected from the video album set. Then, the Euclidean distance between each video album's feature point and each cluster center is calculated. The cluster center closest to the feature point of that video album is found, and the feature point is assigned to the cluster corresponding to that cluster center. The average value of the video album feature points in each cluster is then calculated as the new cluster center. This process is repeated until the cluster centers no longer change or the maximum number of iterations is reached, thus completing the clustering of multiple video albums and obtaining C categories of video albums. At this point, the final C cluster centers corresponding to the C categories of video albums can be obtained. The cluster centers can be special samples in cluster analysis that represent the categories of video albums.
[0081] Step 204: Calculate the distance between each cluster center and each video album.
[0082] After clustering multiple video albums using a clustering algorithm, the cluster centers for each category of video albums remain unchanged. At this point, the spatial coordinates of the feature points of each video album and the spatial coordinates of each cluster center can be obtained in the cluster space. Based on the spatial coordinates of the feature points and the spatial coordinates of each cluster center, the Euclidean distance between each video album and each cluster center can be calculated. For example, the Euclidean distance D between doc1 and C cluster centers can be calculated. 1,doc1 D 2,doc1 D i,doc1 D C,doc1 .
[0083] Step 205: For each cluster center, select multiple video albums to be recommended for each category according to the order of distance between each cluster center and each video album from near to far, and according to the preset selection quantity.
[0084] For each cluster center, multiple video albums of each category can be selected from the video albums of each category according to the distance between each cluster center and each video album. The same number of video albums can be selected from each category. When there are C cluster categories and t video albums are selected from each category, C*t video albums can be selected. For example, if five video albums doc1, doc2, doc3, doc4, and doc5 in the video album set are clustered to obtain two cluster centers C1 and C2, and for cluster center C1, the distance D between each video album and cluster center C1 is... 1,doc1 <D 1,doc2 <D 1,doc3 <D 1,doc4 <D 1,doc5 Two video albums, doc1 and doc2, of class a can be selected from nearest to farthest; for cluster center C2, the distance D between each video album and cluster center C2 is... 2,doc4 <D 2,doc5 <D 2,doc1 <D 2,doc2 <D 2,doc3 You can select two recommended video albums, doc4 and doc5, from the nearest to the furthest.
[0085] Based on the viewing characteristics of each video album, clustering is performed to obtain video albums of various categories. After selecting video albums to be recommended from each category, the category feature f of the video albums to be recommended can be determined. i,doc The category feature can be a feature used to represent the category to which the video album belongs. For example, the video features of the video album doc1 to be recommended could be f... 1,doc1The video features of the recommended video album doc2 can be f 1,doc2 The video features of the recommended video album doc4 can be f 2,doc4 The video features of the recommended video album doc5 can be f 2,doc5 .
[0086] Step 206: Calculate the matching degree between the video album to be recommended and the cold start user based on the user information and the viewing information of each video album to be recommended.
[0087] In an alternative embodiment, refer to Figure 2B The flowchart illustrates a sub-step of another video recommendation method provided by an embodiment of the present invention. Step 206 may include the following sub-steps S21-S24:
[0088] Sub-step S21: Calculate the weight of the category to which each video album to be recommended belongs based on the distance between each video album to be recommended and each cluster center.
[0089] Each cluster center can correspond to a different cluster category. The closer the video album is to a cluster center, the higher the weight of the category to which the video album belongs. For example, if three cluster centers C1, C2, and C3 are obtained, cluster center C1 corresponds to cluster category a, cluster center C2 corresponds to cluster category b, and cluster center C3 corresponds to cluster category c, and the distances between video album doc1 and cluster centers C1, C2, and C3 are D respectively. 1,doc1 D 2,doc1 D 3,doc1 If D 1,doc1 >D 2,doc1 >D 3,doc1 This means that the weight of video album doc1 belonging to category c is higher than the weight of video album doc1 belonging to category b, and the weight of video album doc1 belonging to category b is higher than the weight of video album doc1 belonging to category a.
[0090] In an optional embodiment, sub-step S21 may include: normalizing the inverse of the distance between each video album to be recommended and each cluster center to obtain the weight of the category to which the video album to be recommended belongs.
[0091] Specifically, the inverse of the distance between each video album to be recommended and each cluster center can be calculated to obtain the preset weights for each category corresponding to each video album to be recommended. These preset weights are then normalized to obtain the weights [w1, w2, ..., w] for each category corresponding to each video album to be recommended. i ,…,w c ]∈]C , C It can represent a C-dimensional feature vector, where the weights of each category are... For example, the distance D between the video album to be recommended doc1 and the cluster centers C1, C2, and C3 can be calculated. 1,doc1 D 2,doc1 D 3,doc1 The reciprocal of is used to obtain the preset weight W1 = 1 / D for class a corresponding to doc1. 1,doc1 The preset weight W2 for class b is 1 / D 2,doc1 The preset weight W3 corresponding to class c is 1 / D 3,doc1 Normalization calculations are performed on the preset weights W1, W2, and W3 to obtain the weights w1 for class a, w2 for class b, and w3 for class c of video album doc1. For example, when W1 = 1, W2 = 10, and W3 = 25, we can normalize W1, W2, and W3 to obtain w1, w2, and w3: w1 = 1 × 1 / (1 + 10 + 25), w2 = 10 × 1 / (1 + 10 + 25), and w3 = 25 × 1 / (1 + 10 + 25).
[0092] In one example, if the recommended video album doc1 is selected from cluster center C3 in ascending order of distance, then the video features of recommended video album doc1 can be f. 3,doc1 The weight w3 of class c corresponding to doc1 is used as the weight of the category to which the recommended video album belongs.
[0093] In one example, the same video album to be recommended can belong to multiple categories. If, for cluster center C3, the video album to be recommended is doc1 selected in order of distance from nearest to farthest, then the video feature of this video album is f. 3,doc1 The weight w3 of class c corresponding to doc1 is taken as f. 3,doc1 The weight of the category; and if doc1 is also the video album to be recommended determined when selecting cluster centers C2 in order of distance from nearest to farthest, then the video features of the video album to be recommended are f. 2,doc1 The weight w2 of class b corresponding to doc1 is used as f. 2,doc1 The weight of the category to which it belongs.
[0094] Sub-step S22 involves extracting features from the user information of the cold-start user to obtain the user static features of the cold-start user; the user static features include VIP identity features, age features, occupation features, preference features, and city features.
[0095] The static user characteristics of a cold-start user can be user characteristics that contain user information about the cold-start user, and can be expressed using F.static This represents the static features of a cold-start user. The number S of these static features can be determined by the dimensions of the user information. For example, feature extraction from the user information of a cold-start user yields the static features F of that user. static =[is vip ,age,occupation,location,hobby,…]∈] S , S It can represent an S-dimensional feature vector, is vip It can indicate VIP status characteristics, i.e., whether the user is a VIP (Very Important Person). age can indicate age characteristics, occupation can indicate occupation characteristics, location can indicate city characteristics, and hobby can indicate hobby characteristics.
[0096] Sub-step S23 involves inputting the user static features of the cold-start user into a pre-trained classification model for processing to obtain the video preference category of the cold-start user.
[0097] The classification model to be trained can be trained to obtain a pre-trained classification model. Then, the static user features of the cold start user can be input into the pre-trained classification model for processing to obtain the video preference category of the cold start user.
[0098] In an optional embodiment, the classification model can be trained by: acquiring training data, the training data including user information of sample users and video preference categories labeled by the sample users; extracting features from the user information of the sample users to obtain the static user features of the sample users; and training the classification model using the static user features of the sample users and the video preference categories labeled by the sample users to obtain the classification model for identifying video preference categories.
[0099] The classification model can include fully connected layers, which can employ Deep Neural Networks (DNNs). The static user features of the sample users can be input into the classification model to be trained. The output layer of the fully connected layer can generate an output result through the ELU activation function. This output result is then input into a softmax layer to obtain the prediction result of the classification model to be trained. The prediction result can include T video preference categories of the sample users. Based on the prediction result and the video preference categories labeled by the sample users, the classification model can be trained.
[0100] Reference Figure 3 The diagram shown illustrates the training of a classification model to be trained according to an embodiment of the present invention, where the static user features F of the sample users are used.static Input into the classification model to be trained, based on F static The linear parameters W1 are trained, and the predicted result y' of the classification model is output through the output layer O. Based on the predicted video preference category and the labeled video preference category, a loss function can be used to calculate the classification loss. The loss is backpropagated to the linear parameters in the network to update the linear parameters. The above process is repeated until the classification loss is less than an empirical value, which can be 0.002, for example. (Refer to...) Figure 4 The diagram illustrates the application of a pre-trained classification model according to an embodiment of the present invention, which uses the user static features F of users requiring a cold start. s ` tatic Inputting into a pre-trained classification model, user features F, including video preference categories of cold-start users, are obtained based on linear parameters W1. user .
[0101] Specifically, the static user features F of the sample users can be used as a basis for further analysis. static Inputting data into a DNN network trains the classification model, yielding the prediction result y` = softmax(relu(F)). static W1)O)∈] T , where W1∈] S*C This could refer to trainable linear parameters. S*C It can represent a matrix containing the matching degree relationships between S-dimensional user static features and C cluster categories, O∈] C*T It could refer to the output layer. C*T It can be represented as a matrix containing information on t video albums to be recommended, corresponding to C cluster categories. T The prediction result can be represented as a t-dimensional feature vector, and the loss function can be the cross-entropy function.
[0102]
[0103] y can refer to the predicted true class of the sample.
[0104] After the classification model is trained and users requiring a cold start are identified, their static user features can be input into the pre-trained model. Classification based on these static user features yields the user features f output by the output layer, which includes the video preference categories of the users requiring a cold start. user =relu(F static W1)∈] C , C User characteristics can be represented as C-dimensional feature vectors.
[0105] Sub-step S24: Based on the weights of the video preference categories of the cold start user and the category to which the video album to be recommended belongs, calculate the matching degree between the video album to be recommended and the cold start user.
[0106] The output layer of the pre-trained classification model outputs user features that include the video preference categories of cold-start users and the weights of the categories to which each video album to be recommended belongs. This allows us to calculate the matching degree between each video album to be recommended and the cold-start user.
[0107] In this embodiment of the invention, by combining the user static characteristics of the cold start user and the viewing characteristics of the video album to be recommended to calculate the matching degree between the video album to be recommended and the cold start user, the target video album with a high matching degree with the cold start user can be determined, and the target video album that matches the user static characteristics of the cold start user can be accurately recommended to the cold start user.
[0108] In an alternative embodiment, refer to Figure 2C The diagram illustrates a sub-step flowchart of another video recommendation method provided by an embodiment of the present invention. Sub-step S24 may include the following sub-steps S241-S242:
[0109] Sub-step S241: A similarity algorithm is used to calculate the similarity between the video preference category of the cold start user and the category to which the video album to be recommended belongs, so as to obtain the similarity between the video album to be recommended and the cold start user.
[0110] Specifically, the cosine similarity algorithm can be used.
[0111] Right now
[0112] User characteristics f for video preference categories including cold start users user With the video features f of each video album to be recommended i,doc Similarity calculations are performed to determine the similarity between each video album to be recommended and the cold start algorithm.
[0113] In sub-step S242, the similarity is calculated by weighting the similarity based on the weight of the category to which the video album to be recommended belongs, so as to obtain the matching degree between the video album to be recommended and the cold start user.
[0114] Among them, the following can be adopted The similarity between the recommended video album and the cold start users is calculated by weighted average to obtain the matching degree between the recommended video album and the cold start users.
[0115] For example, among the selected C*t video albums to be recommended, if the video feature of the video album doc1 to be recommended is f3doc1 If the weight of the category is w3, then the matching degree between doc1 and the cold start user is...
[0116] In another example, if the video features of the video to be recommended, doc1, include f 3,doc1 and f 2,doc1 Given that the weights are w3 and w2 respectively, the matching degree between doc1 and the cold start user is...
[0117] In this embodiment of the invention, the matching degree between the video album to be recommended and the cold start user is calculated based on the weight of the category to which the video album to be recommended belongs and the similarity of the video album to be recommended. This takes into account both whether the video album to be recommended matches the cold start user and whether the category to which the video album to be recommended belongs is accurate, thereby effectively recommending target video albums that match the user static characteristics of the cold start user.
[0118] Step 207: Based on the matching degree, determine the target video album to recommend to the cold start user.
[0119] After calculating the matching degree between the videos to be recommended and the users in the cold start phase, K videos to be recommended can be selected as target video albums and recommended to the users in the cold start phase, in descending order of matching degree.
[0120] In this embodiment of the invention, multiple categories of video albums are obtained by clustering the video albums in the video album set. Video recommendations can be made based on the video albums to be recommended in each category obtained by the clustering process. The clustering process in this embodiment of the invention does not require the use of a model, so no online calculation is required. Even if there is a lot of data to be clustered, the clustering process will not affect the server's operating efficiency, thereby quickly and effectively recommending video albums to cold-start users. By combining the user information of the cold-start user and the viewing information of the video albums to be recommended, the target video albums to be recommended to the cold-start user are determined. Personalized recommendations can be made for the cold-start user, thereby providing personalized recommendations of target video albums that better meet the needs of the cold-start user.
[0121] In this embodiment of the invention, by combining the user static characteristics of the cold start user and the viewing characteristics of the video album to be recommended to calculate the matching degree between the video album to be recommended and the cold start user, the target video album with a high matching degree with the cold start user can be determined, and the target video album that matches the user static characteristics of the cold start user can be accurately recommended to the cold start user.
[0122] In this embodiment of the invention, the matching degree between the video album to be recommended and the cold start user is calculated based on the weight of the category to which the video album to be recommended belongs and the similarity of the video album to be recommended. This takes into account both whether the video album to be recommended matches the cold start user and whether the category to which the video album to be recommended belongs is accurate, thereby effectively recommending target video albums that match the user static characteristics of the cold start user.
[0123] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0124] Reference Figure 5 The diagram shows a structural block diagram of a video recommendation device provided in an embodiment of the present invention, which may specifically include the following modules:
[0125] The information acquisition module 501 is used to acquire viewing information of each video album in the video album collection and user information of cold start users;
[0126] The clustering processing module 502 is used to perform clustering processing on the video albums in the video album set according to the viewing information of each video album, so as to obtain video albums of multiple categories.
[0127] Module 503 is used to select recommended video albums for each category.
[0128] The matching module 504 is used to calculate the matching degree between the video album to be recommended and the cold start user based on the user information and the viewing information of each video album to be recommended;
[0129] The recommendation module 505 is used to determine the target video album to recommend to the cold start user based on the matching degree.
[0130] In one optional embodiment, the selection module includes:
[0131] The cluster center acquisition submodule is used to obtain the cluster center corresponding to the video album collection of each category;
[0132] The distance calculation submodule is used to calculate the distance between each cluster center and each video album;
[0133] The submodule for selecting recommended albums is used to select multiple recommended video albums for each category according to the order of distance between each cluster center and each video album from near to far, and according to a preset selection quantity.
[0134] In one optional embodiment, the matching module includes:
[0135] The weight calculation submodule is used to calculate the weight of the category to which each video album to be recommended belongs based on the distance between each video album to be recommended and each cluster center.
[0136] The user feature extraction submodule is used to extract features from the user information of the cold start user to obtain the user static features of the cold start user; the user static features include VIP status features, age features, occupation features, preference features and city features;
[0137] The static feature classification submodule is used to input the user static features of the cold start user into a pre-trained classification model for processing, so as to obtain the video preference category of the cold start user.
[0138] The matching degree calculation submodule is used to calculate the matching degree between the video album to be recommended and the cold start user based on the weight of the video preference category of the cold start user and the category to which the video album to be recommended belongs.
[0139] In one optional embodiment, the classification model is trained using the following modules:
[0140] The training data acquisition module is used to acquire training data, which includes user information of sample users and video preference categories labeled by the sample users;
[0141] The feature extraction module is used to extract features from the user information of the sample users to obtain the static user features of the sample users.
[0142] The model training module is used to train the classification model using the static user features of the sample users and the video preference categories labeled by the sample users, so as to obtain the classification model used to identify video preference categories.
[0143] In one optional embodiment, the weight calculation submodule includes:
[0144] The normalization calculation unit is used to normalize the reciprocal of the distance between each video album to be recommended and each cluster center to obtain the weight of the category to which the video album to be recommended belongs.
[0145] In an optional embodiment, the matching degree calculation submodule includes:
[0146] The similarity calculation unit is used to calculate the similarity between the video preference category of the cold start user and the category of the video album to be recommended using a similarity algorithm, so as to obtain the similarity between the video album to be recommended and the cold start user;
[0147] The matching degree calculation unit is used to calculate the similarity by using the weight of the category to which the video album to be recommended belongs, so as to obtain the matching degree between the video album to be recommended and the cold start user.
[0148] In one optional embodiment, the clustering processing module includes:
[0149] The viewing feature extraction submodule is used to extract features from the viewing information of each video album to obtain the viewing features of each video album.
[0150] The clustering processing submodule is used to perform clustering processing on each video album based on the viewing characteristics of each video album to obtain video albums of multiple categories.
[0151] In an optional embodiment, before obtaining the viewing information of each video album in the video album set and the user information of the cold start user, the method further includes:
[0152] The cold start user determination module is used to identify users who watch fewer than a preset number of videos within a preset time period as cold start users.
[0153] In this embodiment of the invention, multiple categories of video albums are obtained by clustering the video albums in the video album set. Video recommendations can be made based on the video albums to be recommended in each category obtained by the clustering process. The clustering process in this embodiment of the invention does not require the use of a model, so no online calculation is required. Even if there is a lot of data to be clustered, the clustering process will not affect the server's operating efficiency, thereby quickly and effectively recommending video albums to cold-start users. By combining the user information of the cold-start user and the viewing information of the video albums to be recommended, the target video albums to be recommended to the cold-start user are determined. Personalized recommendations can be made for the cold-start user, thereby providing personalized recommendations of target video albums that better meet the needs of the cold-start user.
[0154] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0155] This invention also provides an electronic device, comprising:
[0156] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described video recommendation method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0157] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described video recommendation method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0158] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0159] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0160] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0161] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0163] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0164] Finally, 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 terminal device 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 terminal device. 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 terminal device that includes said element.
[0165] The present invention has provided a detailed description of a video recommendation method, apparatus, electronic device, and storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A video recommendation method, characterized in that, include: Obtain viewing information for each video album in the video album collection and user information for users who are cold-starting. The viewing information for the video album includes the total number of clicks, total number of views, number of videos, and total viewing time for all videos in the video album. Based on the viewing information of each video album, the video albums in the video album set are clustered to obtain multiple categories of video albums. This includes: extracting features from the viewing information of each video album to obtain the viewing features of each video album; and clustering the video albums based on the viewing features of each video album to obtain multiple categories of video albums. For each category of video albums, select the video albums to be recommended for that category; Based on the user information and the viewing information of each video album to be recommended, calculate the matching degree between the video album to be recommended and the cold start user; Based on the matching degree, a target video album is determined to be recommended to the cold-start user; The step of calculating the matching degree between the video album to be recommended and the cold-start user based on the user information and the viewing information of each video album to be recommended includes: Calculate the weight of the category to which the video album to be recommended belongs; Feature extraction is performed on the user information of the cold start user to obtain the user static features of the cold start user; the user static features include VIP status features, age features, occupation features, preference features and city features; The user static features of the cold start user are input into a pre-trained classification model for processing to obtain the video preference category of the cold start user; Based on the weights of the video preference categories of the cold-start user and the category to which the recommended video album belongs, the matching degree between the recommended video album and the cold-start user is calculated.
2. The method according to claim 1, characterized in that, For each category of video albums, the recommended video albums for that category are selected, including: Obtain the cluster center for each category of video albums; Calculate the distance between each cluster center and each video album; For each cluster center, multiple video albums of each category are selected in order of increasing distance between each cluster center and each video album, according to a preset selection number.
3. The method according to claim 2, characterized in that, The calculation of the weight of the category to which the video album to be recommended belongs includes: The weight of the category to which each video album to be recommended belongs is calculated based on the distance between each video album to be recommended and each cluster center.
4. The method according to claim 3, characterized in that, The classification model is trained in the following way: Acquire training data, which includes user information of sample users and video preference categories labeled by the sample users; Feature extraction is performed on the user information of the sample users to obtain the static user features of the sample users; The classification model is trained using the static user features of the sample users and the video preference categories labeled by the sample users to obtain the classification model used to identify video preference categories.
5. The method according to claim 3, characterized in that, The step of calculating the weight of the category to which each video album to be recommended belongs based on the distance between each video album to be recommended and each cluster center includes: The weight of the category to which the video album to be recommended belongs is obtained by normalizing the inverse of the distance between each video album to be recommended and each cluster center.
6. The method according to claim 5, characterized in that, The calculation of the matching degree between each video album to be recommended and the cold-start user based on the weights of the video preference categories of the cold-start user and the categories to which the video albums to be recommended belong includes: A similarity algorithm is used to calculate the similarity between the video preference category of the cold start user and the category of the video album to be recommended, so as to obtain the similarity between the video album to be recommended and the cold start user; The similarity is calculated by weighting the category to which the video album to be recommended belongs, and then the matching degree between the video album to be recommended and the cold start user is obtained.
7. The method according to claim 1, characterized in that, Before obtaining the viewing information of each video album in the video album set and the user information of the cold start user, the method further includes: Users who watch fewer videos than a preset threshold within a preset time period are identified as cold start users.
8. A video recommendation device, characterized in that, The device includes: The information acquisition module is used to acquire the viewing information of each video album in the video album collection and the user information of the cold start users. The viewing information of the video album includes the total number of clicks, total number of views, number of videos, and total viewing time of all videos in the video album. The clustering processing module is used to cluster the video albums in the video album set according to the viewing information of each video album to obtain multiple categories of video albums. The clustering processing module includes: extracting features from the viewing information of each video album to obtain the viewing features of each video album; and clustering the video albums according to the viewing features of each video album to obtain multiple categories of video albums. The selection module is used to select recommended video albums for each category. The matching module is used to calculate the matching degree between the video album to be recommended and the cold start user based on the user information and the viewing information of each video album to be recommended; The recommendation module is used to determine the target video albums to recommend to the cold-start user based on the matching degree. The matching module includes: The weight calculation submodule is used to calculate the weight of the category to which the video album to be recommended belongs; The user feature extraction submodule is used to extract features from the user information of the cold start user to obtain the user static features of the cold start user; the user static features include VIP status features, age features, occupation features, preference features and city features; The static feature classification submodule is used to input the user static features of the cold start user into a pre-trained classification model for processing, so as to obtain the video preference category of the cold start user. The matching degree calculation submodule is used to calculate the matching degree between the video album to be recommended and the cold start user based on the weight of the video preference category of the cold start user and the category to which the video album to be recommended belongs.
9. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the video recommendation method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the video recommendation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Video recommendation method and system
CN106028071A