A video recommendation method and device, electronic equipment and storage medium
By acquiring user attribute and behavioral features and using a recall model to generate interest representation vectors, the problem of inaccurate recommendations in existing technologies is solved, and high-precision video recommendations are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING QIYI CENTURY SCI & TECH CO LTD
- Filing Date
- 2022-10-09
- Publication Date
- 2026-05-05
AI Technical Summary
Existing video recommendation systems tend to recommend videos that users are not interested in when making recommendations based on their browsing history, resulting in low recommendation accuracy.
By acquiring the attribute features, positive behavior features, and negative behavior features of the target user, and using the main network and bias network in the pre-trained recall model, an interest representation vector is generated. The similarity between this vector and the video to be recommended is calculated, and the video with the highest similarity is selected for recommendation.
It improves the accuracy of video recommendations, recommending videos that users are interested in while avoiding recommending content that they are not interested in, thus achieving personalized video recommendations.
Smart Images

Figure CN115687690B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network data processing technology, and in particular to a video recommendation method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, with the rapid development of the internet, watching videos on various video platforms has become a popular way for many people to relax. To improve user experience, many video platforms often recommend videos that users might be interested in, which not only makes it easier for users to watch but also enhances their overall experience.
[0003] However, current video websites often recommend videos to users based on their viewing history. They recommend videos of a certain type that a user has watched. However, a user's viewing history often includes videos that the user is not interested in, leading to low accuracy in recommendations based on browsing history. Summary of the Invention
[0004] The purpose of this invention is to provide a video recommendation method, apparatus, electronic device, and storage medium to avoid recommending video content that is not of interest to the target user, thereby improving the accuracy of video recommendations. The specific technical solution is as follows:
[0005] According to a first aspect of the present invention, a video recommendation method is provided, the method comprising:
[0006] Obtain the target user's attribute characteristics, positive behavioral characteristics, and negative behavioral characteristics;
[0007] The target user's attribute features, positive behavior features, and negative behavior features are input into the main network of the pre-trained recall model to obtain the output vector corresponding to the main network; the target user's negative behavior features are input into the bias network of the pre-trained recall model to obtain the bias vector corresponding to the bias network.
[0008] The output vector corresponding to the main network and the bias vector corresponding to the bias network are fused to obtain the interest representation vector of the target user;
[0009] Calculate the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, and select the N videos with the highest similarity to recommend to the target user.
[0010] Optionally, the positive behavior features include feature information of multiple positive videos, wherein the positive videos are videos whose viewing time by the target user is greater than a first preset duration; the negative behavior features include feature information of multiple negative videos, wherein the negative videos are videos whose viewing time by the target user is less than a second preset duration.
[0011] The step of inputting the attribute features, positive behavior features, and negative behavior features of the target user into the main network of the pre-trained recall model to obtain the output vector corresponding to the main network includes:
[0012] The attribute features, positive behavior features, and negative behavior features of the target user are input into the main network of the pre-trained recall model;
[0013] The attribute features, the feature information of the positive video, and the feature information of the negative video are vectorized to obtain attribute feature vectors, positive behavior feature vectors, and negative behavior feature vectors;
[0014] Based on the attribute feature vector and the positive behavior feature vector, the weight of each positive video corresponding to the positive behavior feature is predicted, and the representation vector of each positive video is weighted and fused by the weight of each positive video to obtain the vector representation of the positive behavior feature.
[0015] Based on the attribute feature vector and the negative behavior feature vector, the weight of each negative video corresponding to the negative behavior feature is predicted, and the representation vector of each negative video is weighted and fused by the weight of each negative video to obtain the vector representation of the negative behavior feature.
[0016] The vector representations of the positive and negative behavioral features are fused to obtain the output vector corresponding to the main network.
[0017] Optionally, the step of inputting the negative behavioral features of the target user into the bias network of the pre-trained recall model to obtain the bias vector corresponding to the bias network includes:
[0018] The negative behavioral features of the target user are input into the bias network of the pre-trained recall model;
[0019] The negative behavior features are vectorized using the bias network to obtain the negative behavior feature vector;
[0020] The negative behavior feature vector and the corresponding output vector of the main network are concatenated.
[0021] The concatenated vector is passed through the fully connected layer of the bias network to output the bias vector corresponding to the bias network.
[0022] Optionally, the step of calculating the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, and selecting the N videos with the highest similarity to recommend to the target user, includes:
[0023] Calculate the similarity between the interest representation vector and the representation vectors of the multiple videos to be recommended;
[0024] The multiple videos to be recommended are sorted in descending order of the calculated similarity to obtain a sorted video sequence.
[0025] The first N videos in the video sequence are selected and recommended to the target user.
[0026] According to a second aspect of the present invention, a recall model training method is provided, the method comprising:
[0027] Obtain positive sample videos and negative sample videos, wherein the positive sample videos are videos in which multiple target users watch for a duration greater than a first preset duration, and the negative sample videos are videos in which multiple target users watch for a duration less than a second preset duration;
[0028] The positive and negative sample videos are input into the recall model to be trained to obtain the positive and negative sample video representation vectors, respectively.
[0029] The attribute features, positive behavior features, and negative behavior features of the target user are acquired and input into the recall model to be trained to obtain the predicted interest representation vector of the target user;
[0030] Calculate a first difference between the predicted interest representation vector and the positive sample video representation vector, and a second difference between the predicted interest representation vector and the negative sample video representation vector;
[0031] The parameters of the recall model to be trained are adjusted according to the first difference and the second difference, and the process returns to the step of inputting the positive sample video and the negative sample video into the recall model to be trained to obtain the positive sample video representation vector and the negative sample video representation vector respectively, and continues training until the preset requirements are met and the trained recall model is obtained.
[0032] According to a third aspect of the present invention, a video recommendation device is provided, the device comprising:
[0033] The feature acquisition module is used to acquire the attribute features, positive behavior features, and negative behavior features of the target user;
[0034] The network output module is used to input the attribute features, positive behavior features, and negative behavior features of the target user into the main network of the pre-trained recall model to obtain the output vector corresponding to the main network; and to input the negative behavior features of the target user into the bias network of the pre-trained recall model to obtain the bias vector corresponding to the bias network.
[0035] The vector fusion module is used to fuse the output vector corresponding to the main network and the bias vector corresponding to the bias network to obtain the interest representation vector of the target user.
[0036] The video recommendation module is used to calculate the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, and select the N videos with the highest similarity to recommend to the target user.
[0037] Optionally, the positive behavior features include feature information of multiple positive videos, wherein the positive videos are videos whose viewing time by the target user is greater than a first preset duration; the negative behavior features include feature information of multiple negative videos, wherein the negative videos are videos whose viewing time by the target user is less than a second preset duration.
[0038] The network output module includes:
[0039] The feature input submodule is used to input the attribute features, positive behavior features, and negative behavior features of the target user into the main network of the pre-trained recall model;
[0040] The feature vector generation submodule is used to vectorize the attribute features, the feature information of the positive video, and the feature information of the negative video to obtain attribute feature vectors, positive behavior feature vectors, and negative behavior feature vectors.
[0041] The vector representation generation submodule for positive behavior features is used to predict the weight of each positive video corresponding to the positive behavior feature based on the attribute feature vector and the positive behavior feature vector, and to perform weighted fusion of the representation vectors of each positive video through the weight of each positive video to obtain the vector representation of the positive behavior feature.
[0042] The negative behavior feature vector representation generation submodule is used to predict the weight of each negative video corresponding to the negative behavior feature based on the attribute feature vector and the negative behavior feature vector, and to perform weighted fusion of the representation vectors of each negative video through the weight of each negative video to obtain the vector representation of the negative behavior feature.
[0043] The main network output vector generation submodule is used to fuse the vector representations of the positive behavioral features and the vector representations of the negative behavioral features to obtain the output vector corresponding to the main network.
[0044] Optionally, the network output module includes:
[0045] The negative behavior feature input submodule is used to input the negative behavior features of the target user into the bias network of the pre-trained recall model;
[0046] The negative behavior feature vectorization submodule is used to vectorize the negative behavior features through the bias network to obtain a negative behavior feature vector.
[0047] The vector concatenation submodule is used to concatenate the negative behavior feature vector and the corresponding output vector of the main network;
[0048] The bias vector generation submodule is used to pass the concatenated vector through the fully connected layer of the bias network to output the bias vector corresponding to the bias network.
[0049] Optionally, the video recommendation module includes:
[0050] The similarity calculation submodule is used to calculate the similarity between the interest representation vector and the representation vectors of the multiple videos to be recommended;
[0051] The video sorting submodule is used to sort the multiple videos to be recommended in descending order of the calculated similarity, so as to obtain a sorted video sequence;
[0052] The video selection submodule is used to select the first N videos in the video sequence and recommend them to the target user.
[0053] According to a fourth aspect of the present invention, a recall model training apparatus is provided, the apparatus comprising:
[0054] The sample video acquisition module is used to acquire positive sample videos and negative sample videos, wherein the positive sample videos are videos in which multiple target users watch for a duration greater than a first preset duration, and the negative sample videos are videos in which multiple target users watch for a duration less than a second preset duration.
[0055] The sample input module is used to input the positive sample video and the negative sample video into the recall model to be trained, and obtain the positive sample video representation vector and the negative sample video representation vector, respectively.
[0056] The vector prediction module is used to acquire and input the attribute features, positive behavior features and negative behavior features of the target user into the recall model to be trained, so as to obtain the predicted interest representation vector of the target user;
[0057] The difference calculation module is used to calculate a first difference between the predicted interest representation vector and the positive sample video representation vector, and a second difference between the predicted interest representation vector and the negative sample video representation vector;
[0058] The parameter adjustment module is used to adjust the parameters of the recall model to be trained according to the first difference and the second difference, and return to the step of inputting the positive sample video and the negative sample video into the recall model to be trained to obtain the positive sample video representation vector and the negative sample video representation vector respectively, and continue training until the preset requirements are met to obtain the trained recall model.
[0059] According to a fifth aspect of the present invention, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0060] Memory, used to store computer programs;
[0061] A processor, when executing a program stored in memory, implements any of the steps described in the video recommendation method.
[0062] According to a sixth aspect of the present invention, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0063] Memory, used to store computer programs;
[0064] The processor, when executing a program stored in memory, implements any of the steps described in the recall model training method.
[0065] According to a seventh aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements any of the steps of the video recommendation method.
[0066] According to an eighth aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements any of the steps of the recall model training method.
[0067] Beneficial effects of the embodiments of the present invention:
[0068] This invention provides a video recommendation method, apparatus, electronic device, and storage medium. The method involves acquiring the attribute features, positive behavioral features, and negative behavioral features of a target user; inputting these features into the main network of a pre-trained recall model to obtain the output vector of the main network; inputting the negative behavioral features into a bias network of the same model to obtain a bias vector; fusing the output vector of the main network and the bias vector to obtain the target user's interest representation vector; calculating the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended; and selecting the N videos with the highest similarity to recommend to the target user. Since the target user's interest representation vector is derived from both positive and negative behavioral features, video recommendation using this vector not only recommends videos of interest based on learned positive behavioral features but also avoids recommending videos of disinterest based on learned negative behavioral features, thereby improving the accuracy of video recommendations.
[0069] Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0070] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0071] Figure 1 This is a flowchart of the first type of video recommendation method provided in the embodiments of the present invention;
[0072] Figure 2 This is a second flowchart of the video recommendation method provided in the embodiments of the present invention;
[0073] Figure 3 This is a third flowchart of the video recommendation method provided in the embodiments of the present invention;
[0074] Figure 4 This is a flowchart of a recall model training method provided in an embodiment of the present invention;
[0075] Figure 5 This is a schematic diagram illustrating the process of generating interest representation vectors using the recall model provided in this embodiment of the invention;
[0076] Figure 6This is a schematic diagram of the background operation process of the video platform provided in an embodiment of the present invention;
[0077] Figure 7 This is a schematic diagram of the structure of the video recommendation device provided in an embodiment of the present invention;
[0078] Figure 8 This is a schematic diagram of the structure of the recall model training device provided in an embodiment of the present invention;
[0079] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention;
[0080] Figure 10 This is a schematic diagram of the structure of another electronic device provided in an embodiment of the present invention. Detailed Implementation
[0081] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art based on the present invention are within the scope of protection of the present invention.
[0082] This invention provides a video recommendation method, comprising: acquiring the attribute features, positive behavioral features, and negative behavioral features of a target user; inputting the attribute features, positive behavioral features, and negative behavioral features of the target user into the main network of a pre-trained recall model to obtain the output vector corresponding to the main network; inputting the negative behavioral features of the target user into the bias network of the pre-trained recall model to obtain the bias vector corresponding to the bias network; fusing the output vector corresponding to the main network and the bias vector corresponding to the bias network to obtain the interest representation vector of the target user; calculating the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, and selecting the N videos with the highest similarity to recommend to the target user. Since the interest representation vector of the target user is obtained based on positive and negative behavioral features, when recommending videos using the target user's interest representation vector, it is possible not only to recommend videos that the user is interested in based on the learned positive behavioral features, but also to avoid recommending video content that the target user is not interested in based on the learned negative behavioral features, thereby improving the accuracy of video recommendation.
[0083] The following is a detailed explanation:
[0084] The video recommendation method provided in this embodiment of the invention can be implemented by an electronic device, such as a computer or a server.
[0085] See Figure 1 The video recommendation methods mentioned above include:
[0086] S110, obtain the target user's attribute characteristics, positive behavior characteristics, and negative behavior characteristics.
[0087] The target user's attributes can include: basic information and preference information. Basic information can include the target user's age, gender, occupation, city, and commonly used applications. Preference information can include the target user's preferred video types and preferred video tags. For example, if a user likes to watch action-packed videos, then the user's preferred video type is action-packed. In another example, if a user likes to watch videos tagged as food, then the user's preferred video tag information is food.
[0088] Specifically, positive behavioral features correspond to positive viewing behaviors. These can be behavioral features indicating the target user's preferences, such as watching a video for a long time or liking a video. Negative behavioral features correspond to negative viewing behaviors. These can be behavioral features indicating the target user's dislikes, such as watching a video for a short time, quickly switching between videos, or giving a video a low rating.
[0089] S120: Input the target user's attribute features, positive behavior features, and negative behavior features into the pre-trained recall model's main network to obtain the output vector corresponding to the main network; input the target user's negative behavior features into the pre-trained recall model's bias network to obtain the bias vector corresponding to the bias network.
[0090] In this embodiment of the invention, the structure of the pre-trained recall model can be divided into a main network and a bias network. The main network can be based on a long and short interest network, and the bias network can be based on a fully connected network. Furthermore, the bias network can learn a bias representation of negative viewing behavior through a fully connected network structure. Specifically, the bias representation can be a vector representation used to characterize negative viewing behavior. In this embodiment, the bias vector output by the bias network is the bias representation of negative viewing behavior. The training method of the pre-trained recall model in this embodiment can be referred to in subsequent embodiments, and will not be repeated here.
[0091] S130, the output vector corresponding to the main network and the bias vector corresponding to the bias network are fused to obtain the interest representation vector of the target user.
[0092] The above-mentioned fusion of the output vector corresponding to the main network and the bias vector corresponding to the bias network can be carried out in various ways. In one possible implementation, the output vector corresponding to the main network and the bias vector corresponding to the bias network can be fused by subtracting or adding them. In another possible implementation, the output vector corresponding to the main network and the bias vector corresponding to the bias network can be fused by weighted summation to obtain the interest representation vector of the target user.
[0093] S140: Calculate the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, and select the N videos with the highest similarity to recommend to the target user.
[0094] The similarity between the interest representation vector and the representation vectors of multiple videos to be recommended can be calculated using various methods, such as cosine similarity, Manhattan correlation coefficient, and Euclidean distance. In one example, the similarity can be obtained by calculating the cosine of the angle between the interest representation vector and the representation vectors of each video to be recommended. Then, the N videos with the highest corresponding similarity scores are selected and recommended to the target user. Specifically, after calculating the similarity between the interest representation vector and the representation vectors of each video to be recommended, the calculated similarity scores can be sorted according to their magnitude. The top N similarity scores are then selected, and the corresponding videos are recommended to the target user based on these N similarity scores.
[0095] In one possible implementation, step S140 calculates the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, and selects the N videos with the highest similarity to recommend to the target user. This includes: calculating the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended; sorting the multiple videos to be recommended in descending order of the calculated similarity to obtain a sorted video sequence; and selecting the top N videos in the video sequence to recommend to the target user. In actual use, the number of videos to be recommended is set according to actual needs. Multiple videos can be randomly selected from a video database, or multiple videos can be randomly selected from positive videos corresponding to positive behavioral features. The top N videos selected from the sorted video sequence are recommended to the target user, recommending videos with high similarity scores. The number of recommended videos is set according to needs. By calculating the similarity between the interest representation vector and multiple videos to be recommended, the N videos with the highest similarity are selected and recommended to the target user, accurately recommending videos that the target user is interested in, achieving a personalized recommendation effect.
[0096] The video recommendation method provided in this embodiment of the invention improves the accuracy of video recommendation because the target user's interest representation vector is obtained based on positive and negative behavioral features. This is because when recommending videos based on the target user's interest representation vector, the method can recommend videos that the user is interested in based on the learned positive behavioral features, and avoid recommending video content that the target user is not interested in based on the learned negative behavioral features.
[0097] In one possible implementation, the aforementioned positive behavior features may further include feature information of multiple positive videos corresponding to multiple positive viewing behaviors. A positive video can be a video whose viewing duration is longer than a first preset duration. Similarly, the aforementioned negative behavior features may further include feature information of multiple negative videos corresponding to multiple negative viewing behaviors. A negative video can be a video whose viewing duration is shorter than a second preset duration. For example, a positive video is a video with a viewing duration longer than 30 seconds, and a negative video is a video with a viewing duration shorter than 5 seconds. Specifically, in actual use, the aforementioned first and second preset durations can be set according to actual needs.
[0098] The feature information of the video mentioned above may include the video identifier and the video attributes. In one example, the video identifier of a video may be the video sequence number of the video, and the video attributes of the video may be the type, tags, etc. For example, the video identifier of a video may be the video ID (Identity document), and the video attributes of the video may be a lifestyle video, a video with a funny tag, etc.
[0099] In one possible implementation, see Figure 2 In step S120, the target user's attribute features, positive behavior features, and negative behavior features are input into the pre-trained main network of the recall model to obtain the output vector corresponding to the main network, which may include:
[0100] S121, Input the target user's attribute features, positive behavior features, and negative behavior features into the main network of the pre-trained recall model;
[0101] S122, vectorize the attribute features, the feature information of positive video and the feature information of negative video to obtain the attribute feature vector, the positive behavior feature vector and the negative behavior feature vector;
[0102] S123, Based on the attribute feature vector and the positive behavior feature vector, predict the weight of each positive video corresponding to the positive behavior feature, and then perform weighted fusion of the representation vectors of each positive video using the weight of each positive video to obtain the vector representation of the positive behavior feature;
[0103] S124. Based on the attribute feature vector and the negative behavior feature vector, predict the weight of each negative video corresponding to the negative behavior feature, and perform weighted fusion of the representation vectors of each negative video through the weight of each negative video to obtain the vector representation of the negative behavior feature.
[0104] S125 fuses the vector representations of positive and negative behavioral features to obtain the output vector corresponding to the main network.
[0105] In this embodiment of the invention, positive behavioral features can include long-term positive behavioral features and short-term positive behavioral features. Specifically, long-term positive behavioral features are features corresponding to long-term positive movie-watching behavior, specifically, behavioral features representing the preferences of target users in a first time interval. Short-term positive behavioral features are features corresponding to short-term positive movie-watching behavior, specifically, behavioral features representing the preferences of target users in a second time interval. Furthermore, the length of the first time interval is greater than the second time interval, and the time within the second time interval can be closer to the current time compared to the time within the first time interval. Specifically, long-term positive behavioral features can be movie-watching behavior with a viewing duration greater than a first preset duration in the first time interval. In one example, the length of the first time interval is 10 days, and movie-watching behavior with a viewing duration greater than 30 seconds can be counted from 11 days to 1 day prior to the current time. Short-term positive behavioral features can be movie-watching behavior with a viewing duration greater than the first preset duration in the second time interval. In one example, the length of the first time interval is 12 hours, and movie-watching behavior with a viewing duration greater than 30 seconds within 12 hours can be counted.
[0106] Specifically, the aforementioned long-term positive behavioral characteristics may also include feature information of multiple long-term positive videos corresponding to multiple long-term positive viewing behaviors, and the aforementioned short-term positive behavioral characteristics may also include feature information of multiple short-term positive videos corresponding to multiple short-term positive viewing behaviors.
[0107] Specifically, the target user's attribute features, positive behavior features, and negative behavior features are input into the main network of the pre-trained recall model. This allows the target user's attribute features, long-term positive behavior features, short-term positive behavior features, and negative behavior features to be input into the main network of the pre-trained recall model.
[0108] Specifically, the feature information of attribute features, positive video features, and negative video features can be vectorized to obtain attribute feature vectors, long-term positive video feature vectors, short-term positive video feature vectors, and negative video feature vectors.
[0109] Based on the attribute feature vector and the positive behavior feature vector, the weights of each positive video corresponding to the positive behavior feature are predicted. Then, the representation vectors of each positive video are weighted and fused using the weights of each positive video. Similarly, based on the attribute feature vector and the short-term positive behavior feature vector, the weights of each positive video corresponding to the long-term positive behavior feature are predicted. Finally, the representation vectors of each positive video are weighted and fused using the weights of each positive video to obtain the vector representation of the short-term positive behavior feature. Specifically, in this embodiment of the invention, based on the positive behavior feature vector, the weights of each positive video corresponding to the positive behavior feature are predicted according to the target user's preferences represented by the attribute feature vector. Specifically, the attribute feature vector and the positive behavior feature vector are concatenated to obtain a concatenated vector. The concatenated vector is then processed by the positive deep interest network in the main network to calculate the weights of each positive video corresponding to the positive behavior feature. The deep interest network calculates the weights of each positive video corresponding to the positive behavior feature based on the target user's preferences represented by the attribute feature vector and the feature information of each positive video corresponding to the positive behavior feature vector. Then, the representation vectors of each positive video are weighted and fused using the weights of each positive video to obtain the vector representation of the positive behavior feature. In one example, a female user enjoys watching videos tagged with skincare and suspense. This user's attribute features include skincare tag information and suspense preference information. Based on the user's attribute feature preference information, the feature information of each positive video corresponding to the user's positive behavior feature vector is calculated. Specifically, the weights of each positive video corresponding to the positive behavior feature are calculated based on the user's attribute feature preference information and the video attributes corresponding to each video identifier in the positive video feature information.
[0110] Based on negative behavior feature vectors, and according to the target user's preferences represented by attribute feature vectors, the weights of each negative video corresponding to the negative behavior features are predicted. This can be achieved by concatenating the attribute feature vectors and negative behavior feature vectors to obtain a concatenated vector. This concatenated vector is then passed through a negative deep interest network in the main network to calculate the weights of each negative video corresponding to the negative behavior features. The deep interest network calculates the weights of each negative video corresponding to the negative behavior features based on the target user's preferences represented by the attribute feature vectors and the feature information of each negative video corresponding to the negative behavior feature vectors. Finally, the representation vectors of each negative video are weighted and fused using the weights of each negative video to obtain the vector representation of the negative behavior features.
[0111] By fusing the vector representations of positive and negative behavioral features, we can obtain the output vector corresponding to the main network by fusing the vector representations of long-term positive, short-term positive, and negative behavioral features.
[0112] In this embodiment of the invention, the output vector corresponding to the main network is obtained based on attribute features, positive behavior features, and negative behavior features. Specifically, it is calculated based on attribute features, long-term positive behavior features, short-term positive behavior features, and negative behavior features. This allows the output vector corresponding to the main network to not only learn long-term positive behavior and short-term positive behavior, but also learn negative behavior, thus better reflecting the user's true interests and providing a foundation for avoiding recommending videos that the user is not interested in.
[0113] In one possible implementation, see Figure 3 In step S120, the negative behavioral features of the target user are input into the bias network of the pre-trained recall model to obtain the bias vector corresponding to the bias network, which may include:
[0114] S126, Input the negative behavioral features of the target user into the bias network in the pre-trained recall model;
[0115] S127, the negative behavior features are vectorized through a bias network to obtain the negative behavior feature vector;
[0116] S128, concatenates the negative behavior feature vector with the corresponding output vector of the main network;
[0117] S129. The concatenated vector is passed through the fully connected layer of the bias network to output the bias vector corresponding to the bias network.
[0118] In this embodiment of the invention, negative behavioral features are vectorized using a bias network, which represents the negative behavioral features as vectors to obtain negative behavioral feature vectors. For example, based on the correspondence between different negative behavioral features and preset numbers, the number corresponding to the current negative behavioral feature can be matched, and then a vector can be generated based on that number to obtain the negative behavioral feature vector.
[0119] Among them, concatenating the negative behavior feature vector and the corresponding output vector of the main network can be achieved by combining the negative behavior feature vector and the corresponding output vector of the main network, and combining the two vectors into one vector according to a preset order.
[0120] In this embodiment of the invention, the bias network may include two fully connected layers. The concatenated vector is passed through the fully connected layers of the bias network to output the bias representation of negative viewing behavior, that is, the bias vector corresponding to the bias network.
[0121] In this embodiment of the invention, a bias network is used to learn the bias representation of the negative viewing behavior of the target user, so that the interest representation vector output by the recall model can better reflect the true interest of the target user, thereby avoiding recommending video content that the target user is not interested in and improving the accuracy of video recommendation.
[0122] This invention also provides a recall model training method, see [link to relevant documentation]. Figure 4 ,like Figure 4 As shown, the above method includes:
[0123] S410, acquire positive sample videos and negative sample videos, wherein positive sample videos are videos in which multiple target users watch for a duration longer than a first preset duration, and negative sample videos are videos in which multiple target users watch for a duration shorter than a second preset duration;
[0124] S420, input the positive sample video and the negative sample video into the recall model to be trained, and obtain the positive sample video representation vector and the negative sample video representation vector respectively;
[0125] S430: Obtain and input the target user's attribute features, positive behavior features, and negative behavior features into the recall model to be trained to obtain the target user's predicted interest representation vector;
[0126] S440, calculate the first difference between the predicted interest representation vector and the positive sample video representation vector, and the second difference between the predicted interest representation vector and the negative sample video representation vector;
[0127] S450, adjust the parameters of the recall model to be trained according to the first difference and the second difference, and return to the step of inputting positive sample videos and negative sample videos into the recall model to be trained, and obtaining positive sample video representation vectors and negative sample video representation vectors respectively, and continue training until the preset requirements are met and a trained recall model is obtained.
[0128] In one possible implementation, positive and negative sample videos can be selected based on their viewing duration or the proportion of viewing duration. For example, multiple videos with a viewing duration greater than a first preset duration or multiple videos with a viewing duration greater than 7 / 10 of the total video duration can be selected as positive sample videos, and multiple videos with a viewing duration less than a second preset duration or multiple videos with a viewing duration less than 1 / 10 of the total video duration can be selected as negative sample videos. In one example, obtaining negative sample videos includes: randomly sampling multiple videos from a video database according to a first preset sampling probability as first negative sample videos; randomly sampling multiple videos from videos corresponding to negative viewing behavior according to a second preset sampling probability as second negative sample videos; and using the sum of the first and second negative sample videos as the negative sample video.
[0129] In actual use, the first preset sampling probability and the second preset sampling probability can be set according to the requirements. In one example, the first preset sampling probability of randomly sampling multiple videos from the video database is 0.99, and the second preset sampling probability of randomly sampling multiple videos from the videos corresponding to negative viewing behavior is 0.01. The two probabilities add up to 1.
[0130] By using positive and negative sample videos to train the recall model, adjusting the parameters of the recall model until the preset requirements are met, the training is completed, and a trained recall model is obtained. This trained recall model can be compared with the pre-trained recall model in step S120 above.
[0131] In this embodiment of the invention, the model is trained using multiple positive sample videos and multiple negative sample videos. The negative samples include videos randomly sampled from a video database and videos randomly sampled from videos corresponding to negative viewing behaviors. This not only enriches the sample videos and improves the accuracy of the recall model, but also optimizes the user's interest representation, making the interest representation more consistent with the user's true interests.
[0132] The following specific example illustrates the process of generating interest representation vectors in a recall model. (See attached document.) Figure 5 ,like Figure 5 As shown, the recall model includes a main network and a bias network;
[0133] 1. For the main network of the recall model, after receiving the target user's attribute features, long-term positive behavior features, short-term positive behavior features and negative behavior features, the negative behavior features are processed through the DIN network (Deep Interest Network). Based on the attribute features, the weights of each negative video corresponding to the negative behavior features are calculated, and the representation vectors of each negative video are weighted and fused according to the weights of each negative video to obtain the vector representation of the negative behavior features.
[0134] 2. Short-term positive behavior features are obtained by using the DIN network to calculate the weights of each positive video corresponding to the short-term positive behavior features based on the attribute features. The representation vectors of each positive video are then weighted and fused according to the weights of each positive video to obtain the vector representation of the short-term positive behavior features.
[0135] 3. Long-term positive behavior features are obtained by using the DIN network to calculate the weights of each positive video corresponding to the long-term positive behavior features based on the attribute features. The representation vectors of each positive video are then weighted and fused according to the weights of each positive video to obtain the vector representation of the long-term positive behavior features, which serves as the vector of the long-term behavior features.
[0136] 4. Subtract the vector representation of the short-term positive behavioral features from the vector representation of the negative behavioral features to obtain the vector of short-term behavioral features;
[0137] 5. Concatenate the vectors of long-term behavioral features with the vectors of short-term behavioral features, and then pass the concatenated vectors through a gated Softmax network. Based on the attribute features, calculate the weights of the videos corresponding to the vectors of long-term positive behavioral features and the vectors of short-term behavioral features.
[0138] 6. The vectors of long-term behavioral features and the vectors of short-term behavioral features are pre-fused through an MHA network (multi-head attention) to obtain the transformed vectors of long-term behavioral features and the transformed vectors of short-term behavioral features.
[0139] 7. Based on the weights of the videos corresponding to the vectors of long-term positive behavioral features and the weights of the videos corresponding to the vectors of short-term behavioral features, the representation vectors of the videos corresponding to the transformed vectors of long-term behavioral features and the representation vectors of the videos corresponding to the transformed vectors of short-term behavioral features are weighted and fused to obtain the output vector of the main network.
[0140] 8. Concatenate the output vector of the main network with the vector representation of the negative behavior features, and pass the concatenated vector through the fully connected layer of the bias network to obtain the bias vector of the bias network.
[0141] 9. Subtract the output vector of the main network from the bias vector of the bias network to obtain the interest representation vector of the target user.
[0142] The following is a specific example illustrating the background operation process of a video platform. (See attached image.) Figure 6 The process is as follows:
[0143] 1. Users send video recommendation requests through the client;
[0144] 2. Upon receiving a video recommendation request, the engine service performs feature playback;
[0145] 3. Obtain video features from the video database, select positive and negative sample videos based on the video features, and search for video recommendation information for the user in the feature library;
[0146] 4. Train and optimize the recall model based on positive and negative sample videos and the user's video recommendation information to obtain the optimized recall model.
[0147] The aforementioned feature library stores video recommendation information for all users of the video platform. During actual service deployment, the recall service obtains the optimized recall model, retrieves the user's video recommendation information from the engine service, inputs this information into the optimized recall model to obtain the user's interest representation vector, calculates the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, selects a first set of highly similar videos and sends them to the ranking service. The ranking service sorts these first set of highly similar videos and returns a second set of videos as recommended videos, which are then sent to the client for recommendation to the user. In one example, the recall service retrieves 200 highly similar videos and sends them to the ranking service. The ranking service ultimately selects the 10 videos with the highest similarity scores as the recommended videos.
[0148] Based on the same inventive concept as the video recommendation method described above, embodiments of the present invention also provide a video recommendation device, see [link to relevant documentation]. Figure 7 The aforementioned device includes:
[0149] The feature acquisition module 71 is used to acquire the attribute features, positive behavior features, and negative behavior features of the target user;
[0150] The network output module 72 is used to input the target user's attribute features, positive behavior features, and negative behavior features into the main network of the pre-trained recall model to obtain the output vector corresponding to the main network; and to input the target user's negative behavior features into the bias network of the pre-trained recall model to obtain the bias vector corresponding to the bias network.
[0151] The vector fusion module 73 is used to fuse the output vector corresponding to the main network and the bias vector corresponding to the bias network to obtain the interest representation vector of the target user.
[0152] The video recommendation module 74 is used to calculate the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, and to select the N videos with the highest similarity to recommend to the target user.
[0153] In one possible implementation, positive behavior features include feature information of multiple positive videos, where a positive video is a video whose viewing time by the target user is greater than a first preset duration; negative behavior features include feature information of multiple negative videos, where a negative video is a video whose viewing time by the target user is less than a second preset duration.
[0154] The network output module includes:
[0155] The feature input submodule is used to input the target user's attribute features, positive behavior features, and negative behavior features into the main network of the pre-trained recall model;
[0156] The feature vector generation submodule is used to vectorize attribute features, feature information of positive video, and feature information of negative video to obtain attribute feature vectors, positive behavior feature vectors, and negative behavior feature vectors.
[0157] The vector representation generation submodule for positive behavior features is used to predict the weights of each positive video corresponding to the positive behavior features based on the attribute feature vector and the positive behavior feature vector, and to perform weighted fusion of the representation vectors of each positive video using the weights of each positive video to obtain the vector representation of the positive behavior features.
[0158] The negative behavior feature vector representation generation submodule is used to predict the weight of each negative video corresponding to the negative behavior feature based on the attribute feature vector and the negative behavior feature vector, and to perform weighted fusion of the representation vectors of each negative video through the weight of each negative video to obtain the vector representation of the negative behavior feature.
[0159] The main network output vector generation submodule is used to fuse the vector representations of positive and negative behavioral features to obtain the corresponding output vector of the main network.
[0160] In one possible implementation, the network output module includes:
[0161] The negative behavior feature input submodule is used to input the negative behavior features of the target user into the bias network of the pre-trained recall model;
[0162] The negative behavior feature vectorization submodule is used to vectorize negative behavior features through a bias network to obtain negative behavior feature vectors.
[0163] The vector concatenation submodule is used to concatenate the negative behavior feature vector and the corresponding output vector of the main network;
[0164] The bias vector generation submodule is used to pass the concatenated vector through the fully connected layer of the bias network and output the bias vector corresponding to the bias network.
[0165] In one possible implementation, the video recommendation module includes:
[0166] The similarity calculation submodule is used to calculate the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended;
[0167] The video sorting submodule is used to sort multiple videos to be recommended in descending order of the calculated similarity, and obtain the sorted video sequence.
[0168] The video selection submodule is used to select the first N videos in a video sequence and recommend them to the target user.
[0169] Based on the same inventive concept as the recall model training method described above, this invention also provides a recall model training device, see [link to relevant documentation]. Figure 8 The aforementioned device includes:
[0170] The sample video acquisition module 81 is used to acquire positive sample videos and negative sample videos. Positive sample videos are videos in which multiple target users watch for a duration longer than a first preset duration, and negative sample videos are videos in which multiple target users watch for a duration shorter than a second preset duration.
[0171] The sample input module 82 is used to input positive sample videos and negative sample videos into the recall model to be trained, and obtain positive sample video representation vectors and negative sample video representation vectors respectively.
[0172] The vector prediction module 83 is used to acquire and input the attribute features, positive behavior features and negative behavior features of the target user into the recall model to be trained, so as to obtain the predicted interest representation vector of the target user;
[0173] The difference calculation module 84 is used to calculate the first difference between the predicted interest representation vector and the positive sample video representation vector, and the second difference between the predicted interest representation vector and the negative sample video representation vector.
[0174] The parameter adjustment module 85 is used to adjust the parameters of the recall model to be trained according to the first difference and the second difference, and return to the step of inputting positive sample videos and negative sample videos into the recall model to be trained, obtaining positive sample video representation vectors and negative sample video representation vectors respectively, and continue training until the preset requirements are met and a trained recall model is obtained.
[0175] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0176] The video recommendation device provided by this invention, since the target user's interest representation vector is obtained based on positive and negative behavioral features, can not only recommend videos that the user is interested in based on the learned positive behavioral features, but also avoid recommending video content that the target user is not interested in based on the learned negative behavioral features, thereby improving the accuracy of video recommendation.
[0177] This invention also provides an electronic device, such as... Figure 9 As shown, it may include: processor 91, communication interface 92, memory 93 and communication bus 94, wherein processor 91, communication interface 92 and memory 93 communicate with each other through communication bus 94;
[0178] The memory 93 can be used to store computer programs;
[0179] The processor 91 can be used to execute the program stored in the memory 93 to implement any of the video recommendation methods mentioned above.
[0180] This invention also provides another electronic device, such as... Figure 10 As shown, it may include: processor 101, communication interface 102, memory 103 and communication bus 104, wherein processor 101, communication interface 102 and memory 103 communicate with each other through communication bus 104.
[0181] The memory 103 can be used to store computer programs;
[0182] The processor 101 can be used to execute the program stored in the memory 103 to implement any of the above-mentioned recall model training methods.
[0183] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0184] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0185] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0186] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0187] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of any of the above-described video recommendation methods.
[0188] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the recall model training methods described above.
[0189] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the video recommendation methods described above.
[0190] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the recall model training methods described above.
[0191] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Target Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)).
[0192] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0193] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, embodiments of devices, electronic devices, and storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0194] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A video recommendation method, characterized in that, The method includes: The system acquires the target user's attribute features, positive behavior features, and negative behavior features; the positive behavior features include feature information of multiple positive videos, where the positive videos are those whose viewing time is greater than a first preset duration; the negative behavior features include feature information of multiple negative videos, where the negative videos are those whose viewing time is less than a second preset duration. The attribute features, positive behavior features, and negative behavior features of the target user are input into the main network of the pre-trained recall model; The attribute features, the feature information of the positive video, and the feature information of the negative video are vectorized to obtain attribute feature vectors, positive behavior feature vectors, and negative behavior feature vectors; Based on the attribute feature vector and the positive behavior feature vector, the weight of each positive video corresponding to the positive behavior feature is predicted, and the representation vector of each positive video is weighted and fused by the weight of each positive video to obtain the vector representation of the positive behavior feature. Based on the attribute feature vector and the negative behavior feature vector, the weight of each negative video corresponding to the negative behavior feature is predicted, and the representation vector of each negative video is weighted and fused by the weight of each negative video to obtain the vector representation of the negative behavior feature. The vector representations of the positive and negative behavioral features are fused to obtain the output vector corresponding to the main network. The negative behavioral features of the target user are input into the bias network in the pre-trained recall model to obtain the bias vector corresponding to the bias network. The output vector corresponding to the main network and the bias vector corresponding to the bias network are fused to obtain the interest representation vector of the target user; Calculate the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, and select the N videos with the highest similarity to recommend to the target user.
2. The method according to claim 1, characterized in that, The step of inputting the negative behavioral features of the target user into the bias network of the pre-trained recall model to obtain the bias vector corresponding to the bias network includes: The negative behavioral features of the target user are input into the bias network of the pre-trained recall model; The negative behavior features are vectorized using the bias network to obtain the negative behavior feature vector; The negative behavior feature vector and the corresponding output vector of the main network are concatenated. The concatenated vector is passed through the fully connected layer of the bias network to output the bias vector corresponding to the bias network.
3. The method according to claim 1, characterized in that, The step of calculating the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, and selecting the N videos with the highest similarity to recommend to the target user, includes: Calculate the similarity between the interest representation vector and the representation vectors of the multiple videos to be recommended; The multiple videos to be recommended are sorted in descending order of the calculated similarity to obtain a sorted video sequence. The first N videos in the video sequence are selected and recommended to the target user.
4. A recall model training method, characterized in that, The method includes: Obtain positive sample videos and negative sample videos, wherein the positive sample videos are videos in which multiple target users watch for a duration greater than a first preset duration, and the negative sample videos are videos in which multiple target users watch for a duration less than a second preset duration; The positive and negative sample videos are input into the recall model to be trained to obtain the positive and negative sample video representation vectors, respectively. The target user's attribute features, positive behavior features, and negative behavior features are acquired and input into the main network of the recall model to be trained; the positive behavior features include feature information of multiple positive videos, wherein the positive videos are videos whose viewing time is greater than a first preset duration; the negative behavior features include feature information of multiple negative videos, wherein the negative videos are videos whose viewing time is less than a second preset duration. The attribute features, the feature information of the positive video, and the feature information of the negative video are vectorized to obtain attribute feature vectors, positive behavior feature vectors, and negative behavior feature vectors; Based on the attribute feature vector and the positive behavior feature vector, the weight of each positive video corresponding to the positive behavior feature is predicted, and the representation vector of each positive video is weighted and fused by the weight of each positive video to obtain the vector representation of the positive behavior feature. Based on the attribute feature vector and the negative behavior feature vector, the weight of each negative video corresponding to the negative behavior feature is predicted, and the representation vector of each negative video is weighted and fused by the weight of each negative video to obtain the vector representation of the negative behavior feature. The vector representations of the positive and negative behavioral features are fused to obtain the output vector corresponding to the main network. The negative behavioral features of the target user are input into the bias network in the recall model to be trained, and the bias vector corresponding to the bias network is obtained. The output vector corresponding to the main network and the bias vector corresponding to the bias network are fused to obtain the predicted interest representation vector of the target user; Calculate a first difference between the predicted interest representation vector and the positive sample video representation vector, and a second difference between the predicted interest representation vector and the negative sample video representation vector; The parameters of the recall model to be trained are adjusted according to the first difference and the second difference, and the process returns to the step of inputting the positive sample video and the negative sample video into the recall model to be trained to obtain the positive sample video representation vector and the negative sample video representation vector respectively, and continues training until the preset requirements are met and the trained recall model is obtained.
5. A video recommendation device, characterized in that, The device includes: The feature acquisition module is used to acquire the attribute features, positive behavior features, and negative behavior features of the target user. The positive behavior features include feature information of multiple positive videos, where the positive videos are those whose viewing time is greater than a first preset duration. The negative behavior features include feature information of multiple negative videos, where the negative videos are those whose viewing time is less than a second preset duration. The network output module is used to input the attribute features, positive behavior features, and negative behavior features of the target user into the main network of a pre-trained recall model; vectorize the attribute features, the feature information of the positive videos, and the feature information of the negative videos to obtain attribute feature vectors, positive behavior feature vectors, and negative behavior feature vectors; predict the weights of each positive video corresponding to the positive behavior feature based on the attribute feature vectors and the positive behavior feature vectors, and perform weighted fusion of the representation vectors of each positive video using the weights of each positive video to obtain a vector representation of the positive behavior feature; predict the weights of each negative video corresponding to the negative behavior feature based on the attribute feature vectors and the negative behavior feature vectors, and perform weighted fusion of the representation vectors of each negative video using the weights of each negative video to obtain a vector representation of the negative behavior feature; fuse the vector representations of the positive behavior feature and the vector representations of the negative behavior feature to obtain the output vector corresponding to the main network; and input the negative behavior features of the target user into the bias network of the pre-trained recall model to obtain the bias vector corresponding to the bias network. The vector fusion module is used to fuse the output vector corresponding to the main network and the bias vector corresponding to the bias network to obtain the interest representation vector of the target user. The video recommendation module is used to calculate the similarity between the interest representation vector and the representation vectors of multiple videos to be recommended, and select the N videos with the highest similarity to recommend to the target user.
6. The apparatus according to claim 5, characterized in that, The network output module includes: The negative behavior feature input submodule is used to input the negative behavior features of the target user into the bias network of the pre-trained recall model; The negative behavior feature vectorization submodule is used to vectorize the negative behavior features through the bias network to obtain a negative behavior feature vector. The vector concatenation submodule is used to concatenate the negative behavior feature vector and the corresponding output vector of the main network; The bias vector generation submodule is used to pass the concatenated vector through the fully connected layer of the bias network to output the bias vector corresponding to the bias network.
7. A recall model training device, characterized in that, The device includes: The sample video acquisition module is used to acquire positive sample videos and negative sample videos, wherein the positive sample videos are videos in which multiple target users watch for a duration greater than a first preset duration, and the negative sample videos are videos in which multiple target users watch for a duration less than a second preset duration. The sample input module is used to input the positive sample video and the negative sample video into the recall model to be trained, and obtain the positive sample video representation vector and the negative sample video representation vector, respectively. A vector prediction module is used to acquire and input the attribute features, positive behavior features, and negative behavior features of the target user into the main network of the recall model to be trained. The positive behavior features include feature information of multiple positive videos, where the positive videos are those viewed by the target user for a duration greater than a first preset duration. The negative behavior features include feature information of multiple negative videos, where the negative videos are those viewed by the target user for a duration less than a second preset duration. The module vectorizes the attribute features, the positive video feature information, and the negative video feature information to obtain attribute feature vectors, positive behavior feature vectors, and negative behavior feature vectors. Based on the attribute feature vectors and the positive behavior feature vectors, the module predicts the weights of each positive video corresponding to the positive behavior feature and then uses these weights to predict the weights of each positive video. The weights of the videos are weighted and fused to obtain a vector representation of positive behavioral features. Based on the attribute feature vector and the negative behavioral feature vector, the weights of each negative video corresponding to the negative behavioral features are predicted, and the weights of each negative video are weighted and fused to obtain a vector representation of negative behavioral features. The vector representations of the positive and negative behavioral features are fused to obtain the output vector corresponding to the main network. The negative behavioral features of the target user are input into the bias network in the retrieval model to be trained, obtaining the bias vector corresponding to the bias network. The output vector corresponding to the main network and the bias vector corresponding to the bias network are fused to obtain the predicted interest representation vector of the target user. The difference calculation module is used to calculate a first difference between the predicted interest representation vector and the positive sample video representation vector, and a second difference between the predicted interest representation vector and the negative sample video representation vector; The parameter adjustment module is used to adjust the parameters of the recall model to be trained according to the first difference and the second difference, and return to the step of inputting the positive sample video and the negative sample video into the recall model to be trained to obtain the positive sample video representation vector and the negative sample video representation vector respectively, and continue training until the preset requirements are met to obtain the trained recall model.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-3 or 4.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-3 or 4.
Citation Information
Patent Citations
Article recommendation method and recommendation equipment
CN111784455A
Resource recall model updating method and device, electronic equipment and storage medium
CN114519593A