A video recommendation method, apparatus and electronic device
Patent Information
- Application Number
- CN202111613794.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2041-12-27
AI Technical Summary
[0003]本申请提供一种视频推荐方法、装置及电子设备,以解决视频推荐效果较差的问题
[0018]本申请实施例中,将目标时间和所述视频序列输入至第一模型中对兴趣分布向量进行预测,以获取所述目标时间对应的兴趣分布向量,所述兴趣分布向量用于表示多维兴趣的权值分布;将预先获取的历史视频集合、多个候选视频以及多维兴趣向量矩阵输入至第二模型中对指标参数进行预测,以获取每一候选视频的预测指标参数;基于所述兴趣分布向量和所述预测指标参数,获取每一候选视频的推荐分数;即每一候选视频的推荐分数可以基于预测的多维兴趣的权值分布,以及预测的指标参数确定,从而结合多兴趣与推荐目标进行视频推荐,提升视频推荐的效果。
Smart Images

Figure CN116366923B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network transmission technology, and in particular to a video recommendation method, apparatus, and electronic device. Background Technology
[0002] Existing target recommendation technologies are based on recommendations for individual users. However, in the context of internet-connected home TVs, the user composition is more complex, often involving a family with multiple users of different ages and interests. In the home TV scenario, recommendations are made on a terminal-by-terminal basis, making it impossible to know the user currently watching. If video recommendations are made based solely on a single recommendation target, the recommendation effect will be poor. Summary of the Invention
[0003] This application provides a video recommendation method, apparatus, and electronic device to solve the problem of poor video recommendation performance.
[0004] In a first aspect, embodiments of this application provide a video recommendation method, including:
[0005] Obtain a video sequence, which includes multiple videos and the playback time of each video;
[0006] The target time and the video sequence are input into the first model to predict the interest distribution vector, so as to obtain the interest distribution vector corresponding to the target time. The interest distribution vector is used to represent the weight distribution of multidimensional interest.
[0007] The pre-acquired historical video set, multiple candidate videos, and multi-dimensional interest vector matrix are input into the second model to predict the index parameters, so as to obtain the predicted index parameters for each candidate video.
[0008] Based on the interest distribution vector and the prediction index parameters, a recommendation score is obtained for each candidate video;
[0009] The multiple candidate videos are recommended based on the recommendation score of each candidate video.
[0010] Secondly, embodiments of this application also provide a video recommendation device, comprising:
[0011] The first acquisition module is used to acquire a video sequence, which includes multiple videos and the playback time of each video;
[0012] The first prediction module is used to input the target time and the video sequence into the first model to predict the interest distribution vector, so as to obtain the interest distribution vector corresponding to the target time, wherein the interest distribution vector is used to represent the weight distribution of multidimensional interest;
[0013] The second prediction module is used to input the pre-acquired historical video set, multiple candidate videos and multi-dimensional interest vector matrix into the second model to predict the index parameters, so as to obtain the predicted index parameters for each candidate video.
[0014] The second acquisition module is used to acquire the recommendation score of each candidate video based on the interest distribution vector and the prediction index parameters.
[0015] The recommendation module is used to recommend the multiple candidate videos according to the recommendation score of each candidate video.
[0016] Thirdly, embodiments of this application also provide an electronic device, including: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; the processor is configured to read the program in the memory to implement the steps in the method described in the first aspect of embodiments of this application.
[0017] Fourthly, embodiments of this application also provide a readable storage medium storing a program that, when executed by a processor, implements the steps of the method described in the first aspect of embodiments of this application.
[0018] In this embodiment, the target time and the video sequence are input into a first model to predict the interest distribution vector, thereby obtaining the interest distribution vector corresponding to the target time. The interest distribution vector is used to represent the weight distribution of multidimensional interests. A pre-acquired set of historical videos, multiple candidate videos, and a multidimensional interest vector matrix are input into a second model to predict the indicator parameters, thereby obtaining the predicted indicator parameters for each candidate video. Based on the interest distribution vector and the predicted indicator parameters, a recommendation score for each candidate video is obtained. That is, the recommendation score for each candidate video can be determined based on the predicted weight distribution of multidimensional interests and the predicted indicator parameters, thereby combining multiple interests with recommendation goals to perform video recommendation and improve the effect of video recommendation. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of this application, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating a video recommendation method provided in an embodiment of this application;
[0021] Figure 2 This is a schematic diagram of the structure of a video recommendation device provided in an embodiment of this application;
[0022] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] The terms "first," "second," etc., used in the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: including A alone, B alone, C alone, both A and B present, both B and C present, both A and C present, and A, B, and C present.
[0025] Please see Figure 1 , Figure 1 This is a flowchart illustrating a video recommendation method provided in an embodiment of this application, as shown below. Figure 1 As shown, it includes the following steps:
[0026] Step 101: Obtain a video sequence, which includes multiple videos and the playback time of each video.
[0027] It is understood that in the above video sequence, different videos can be represented using video identification documents (IDs), and the video sequence can be a record of video viewing acquired within a period of time prior to the current time, representing the video watched at each time point in the form of the video sequence. Multiple videos in the above video sequence may include the same video. For example, when acquiring videos corresponding to multiple moments at preset time intervals, if the viewed video is long, the videos corresponding to adjacent moments may be identical; or the same video may be watched again at different times, such as different users of a home television watching the same video at different times, or the same user repeatedly watching the same video.
[0028] In addition, the playback time of each video in the above video sequence can also be represented by the start time of the video viewing or the median of the viewing time period. Alternatively, the playback times of each video in the above video sequence are recorded at equal intervals, and the above video sequence can be formed by obtaining the videos corresponding to each time interval.
[0029] Step 102: Input the target time and the video sequence into the first model to predict the interest distribution vector, so as to obtain the interest distribution vector corresponding to the target time. The interest distribution vector is used to represent the weight distribution of multidimensional interests.
[0030] The aforementioned multidimensional interests can be predetermined. For example, multiple interest categories can be extracted by acquiring a collection of historically viewed videos. Each dimension of interest can correspond to an interest category. For example, interests can be classified according to the video's presentation style as: movie interests, anime interests, and variety show interests; or, interests can be classified according to the video's content as: food interests, comedy interests, science interests, and gaming interests.
[0031] The aforementioned interest distribution vector is used to represent the weight distribution of multidimensional interests, that is, the first model can predict the user's preferences for each dimension of interests at the target time.
[0032] Optionally, before inputting the target time and the video sequence into the first model to predict the interest distribution vector in step 102, the method may further include the following steps:
[0033] Obtain the aforementioned historical video collection;
[0034] The third model is used to extract features from the historical video set to obtain the multidimensional interest vector matrix, wherein the multidimensional interest vector matrix includes multiple interest vectors, each of which is used to represent a one-dimensional interest.
[0035] Specifically, the third model mentioned above can be constructed based on the Controllable Multi-Interest Framework for Recommendation (ComiRec) algorithm. By acquiring a set of historical videos, it captures multi-dimensional interests, with each dimension of interest represented by an interest vector, thus forming the aforementioned multi-dimensional interest vector matrix.
[0036] In some embodiments, such as in a home television scenario, historical viewing data of each household user over a period of time can be obtained at preset time intervals to extract a historical video set. The third model described above is then used to extract features from the historical video set to obtain a multidimensional interest vector matrix corresponding to that period of time.
[0037] In this implementation, a third model is used to extract features from the historical video set to obtain the multidimensional interest vector matrix. That is, the multidimensional interests are decoupled through the historical video set, i.e., the existing multidimensional interests are determined based on the historical video set.
[0038] It can be understood that the target time mentioned above can be the time for video recommendation. The target time and the video sequence mentioned above are input into the first model to predict the weight distribution of the multidimensional interest under the target time, that is, the sum of the weights of each dimension of interest is 1, that is, the magnitude of the interest distribution vector is 1.
[0039] Step 103: Input the pre-acquired historical video set, multiple candidate videos, and multidimensional interest vector matrix into the second model to predict the index parameters, so as to obtain the predicted index parameters for each candidate video.
[0040] The candidate videos mentioned above can be all videos in the resource library, or videos pre-selected based on the aforementioned historical video set. The prediction metric parameters for each candidate video can include the prediction metric parameters corresponding to each dimension of interest, i.e., the metric parameters for each type of interest for the candidate video.
[0041] The aforementioned metrics can include various target measurement parameters, such as click-through rate, completion rate, viewing time, and value-added revenue, which can be used to measure the effectiveness of the corresponding target achievement.
[0042] Step 104: Based on the interest distribution vector and the prediction index parameters, obtain the recommendation score for each candidate video.
[0043] It is understandable that the above recommendation score is obtained based on the above interest distribution vector and the above prediction index parameters. That is, the above recommendation score can comprehensively consider multi-dimensional interests and index parameters, rather than just making video recommendations to improve a certain index.
[0044] Optionally, the step 104, which involves obtaining a recommendation score for each candidate video based on the interest distribution vector and the prediction parameter information, may specifically include:
[0045] Based on the interest distribution vector and the prediction index parameters, a recommendation score is obtained for each candidate video using a recommendation function;
[0046] The recommendation function includes a first equilibrium parameter, which is used to balance the multidimensional interests with the prediction index parameters.
[0047] The aforementioned interest distribution vector represents the probability distribution of recommended video categories at the target time. For example, the video category corresponding to the interest vector with the largest weight in the interest distribution vector represents the video category that the user is most likely to be interested in at the target time. The aforementioned prediction index parameters represent the corresponding index performance. By using the aforementioned first equilibrium parameter, the index performance can be improved while ensuring user experience, thereby balancing multi-dimensional interests with the aforementioned prediction index parameters.
[0048] In this embodiment, a recommendation function is used to obtain the recommendation score of each candidate video based on the interest distribution vector and the prediction index parameters. The recommendation function includes a first equilibrium parameter, which is used to balance the multidimensional interests and the prediction index parameters. That is, the multidimensional interests and the prediction index parameters can be balanced by the first mean parameter in the recommendation function, and the relative balance between the multidimensional interests and the prediction index parameters can be achieved by adjusting the first mean parameter.
[0049] Step 105: Recommend the multiple candidate videos according to the recommendation score of each candidate video.
[0050] In this embodiment, the executing entity can be a server or a video display terminal device (such as a television), or other terminal devices. When the executing entity is a video display terminal device, the video can be displayed directly according to the above recommendations. When the executing entity is a server or other terminal devices, the above video recommendation results can be sent to the video display terminal device, and then the corresponding video can be displayed through the video display terminal device.
[0051] In this embodiment, the target time and the video sequence are input into a first model to predict the interest distribution vector, thereby obtaining the interest distribution vector corresponding to the target time. The interest distribution vector is used to represent the weight distribution of multidimensional interests. A pre-acquired set of historical videos, multiple candidate videos, and a multidimensional interest vector matrix are input into a second model to predict the indicator parameters, thereby obtaining the predicted indicator parameters for each candidate video. Based on the interest distribution vector and the predicted indicator parameters, a recommendation score for each candidate video is obtained. That is, the recommendation score for each candidate video can be determined based on the predicted weight distribution of multidimensional interests and the predicted indicator parameters, thereby combining multiple interests with recommendation goals to perform video recommendation and improve the effect of video recommendation.
[0052] Optionally, the prediction index parameters include click-through rate information and completion rate information corresponding to each dimension of interest;
[0053] The recommendation function also includes a second balancing parameter, which is used to adjust the relative weights of the click-through rate information and the completion rate information.
[0054] In some embodiments, the prediction metric parameters for each candidate video can be obtained by weighted summation of the click-through rate information and the completion rate information. The second equilibrium parameter can be understood as the weight of either the click-through rate or the completion rate. Correspondingly, the weight of the other term is 1 - the second equilibrium parameter.
[0055] In this embodiment, the recommendation function further includes a second balancing parameter, which is used to adjust the relative weights of the click-through rate information and the completion rate information. That is, the relative weights of the click-through rate information and the completion rate information can be balanced through the second balancing parameter in the recommendation function, and the relative weights of the click-through rate information and the completion rate information can be adjusted by adjusting the second balancing parameter.
[0056] Optionally, the second model is trained in the following manner:
[0057] The first training sample is input into the second model to obtain the output of the second model. The first training sample includes a historical video set sample, the multidimensional interest vector matrix, and the click-through rate label and completion rate label of each video in the historical video set sample.
[0058] Based on the Bayesian personalized ranking algorithm, the first loss value of the output of the second model is obtained;
[0059] Based on the first loss value, update the model parameters of the second model.
[0060] The first training sample may include negative samples, for example, multiple videos may be randomly selected as negative samples for the click-through rate label.
[0061] In this embodiment, by iteratively training the second model and updating its model parameters, the prediction accuracy of the second model can be improved.
[0062] Optionally, the first model is trained in the following manner:
[0063] The second training sample is input into the first model to obtain the output of the first model. The second training sample includes a first time, video sequence samples, and interest distribution vector samples.
[0064] Based on the interest distribution vector samples, determine the second loss value of the output of the first model;
[0065] Based on the second loss value, update the model parameters of the first model.
[0066] In this embodiment, the model parameters of the first model are updated by iteratively training the first model, thereby improving the prediction accuracy of the first model.
[0067] Optionally, the video training samples include the target video corresponding to the first time.
[0068] The interest distribution vector samples are determined based on the similarity between the target video and the multidimensional interest vector matrix.
[0069] The similarity between the target video and the multidimensional interest vector matrix can be determined using cosine similarity. For example, the target video can be represented as a video vector according to multiple videos in the video sequence. By calculating the cosine similarity between the video vector and the multidimensional interest vector matrix, the weight of each dimension of the interest vector is determined and used as the interest distribution vector sample.
[0070] In this embodiment, by training the first model with the interest distribution vector samples determined based on the similarity between the target video and the multidimensional interest vector matrix, the interest distribution vectors predicted by the first model can be made to be consistent with the interest distribution vector samples determined based on the target video, thereby improving the prediction accuracy of the first model.
[0071] The various optional implementation methods described in the embodiments of this application can be combined with each other or implemented individually without conflict. The embodiments of this application do not limit this.
[0072] For ease of understanding, a specific example is as follows:
[0073] This application also provides a multi-objective recommendation method that can be used for Internet TV home user scenarios, specifically including the following steps:
[0074] Step 1: Construct a user interest decoupling model and obtain the multi-dimensional interest matrix V of household users based on user viewing records. u The representation vector I of each item j ;
[0075] Specifically, step 1 may include the following steps:
[0076] Collect user behavior history S u And related characteristic data of the items, including S u = [I1, I2, ..., I n ];
[0077] This application employs a user interest decoupling model, modeling household users as K interest vectors, each vector representing an interest in one dimension, such as movie interest, anime interest, TV series interest, etc. Using the ComiRec algorithm as an example, this application utilizes a self-attention mechanism to achieve multi-interest decoupling for users.
[0078] The ComiRec algorithm can be used to obtain the multidimensional interest vector matrix V of user u. u The representation vector I of each item j V u A matrix consisting of K vectors, i.e. in,
[0079] The prediction process of the multi-interest decoupling model is as follows: Input the user's historical records S u This refers to the historical viewing sequence of user u, and the model output is the multidimensional interest vector matrix V of that user. u V u It is a matrix composed of K vectors.
[0080] Step 2: Construct a user interest intent prediction model to predict user interests based on recommendation time t and user real-time sequence H. u Predict the distribution of user interests at time t.
[0081] Step 2 may specifically include the following steps:
[0082] User Intent Prediction Model Construction: Based on step 1, a user intent prediction model is constructed. The inputs to the model are the recommendation time t and the user's historical sequence H. u The model output is a K-dimensional vector d. target This corresponds to the weights of the K vectors after user decoupling in step 1, i.e., the distribution of the user's K interests at prediction time t.
[0083] Where H u For user sequences containing historical time, and the videos watched by user u at each moment.
[0084] H u =[(i1,t1),(i2,t2),…(i n , t n )];
[0085] The training samples for the user intent prediction model are constructed as follows: Based on step 1, the K-dimensional interest matrix V of household users is obtained. u The representation vector I of each item j For user u, the historical sequence of training samples is H. u The training target item is I. target The training target interaction time is t.target Therefore, the user's target item I can be calculated. target K-dimensional interests of users The similarity between them is used as the basis for user t. target Interest distribution value d at time t target A typical method for calculating similarity is cosine similarity. After vector normalization (vector magnitude is 1), the calculation method is as follows:
[0086] d target =I target *V u ;
[0087] That is, d target ∈R K After the calculation, d also needs to be adjusted. target To normalize the elements so that their sum is 1, this application provides a normalization method as follows:
[0088]
[0089] in, This represents the normalized interest distribution vector of the target item. This represents the interest distribution vector of the target item. This represents the interest distribution vector of the target items for target j;
[0090] That is, we obtain the normalized d. target The d used subsequently target This is the result after normalization;
[0091] The input to the user intent prediction model is the user's historical records H. u The recommended time t, the output is d. predict This refers to the weight distribution of the user's K interests predicted by the model. During training, the d generated in the above steps is used. target As training labels, the training objective is to make the interest distribution vector predicted by the model consistent with the calculated interest distribution vector of the target item. A typical training loss is the KL divergence (Kullback-Leibler divergence), which is calculated as follows:
[0092] L KL =∑d target *log(d predict );
[0093] Among them, L KL d represents the loss value. target d represents the interest distribution vector of the target item being calculated. predict This represents the interest distribution vector predicted by the model;
[0094] When making online inference predictions, input the user's historical records H u Given the current recommendation time t, output the predicted user interest distribution d at the current time. predict , representing the weight distribution of the user's K interest distributions;
[0095] Step 3: Construct a multi-objective recommendation model to predict metrics such as click-through rate, conversion rate, and playback duration of candidate items based on the user's interest vector;
[0096] Step 3 may specifically include the following steps:
[0097] The input to the multi-objective recommendation model is the user's historical records S. u User's interest vector V u Relevant characteristics of the item, candidate item C i The output consists of user scores for each target based on their various interests in the candidate items. Here, j represents the objective, such as click-through rate (CTR) or completion rate (CTR). One construction method involves sharing underlying parameters, while modeling each upper-level objective separately, with each model outputting a score for each objective. For ease of explanation, this solution uses CTR and CTR as examples, but practical applications are not limited to these two objectives.
[0098] Using click-through rate and completion rate as examples, we construct training samples for a multi-objective model. User historical sequence S u User's interest vector V u The item clicked after the sequence is I. click If a user clicks on an item and the playback completes, the completion rate label is 1; otherwise, it is 0. Within the range of all items, N items are randomly selected as negative samples for click labels.
[0099] Training and prediction process of multi-objective model: During training, the model output is the user's interest vector and the click-through rate p of candidate items. click Completion rate p complete The training objective of the model is to ensure that the output click-through rate and completion rate match the actual tags. The loss function used in this application is BPR loss (Bayesian Personalized Ranking loss).
[0100] Step 4: Combining the user interest distribution at time t with the multi-objective prediction indicators for each interest, and comprehensively considering multiple objectives of multiple interests, the candidate items are ranked according to the comprehensive indicators to obtain the final recommendation result.
[0101] Step 4 may specifically include the following steps:
[0102] Based on the steps described above, for a given user u, its historical sequence S is known. u H u At the current time t, candidate item C i The K-dimensional interest V of user u can be obtained through a user interest decoupling model. u The user's intent d at time t is obtained through a user intent prediction model, and the user's interests in various dimensions for item C are obtained through a multi-objective model. i Click-through rate prediction and predicted completion rate
[0103] In applications, multiple interests and multiple goals can be balanced according to actual needs, achieving a balance between various objectives without compromising user experience, thus ensuring the achievement of multiple goals. This application proposes a balancing method that uses parameters m and q to score the balance between interest expression and the effectiveness of achieving multiple goals. The specific calculation method is as follows:
[0104]
[0105] Where Score represents the recommendation score, K represents the dimension of the multidimensional interest, and d k d represents the interest distribution vector corresponding to k-dimensional interests. j Let represent the interest distribution vector corresponding to the j-dimensional interest, where m and q represent set parameters. Represents k-dimensional interest for item C i The predicted click-through rate. Represents k-dimensional interest for item C i The predicted completion rate.
[0106] By controlling the parameter m, a balance can be achieved between multiple interests and multiple objectives. The larger the parameter m, the smaller the impact of multiple interests on multiple objectives, meaning that the ability of multi-objective recommendations to perceive interests becomes weaker. The parameter q can achieve a balance among multiple objectives. When q is 0.5, the click-through rate and completion rate have the same weight. When q is 1, only the click-through rate is considered as the ranking criterion.
[0107] Based on the recommended scores obtained from the above steps, the candidate items are sorted, with the items with higher scores placed at the top, thus obtaining the final sorting result.
[0108] In this embodiment of the application, in the scenario of family user recommendation, a combination of multiple goals and multiple interests is achieved. Furthermore, multiple interest goals can be comprehensively considered and measured based on the current user's interests and preferences, thereby improving the recommendation experience for family users while satisfying multiple recommendation goals. Moreover, in the formula for calculating the recommendation score, the parameters m and q allow for controllable and configurable expression of interests and weights of multiple goals, making the recommendation process more flexible and able to meet diverse recommendation needs.
[0109] See Figure 2 , Figure 2 This is a schematic diagram of the structure of a video recommendation device provided in an embodiment of this application. Figure 2 As shown, the video recommendation device 200 includes:
[0110] The first acquisition module 201 is used to acquire a video sequence, wherein the video sequence includes multiple videos and the playback time of each video;
[0111] The first prediction module 202 is used to input the target time and the video sequence into the first model to predict the interest distribution vector, so as to obtain the interest distribution vector corresponding to the target time, wherein the interest distribution vector is used to represent the weight distribution of multidimensional interest;
[0112] The second prediction module 203 is used to input the pre-acquired historical video set, multiple candidate videos and multi-dimensional interest vector matrix into the second model to predict the index parameters, so as to obtain the predicted index parameters of each candidate video.
[0113] The second acquisition module 204 is used to acquire the recommendation score of each candidate video based on the interest distribution vector and the prediction index parameters.
[0114] The recommendation module 205 is used to recommend the multiple candidate videos according to the recommendation score of each candidate video.
[0115] Optionally, the video recommendation device 200 may also include:
[0116] The third acquisition module is used to acquire the historical video set;
[0117] The extraction module is used to extract features from the historical video set using a third model to obtain the multidimensional interest vector matrix, wherein the multidimensional interest vector matrix includes multiple interest vectors, each of which is used to represent a one-dimensional interest.
[0118] Optionally, the second acquisition module 204 may specifically include:
[0119] The acquisition unit is used to obtain the recommendation score of each candidate video based on the interest distribution vector and the prediction index parameters using a recommendation function;
[0120] The recommendation function includes a first equilibrium parameter, which is used to balance the multidimensional interests with the prediction index parameters.
[0121] The prediction index parameters include click-through rate and completion rate information corresponding to each dimension of interest;
[0122] The recommendation function also includes a second balancing parameter, which is used to adjust the relative weights of the click-through rate information and the completion rate information.
[0123] Optionally, the second model is trained in the following manner:
[0124] The first training sample is input into the second model to obtain the output of the second model. The first training sample includes a historical video set sample, the multidimensional interest vector matrix, and the click-through rate label and completion rate label of each video in the historical video set sample.
[0125] Based on the Bayesian personalized ranking algorithm, the first loss value of the output of the second model is obtained;
[0126] Based on the first loss value, update the model parameters of the second model.
[0127] Optionally, the first model is trained in the following manner:
[0128] The second training sample is input into the first model to obtain the output of the first model. The second training sample includes a first time, video sequence samples, and interest distribution vector samples.
[0129] Based on the interest distribution vector samples, determine the second loss value of the output of the first model;
[0130] Based on the second loss value, update the model parameters of the first model.
[0131] Optionally, the video training samples include the target video corresponding to the first time.
[0132] The interest distribution vector samples are determined based on the similarity between the target video and the multidimensional interest vector matrix.
[0133] The video recommendation device 200 can achieve the functions described in the embodiments of this application. Figure 1 The various processes in the method embodiments, and the ways to achieve the same beneficial effects, will not be repeated here to avoid repetition.
[0134] This application also provides an electronic device. Because the principle by which the electronic device solves the problem is similar to that in the embodiments of this application... Figure 1The video recommendation method shown is similar; therefore, the implementation of this electronic device can be found in the method implementation section, and repeated details will not be elaborated upon. For example... Figure 3 As shown, the electronic device in this application embodiment includes a memory 320, a transceiver 310, and a processor 300;
[0135] The memory 320 is used to store computer programs; the transceiver 310 is used to send and receive data under the control of the processor 300; the processor 300 is used to read the computer program in the memory 320 and perform the following operations:
[0136] Obtain a video sequence, which includes multiple videos and the playback time of each video;
[0137] The target time and the video sequence are input into the first model to predict the interest distribution vector, so as to obtain the interest distribution vector corresponding to the target time. The interest distribution vector is used to represent the weight distribution of multidimensional interest.
[0138] The pre-acquired historical video set, multiple candidate videos, and multi-dimensional interest vector matrix are input into the second model to predict the index parameters, so as to obtain the predicted index parameters for each candidate video.
[0139] Based on the interest distribution vector and the prediction index parameters, a recommendation score is obtained for each candidate video;
[0140] The multiple candidate videos are recommended based on the recommendation score of each candidate video.
[0141] Among them, Figure 3 In this context, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 300) and memory (memory 320). The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface. Transceiver 310 may be multiple elements, including transmitters and transceivers, providing a unit for communicating with various other devices over a transmission medium. Processor 300 is responsible for managing the bus architecture and general processing, and memory 320 may store data used by processor 300 during operation.
[0142] The processor 300 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a complex programmable logic device (CPLD). The processor can also adopt a multi-core architecture.
[0143] Optionally, the processor 300 is also used to read the program from the memory 320 and perform the following steps:
[0144] Obtain the aforementioned historical video collection;
[0145] The third model is used to extract features from the historical video set to obtain the multidimensional interest vector matrix, wherein the multidimensional interest vector matrix includes multiple interest vectors, each of which is used to represent a one-dimensional interest.
[0146] Optionally, obtaining the recommendation score for each candidate video based on the interest distribution vector and the prediction parameter information includes:
[0147] Based on the interest distribution vector and the prediction index parameters, a recommendation score is obtained for each candidate video using a recommendation function;
[0148] The recommendation function includes a first equilibrium parameter, which is used to balance the multidimensional interests with the prediction index parameters.
[0149] Optionally, the prediction index parameters include click-through rate information and completion rate information corresponding to each dimension of interest;
[0150] The recommendation function also includes a second balancing parameter, which is used to adjust the relative weights of the click-through rate information and the completion rate information.
[0151] Optionally, the second model is trained in the following manner:
[0152] The first training sample is input into the second model to obtain the output of the second model. The first training sample includes a historical video set sample, the multidimensional interest vector matrix, and the click-through rate label and completion rate label of each video in the historical video set sample.
[0153] Based on the Bayesian personalized ranking algorithm, the first loss value of the output of the second model is obtained;
[0154] Based on the first loss value, update the model parameters of the second model.
[0155] Optionally, the first model is trained in the following manner:
[0156] The second training sample is input into the first model to obtain the output of the first model. The second training sample includes a first time, video sequence samples, and interest distribution vector samples.
[0157] Based on the interest distribution vector samples, determine the second loss value of the output of the first model;
[0158] Based on the second loss value, update the model parameters of the first model.
[0159] Optionally, the video training samples include the target video corresponding to the first time.
[0160] The interest distribution vector samples are determined based on the similarity between the target video and the multidimensional interest vector matrix.
[0161] The electronic device provided in this application embodiment can perform the above-described functions. Figure 1 The method embodiments shown are similar in principle and technical effect, and will not be described again here.
[0162] This application also provides a readable storage medium storing a program that, when executed by a processor, implements the following... Figure 1 The various processes in the Chinese method embodiment can achieve the same technical effect, and will not be described again here to avoid repetition.
[0163] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0164] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can be physically included separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0165] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the transmission and reception methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0166] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles described in this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A video recommendation method, characterized in that, include: Obtain a video sequence, which includes multiple videos and the playback time of each video; The target time and the video sequence are input into the first model to predict the interest distribution vector, so as to obtain the interest distribution vector corresponding to the target time. The interest distribution vector is used to represent the weight distribution of multidimensional interest. The pre-acquired historical video set, multiple candidate videos, and multi-dimensional interest vector matrix are input into the second model to predict the index parameters, so as to obtain the predicted index parameters of each candidate video. The predicted index parameters of each candidate video include the predicted index parameters corresponding to each dimension of interest. Based on the interest distribution vector and the prediction index parameters, a recommendation score is obtained for each candidate video; The multiple candidate videos are recommended based on the recommendation score of each candidate video; Before inputting the target time and the video sequence into the first model to predict the interest distribution vector, the method further includes: Obtain the aforementioned historical video collection; The third model is used to extract features from the historical video set to obtain the multidimensional interest vector matrix, wherein the multidimensional interest vector matrix includes multiple interest vectors, each of which is used to represent a one-dimensional interest.
2. The method as described in claim 1, characterized in that, The step of obtaining a recommendation score for each candidate video based on the interest distribution vector and the prediction parameter information includes: Based on the interest distribution vector and the prediction index parameters, a recommendation score is obtained for each candidate video using a recommendation function; The recommendation function includes a first equilibrium parameter, which is used to balance the multidimensional interests with the prediction index parameters.
3. The method as described in claim 2, characterized in that, The prediction index parameters include click-through rate and completion rate information corresponding to each dimension of interest; The recommendation function also includes a second balancing parameter, which is used to adjust the relative weights of the click-through rate information and the completion rate information.
4. The method as described in claim 3, characterized in that, The second model was trained in the following way: The first training sample is input into the second model to obtain the output of the second model. The first training sample includes a historical video set sample, the multidimensional interest vector matrix, and the click-through rate label and completion rate label of each video in the historical video set sample. Based on the Bayesian personalized ranking algorithm, the first loss value of the output of the second model is obtained; Based on the first loss value, update the model parameters of the second model.
5. The method according to any one of claims 1 to 4, characterized in that, The first model was trained in the following way: The second training sample is input into the first model to obtain the output of the first model. The second training sample includes a first time, video sequence samples, and interest distribution vector samples. Based on the interest distribution vector samples, determine the second loss value of the output of the first model; Based on the second loss value, update the model parameters of the first model.
6. The method as described in claim 5, characterized in that, The video training samples include the target video corresponding to the first time. The interest distribution vector samples are determined based on the similarity between the target video and the multidimensional interest vector matrix.
7. A video recommendation device, characterized in that, include: The first acquisition module is used to acquire a video sequence, which includes multiple videos and the playback time of each video; The first prediction module is used to input the target time and the video sequence into the first model to predict the interest distribution vector, so as to obtain the interest distribution vector corresponding to the target time, wherein the interest distribution vector is used to represent the weight distribution of multidimensional interest; The second prediction module is used to input a pre-acquired set of historical videos, multiple candidate videos, and a multi-dimensional interest vector matrix into the second model to predict the index parameters, so as to obtain the predicted index parameters of each candidate video. The predicted index parameters of each candidate video include the predicted index parameters corresponding to each dimension of interest. The second acquisition module is used to acquire the recommendation score of each candidate video based on the interest distribution vector and the prediction index parameters. The recommendation module is used to recommend the multiple candidate videos according to the recommendation score of each candidate video; The video recommendation device also includes: The third acquisition module is used to acquire the historical video set; The extraction module is used to extract features from the historical video set using a third model to obtain the multidimensional interest vector matrix, wherein the multidimensional interest vector matrix includes multiple interest vectors, each of which is used to represent a one-dimensional interest.
8. An electronic device, characterized in that, include: A transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; characterized in that, The processor is configured to read a program from memory to implement the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium for storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
A video interaction method and device based on interest clusters
CN109710805A
Video recommendation method and system
CN110019941A