Video recommendation method and apparatus

By acquiring user and video information and combining it with a pre-trained model to process user viewing characteristics, video recommendation weights are determined, thus solving the problem of misjudgment caused by automatic video playback and achieving more accurate video recommendation results.

CN116955705BActive Publication Date: 2025-12-30SHANGHAI BILIBILI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210416140.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-20
Publication Date
2025-12-30
Estimated Expiration
2042-04-20

AI Technical Summary

Technical Problem

Existing video recommendation systems fail to consider the characteristics of automatic video playback, resulting in a large number of invalid plays in users' viewing history. This leads to misjudgments of user preferences by the recommendation system, reducing the accuracy of recommendations.

Method used

By acquiring user information of target users, video information of multiple videos to be recommended, and viewing characteristics, the recommendation weight of the videos to be recommended is determined, target videos are selected and recommended to users, and a pre-trained video recommendation model is used to process user information and video information to improve the accuracy of recommendation weights.

Benefits of technology

It improves the accuracy of video recommendations, enabling it to more accurately determine user preferences and thus recommend videos that users like, thereby increasing user engagement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116955705B_ABST
    Figure CN116955705B_ABST
Patent Text Reader

Abstract

The application provides a video recommendation method and device, wherein the video recommendation method comprises: obtaining user information of a target user, video information of a plurality of to-be-recommended videos, and a viewing feature of the target user, wherein the viewing feature represents whether a plurality of historical viewing records of the target user are continuously and completely played; determining a recommendation weight of a first to-be-recommended video for the target user according to the user information, the video information of the first to-be-recommended video, and the viewing feature, wherein the first to-be-recommended video is any one of the plurality of to-be-recommended videos; determining a target video from the plurality of to-be-recommended videos according to the recommendation weight of each to-be-recommended video for the target user, and recommending the target video to the target user. The method can effectively improve the video recommendation efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a video recommendation method. This application also relates to a video recommendation apparatus, a computing device, and a computer-readable storage medium. Background Technology

[0002] With the continuous development of computer technology, various video platforms have emerged. Accurately recommending videos that users need has become a crucial means of increasing video viewership. When users see recommended videos that match their needs, they will watch them without hesitation, which is convenient for users and beneficial to the development of video platforms.

[0003] In existing technologies, user needs are analyzed by acquiring their historical browsing records to generate recommended videos. However, since the historical browsing records do not contain only videos that the user likes to watch, the recommendation system is prone to misjudging user preferences, thereby reducing the accuracy of the recommendations. Summary of the Invention

[0004] In view of this, embodiments of this application provide a video recommendation method. This application also relates to a video recommendation apparatus, a computing device, and a computer-readable storage medium, to address the technical shortcomings of low accuracy in video recommendations in the prior art.

[0005] According to a first aspect of the embodiments of this application, a video recommendation method is provided, including:

[0006] The system obtains user information of the target user, video information of multiple videos to be recommended, and viewing characteristics of the target user, wherein the viewing characteristics indicate whether multiple historical viewing records of the target user are played continuously and completely.

[0007] Based on the user information, the video information of the first video to be recommended, and the viewing characteristics, the recommendation weight of the first video to be recommended for the target user is determined, wherein the first video to be recommended is any one of the plurality of videos to be recommended;

[0008] Based on the recommendation weight of each video to be recommended for the target user, a target video is determined from the plurality of videos to be recommended, and the target video is recommended to the target user.

[0009] According to a second aspect of the embodiments of this application, a video recommendation device is provided, comprising:

[0010] The first acquisition module is configured to acquire user information of the target user, video information of multiple videos to be recommended, and viewing characteristics of the target user, wherein the viewing characteristics characterize whether multiple historical viewing records of the target user are played continuously and completely.

[0011] The determining module is configured to determine the recommendation weight of the first video to be recommended for the target user based on the user information, the video information of the first video to be recommended, and the viewing characteristics, wherein the first video to be recommended is any one of the plurality of videos to be recommended;

[0012] The recommendation module is configured to determine a target video from the plurality of videos to be recommended based on the recommendation weight of each video to be recommended for the target user, and recommend the target video to the target user.

[0013] According to a third aspect of the present application, a computing device is provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor executes the computer instructions to implement the steps of the video recommendation method.

[0014] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided that stores computer instructions, which, when executed by a processor, implement the steps of the video recommendation method.

[0015] The video recommendation method provided in this application obtains user information of a target user, video information of multiple videos to be recommended, and viewing characteristics of the target user. The viewing characteristics indicate whether multiple historical viewing records of the target user are played continuously and completely. Based on the user information, the video information of a first video to be recommended, and the viewing characteristics, a recommendation weight for the first video to be recommended is determined for the target user, wherein the first video to be recommended is any one of the multiple videos to be recommended. Based on the recommendation weight of each video to be recommended for the target user, a target video is determined from the multiple videos to be recommended and recommended to the target user. By correcting the user information and the video information of each video to be recommended through the viewing characteristics of the target user, the recommendation weight of each video to be recommended for the target user is determined, improving the accuracy of the recommendation weight. This allows for a more accurate judgment of user preferences, thus more accurately recommending videos that the user likes, thereby improving the accuracy of video recommendations and ultimately increasing user engagement. Attached Figure Description

[0016] Figure 1 This is a flowchart of a video recommendation method provided in an embodiment of this application;

[0017] Figure 2This is a schematic diagram illustrating the effect of a historical viewing record in a video recommendation method provided in one embodiment of this application;

[0018] Figure 3 This is a flowchart illustrating a video recommendation method provided in one embodiment of this application;

[0019] Figure 4 This is a schematic diagram of the structure of a video recommendation device provided in one embodiment of this application;

[0020] Figure 5 This is a structural block diagram of a computing device provided in one embodiment of this application. Detailed Implementation

[0021] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.

[0022] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this application refers to any or all possible combinations including one or more of the associated listed items.

[0023] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0024] First, the terms and concepts involved in one or more embodiments of this application will be explained.

[0025] Automatic playback: During the video recommendation process, if the user does not perform any other operation after the currently playing video finishes playing, the next recommended video will automatically start playing.

[0026] Invalid playback: A video is playing, but the user is not watching it. This playback behavior is invalid for the recommendation system and is therefore called invalid playback.

[0027] First, a brief explanation of the video recommendation method provided in this application.

[0028] With the continuous development of computer technology, various video platforms have emerged. Accurately recommending videos that users need has become a crucial means of increasing video viewership. When users see recommended videos that match their needs, they will watch them without hesitation, which is convenient for users and beneficial to the development of video platforms.

[0029] Video recommendation on internet TV has been gradually expanding in recent years, and it differs significantly from traditional video recommendation scenarios such as those on web pages and mobile phones. Existing technical solutions for video recommendation on internet TV can be broadly categorized into two types: simply combining viewing history with the internet TV viewing experience to recommend relevant content; and applying traditional video recommendation ranking methods to internet TV, using machine learning to extract information from the user's viewing history to recommend content the user might like. In other words, it analyzes the user's browsing history to generate recommended videos.

[0030] However, the above method does not take into account the characteristics of automatic video playback. That is, if a user does other things while watching a video without pausing the current video, the next recommended video will automatically start playing after the current video finishes playing. This results in a large number of videos in the user's playback history that the user has not actually watched, which in turn causes the recommendation system to misjudge the user's preferences and reduce the accuracy of the recommendations.

[0031] Therefore, this application provides a video recommendation method that obtains user information of a target user, video information of multiple videos to be recommended, and viewing characteristics of the target user, wherein the viewing characteristics characterize whether multiple historical viewing records of the target user are played continuously and completely; based on the user information, the video information of a first video to be recommended, and the viewing characteristics, a recommendation weight for the first video to be recommended for the target user is determined, wherein the first video to be recommended is any one of the multiple videos to be recommended; based on the recommendation weight of each video to be recommended for the target user, a target video is determined from the multiple videos to be recommended, and the target video is recommended to the target user. By correcting the user information and the video information of each video to be recommended through the viewing characteristics of each historical viewing record of the target user, the recommendation weight of each video to be recommended for the target user is determined, improving the accuracy of the recommendation weight, enabling more accurate judgment of user preferences, and thus more accurately recommending videos that the user likes, thereby improving the accuracy of video recommendation and increasing user stickiness.

[0032] This application provides a video recommendation method, and also relates to a video recommendation device, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.

[0033] Figure 1 The flowchart shown illustrates a video recommendation method according to an embodiment of this application, which specifically includes the following steps:

[0034] Step 102: Obtain the target user's user information, the video information of multiple videos to be recommended, and the target user's viewing characteristics, wherein the viewing characteristics indicate whether the target user's multiple historical viewing records are played continuously and completely.

[0035] The entity that implements the video recommendation method can be a computing device with video recommendation capabilities, such as a server or terminal with video recommendation functionality.

[0036] Specifically, target users refer to users for whom videos need to be recommended, such as users who are about to watch a video, or users who are about to finish watching a video and are about to watch the next one; user information refers to the information corresponding to the target user, such as the types of videos the user likes to watch, age, gender, etc.; videos to be recommended refer to candidate videos to be recommended to the target user; video information refers to the attribute information of the videos to be recommended, such as video name, video type, video content description, corresponding actors, video duration, etc.; viewing history refers to the record of each time a user opens the video viewing platform and watches videos, which may include the playback time of the played videos (e.g., watched at 9:35 on January 20th), playback progress (... Information such as video cover, video title (e.g., "A Certain Princess"), and episode number (e.g., episode 1) is provided. Continuous complete playback refers to at least one video that is played continuously and has a playback progress of 100%, or at least one video that is automatically played. Viewing characteristics refer to the continuous complete playback markers corresponding to each played video in multiple historical viewing records of the target user. For example, if there is one continuously played video before the third played video in a certain historical viewing record, then the continuous complete playback marker corresponding to the third played video is 1. Similarly, if the fourth played video in a certain historical viewing record is the fourth continuously played video, then the continuous complete playback marker corresponding to the fourth played video is 4.

[0037] In practical applications, there are various ways to obtain the target user's user information, the video information of multiple videos to be recommended, and the target user's viewing characteristics. For example, an operator can send a video recommendation instruction to the execution entity, or send an instruction to obtain the target user's user information, the video information of multiple videos to be recommended, and the target user's viewing characteristics. Upon receiving the instruction, the execution entity begins to obtain these information. Alternatively, the server can automatically obtain the target user's user information, the video information of multiple videos to be recommended, and the target user's viewing characteristics at preset intervals. For example, after a preset interval, a server with video recommendation functionality can automatically obtain the target user's user information, the video information of multiple videos to be recommended, and the target user's viewing characteristics; or after a preset interval, a terminal with video recommendation functionality can automatically obtain the target user's user information, the video information of multiple videos to be recommended, and the video information of the target user's viewing characteristics stored locally. This specification does not limit the method of obtaining the target user's user information, the video information of multiple videos to be recommended, and the target user's viewing characteristics.

[0038] In one or more optional embodiments of this application, when obtaining user information of the target user, video information of multiple videos to be recommended, and viewing characteristics of the target user, the user information corresponding to the user and the viewing characteristics of the target user can be obtained first, and then multiple videos to be recommended can be recalled from the video library based on the user information and a preset recall algorithm.

[0039] Step 104: Based on the user information, the video information of the first video to be recommended, and the viewing characteristics, determine the recommendation weight of the first video to be recommended for the target user, wherein the first video to be recommended is any one of the plurality of videos to be recommended.

[0040] Based on the user information of the target user, the video information of multiple videos to be recommended, and the viewing characteristics of the target user, the recommendation weight of each video to be recommended for the target user is further determined according to the user information, video information, and viewing characteristics.

[0041] Specifically, the recommendation weight represents the weight or value by which a video can be recommended.

[0042] In practical applications, after obtaining the target user's information, the video information of multiple videos to be recommended, and the target user's viewing characteristics, it is necessary to process the user information and the video information of the first video to be recommended based on the viewing characteristics that represent whether each historical viewing record of the target user is played continuously and completely, thereby obtaining the recommendation weight of the first video to be recommended for the target user. Then, iterate through each video to be recommended to obtain the recommendation weight of each video to be recommended for the target user.

[0043] In one or more optional embodiments of this application, in order to improve video recommendation efficiency, when determining the recommendation weight of the first video to be recommended for the target user based on the user information, the video information of the first video to be recommended, and the viewing characteristics: the continuous and complete playback probability corresponding to the first video to be recommended can be determined based on the viewing characteristics of the target user that represent whether each historical viewing record is played continuously and completely, according to the video information of the first video to be recommended; then, the recommendation weight of the first video to be recommended for the target user can be determined based on the user information and the continuous and complete playback probability corresponding to the first video to be recommended.

[0044] In one or more optional embodiments of this application, to improve the accuracy of video recommendations, the video preference information of the target user can be determined first, and then the recommendation weight can be determined based on the target user's video preference information. That is, the specific implementation process of determining the recommendation weight of the first video to be recommended for the target user based on the user information, the video information of the first video to be recommended, and the viewing characteristics can be as follows:

[0045] Based on the user information and the viewing characteristics, the video preference information of the target user is determined, wherein the video preference information represents the video information that the target user prefers to watch;

[0046] Based on the video preference information and the video information of the first video to be recommended, the recommendation weight of the first video to be recommended for the target user is determined.

[0047] Specifically, video preference information refers to the video information that target users like to watch, such as their favorite video types and video lengths.

[0048] In practical applications, video preference information for a target user can be determined based on their user information and viewing characteristics indicating whether their historical viewing records are played continuously and completely. Then, the recommendation weight of the first video to be recommended for the target user can be calculated based on the first video to be recommended and the video preference information. Since user information carries information such as the types of videos the user likes to watch, and the viewing characteristics indicating whether their historical viewing records are played continuously and completely can also reflect the types of videos the user likes to watch, combining these two factors to determine the user's video preference information ensures the comprehensiveness of the video preference information. Furthermore, combining this with the video information of the first video to be recommended to determine the recommendation weight for the first video to be recommended for the user improves the reliability and accuracy of the recommendation weight, further enhancing the accuracy of video recommendations.

[0049] For example, if a target user's user information includes videos of a celebrity they like, and their historical viewing records include a variety show that has been played continuously and completely (i.e., the viewing characteristic is a variety show that has been played continuously and completely), then based on the user information and viewing characteristics, it can be determined that the target user's video preference information is videos of a celebrity they like and / or a variety show they like. Then, the correlation between the video preference information and the video information of the first video to be recommended is calculated, and the recommendation weight of the first video to be recommended for the target user is determined based on the correlation.

[0050] Step 106: Based on the recommendation weight of each video to be recommended for the target user, determine the target video from the plurality of videos to be recommended, and recommend the target video to the target user.

[0051] Based on user information, video information of the first video to be recommended, and viewing characteristics of multiple historical viewing records, the recommendation weight of the first video to be recommended for the target user is determined. Then, the target videos are further selected and recommended to the target users based on the recommendation weight of each video to be recommended for the target users.

[0052] Specifically, target videos refer to videos that need to be recommended to users.

[0053] In practical applications, after obtaining the recommendation weights of each video to be recommended for the target user, the target video is selected from the multiple videos to be recommended based on preset filtering conditions and the corresponding recommendation weights. This target video is then recommended to the target user.

[0054] In one or more optional embodiments of this application, when determining the target video among the videos to be recommended based on each recommendation weight, a threshold is set, and videos with recommendation weights greater than the threshold are determined as target videos. After the target videos are determined, they are recommended to the target users. In this way, some high-quality target videos, that is, videos with a high relevance to the target users, can be recommended to the target users, improving the efficiency and accuracy of video recommendation.

[0055] In one or more optional embodiments of this application, to improve video recommendation efficiency, recommendation weights can be sorted, and then the target video among the videos to be recommended can be determined based on the sorting results. That is, determining the target video from the plurality of videos to be recommended based on the recommendation weight of each video for the target user includes:

[0056] The recommendation weights of each video to be recommended for the target user are arranged from largest to smallest. The videos to be recommended corresponding to the top N recommendation weights are determined as the target videos, where N is a positive integer.

[0057] In practical applications, for example, the recommendation weights of each video to be recommended for the target user can be ranked from largest to smallest, and the top N videos with the highest recommendation weights can be identified as target videos, where N is a pre-set value; or, the videos to be recommended can be sorted in descending order of recommendation weight, and the top N videos can be identified as target videos. This improves video recommendation efficiency when the number of target videos recommended to a user is limited.

[0058] In addition, the recommendation weights of each video to be recommended for the target user can be arranged from smallest to largest, and the videos with the last M recommendation weights can be determined as target videos, where M is a positive integer; or the videos to be recommended can be sorted in ascending order of recommendation weights, and the last M recommendation weights can be determined as target videos.

[0059] In one or more optional embodiments of this application, before determining the recommendation weight of each video to be recommended for the target user, a pre-trained video recommendation model can be obtained. Then, user information, video information of each video to be recommended, and viewing characteristics of the target user are input into the video recommendation model. The video recommendation model processes the user information, video information of each video to be recommended, and viewing characteristics of the target user to obtain the recommendation weight corresponding to each video to be recommended. That is, before determining the recommendation weight of the first video to be recommended for the target user based on the user information, the video information of the first video to be recommended, and the viewing characteristics, the method further includes:

[0060] A pre-trained video recommendation model is obtained, wherein the video recommendation model is trained based on sample videos carrying first identification information and second identification information, the first identification information representing the continuous and complete playback mark corresponding to the sample video, and the second identification information representing whether the sample video is played effectively.

[0061] Accordingly, determining the recommendation weight of the first video to be recommended for the target user based on the user information, the video information of the first video to be recommended, and the viewing characteristics includes:

[0062] The user information, the video information of the first video to be recommended, and the viewing features are input into the video recommendation model to determine the recommendation weight of the first video to be recommended for the target user.

[0063] Specifically, the object recommendation model refers to a pre-trained neural network model, such as a neural network model or a probabilistic neural network model; the first identification information refers to the continuous complete playback marker corresponding to the sample video. For example, if there are 5 consecutively played complete videos before a sample video in a certain historical viewing record, then the continuous complete playback marker corresponding to the sample video is 5. Or, if a sample video in a certain historical viewing record is the 6th consecutively played complete video, then the continuous complete playback marker corresponding to the 4th already played video is 6.

[0064] In practical applications, after obtaining the target user's information, the video information of multiple videos to be recommended, and the target user's viewing characteristics, a video recommendation model pre-trained based on sample videos carrying first and second identifier information is obtained. The first identifier information represents the continuous and complete playback marker corresponding to the sample video, and the second identifier information represents whether the sample video was played effectively. Then, the user information, the video information of the first video to be recommended, and the target user's viewing characteristics are input into the video recommendation model. The video recommendation model analyzes and processes the user information, the video information of the first video to be recommended, and the target user's viewing characteristics, and outputs the recommendation weight of the first video to be recommended for the target user. Processing the user information, the video information of the first video to be recommended, and the target user's viewing characteristics through a pre-trained video recommendation model can improve the speed and accuracy of obtaining recommendation weights.

[0065] Before obtaining a pre-trained video recommendation model, it is necessary to train the neural network model to obtain a video recommendation model with recommendation weight determination capabilities. That is, before obtaining the pre-trained video recommendation model, the following steps are also required:

[0066] Obtain a sample video set and a preset neural network model, wherein the sample video set contains multiple sample videos carrying first identification information and second identification information;

[0067] Extract video information from any sample video from the sample video set, input the video information of the sample video into the neural network model, and obtain the prediction result corresponding to the sample video;

[0068] Based on the prediction result, the first identification information and the second identification information carried by the sample video, calculate the loss value;

[0069] Based on the loss value, the model parameters of the neural network model are adjusted, and the step of extracting video information from any sample video in the sample video set is continued. When the preset training stopping condition is met, the trained neural network model is determined as the video recommendation model.

[0070] Specifically, a neural network model refers to a pre-specified neural network model, such as a convolutional neural network model or a probabilistic neural network model; a sample video set refers to the training samples of the neural network model; a prediction result refers to the output of the pre-specified neural network model; and a training stopping condition can be that the loss value is less than or equal to a preset threshold, the number of iterations reaches a preset iteration value, or the loss value converges, meaning that the loss value no longer decreases as training continues.

[0071] In practical applications, there are multiple ways to acquire sample video sets and neural network models. For example, operators can send training instructions for the neural network model or instructions to acquire sample video sets and neural network models to the execution entity. Upon receiving these instructions, the execution entity then begins acquiring the sample video sets and neural network models. Alternatively, the server can automatically acquire the sample video sets and neural network models at preset intervals. For instance, after a preset interval, a server with model training capabilities can automatically acquire the sample video sets and neural network models; or, after a preset interval, a terminal with model training capabilities can automatically acquire the sample video sets and neural network models stored locally. This specification does not limit the method of acquiring sample video sets and neural network models.

[0072] After obtaining a sample video set containing multiple sample videos carrying first and second identifier information, and a pre-defined neural network model, the neural network model is further trained based on the sample video set to obtain a video recommendation model. This involves selecting video information from the sample video set and inputting it into the pre-defined neural network model. The model then analyzes and processes this information to obtain a prediction result for the selected video. Further, based on the prediction result and the first and second identifier information carried by the sample video, a loss value is calculated. If the pre-defined training stopping condition is not met, the model parameters of the neural network model are adjusted according to the loss value. Then, another sample video is selected from the sample video set for the next round of training. If the pre-defined training stopping condition is met, the trained neural network model is determined as the video recommendation model. Thus, by training the model using sample videos carrying first and second identifier information, the accuracy and speed of determining the recommendation weights for videos to be recommended by the video recommendation model can be improved, enhancing the robustness of the video recommendation model.

[0073] In one or more optional embodiments of this application, when calculating the loss value, the prediction result, the first identification information, and the second identification information can be directly input into a preset loss function to obtain the loss. Alternatively, an initial loss value can be determined first based on the prediction result and the second identification information, and then the loss value can be calculated based on the initial loss value and the first identification information. That is, calculating the loss value based on the prediction result, the first identification information, and the second identification information carried by the sample video includes:

[0074] Calculate the initial loss value based on the prediction result and the second identification information carried by the sample video;

[0075] Based on the first identifier information carried by the sample video, determine the gradient coefficient corresponding to the sample video;

[0076] The loss value is calculated based on the gradient coefficients and the initial loss value.

[0077] Specifically, the initial loss value refers to the loss value obtained by comparing the predicted value and the label value, that is, comparing the prediction result with the second identification information; the gradient coefficient represents the probability that the sample video is not an invalid playback. The smaller the gradient coefficient, the more likely the sample video is an invalid playback.

[0078] In practical applications, the prediction result can be compared with the second identifier information carried by the sample video, or input into a preset first loss function, such as the cross-entropy loss function or the L1 loss function, to obtain an initial loss value. Further, the first identifier information carried by the sample video is input into a preset gradient coefficient determination function to determine the gradient coefficient corresponding to the sample video. Finally, the gradient coefficient and the initial loss value are input into a preset second loss function to obtain the loss value. This improves the accuracy of the loss value, enables the neural network model to converge quickly, and thus improves the accuracy of the video recommendation model.

[0079] For example, the preset gradient coefficient determination function can be as shown in Equation 1, and the second loss function can be as shown in Equation 2.

[0080] λ = 1 / log(N+5) - 0.5 (Equation 1)

[0081]

[0082] In Equations 1 and 2, N represents the first identifier, λ represents the gradient coefficient, w represents the model parameters, J(w) represents the first loss function, and L represents the loss value. That is, the loss value is the gradient coefficient multiplied by the partial derivative of the first loss function with respect to the model parameters.

[0083] It should be noted that when determining the gradient coefficient corresponding to the sample video based on the first identifier information carried by the sample video, if the continuous complete playback marker meets the preset marker conditions, the gradient coefficient corresponding to the sample video information is determined to be 1; if the continuous complete playback marker does not meet the preset marker conditions, the continuous complete playback marker is input into the preset gradient coefficient determination function to determine the gradient coefficient corresponding to the sample video information. Furthermore, the video recommendation model is a deep neural network model trained using historical viewing records, trained using the gradient descent method.

[0084] In one or more optional embodiments of this application, the adjustment value of the model parameters can be determined based on the loss value, and then the model parameters can be adjusted based on the adjustment value. That is, adjusting the model parameters of the neural network model based on the loss value includes:

[0085] For any model parameter in the neural network model, the initial value of the model parameter and the loss value are input into a preset parameter determination model to determine the adjustment value of the model parameter;

[0086] The model parameters in the neural network model are adjusted according to the adjustment value.

[0087] Specifically, a neural network model has at least one model parameter; the initial value is the value of a certain model parameter before it is adjusted; the adjusted value is the value of a certain model parameter after it is adjusted.

[0088] In practical applications, after obtaining the loss value, it is necessary to adjust the model parameters in the neural network model one by one. Taking any one model parameter as an example: based on the initial value and the loss value of the model parameter, determine the adjustment value of the model parameter. That is, input the initial value and the loss value of the model parameter into the parameter determination model to obtain the adjustment value of the model parameter. Then, adjust the value of the model parameter from the initial value to the adjustment value. In this way, the adjustment value of the model parameter can be determined quickly, improving the adjustment rate of the model parameter and thus improving the model training efficiency.

[0089] For example, the parameter determination model is shown in Equation 3 or Equation 4.

[0090] w j :=w j -αL (Equation 3)

[0091]

[0092] Equations 3 and 4, w j Let J(w) be the model parameter of the j-th generation, α be the learning rate, and λ be the gradient coefficient. j ) represents the first loss function, L and Let represent the loss value. Equation 4 indicates that the adjusted value of the j-th model parameter is equal to the initial value of the j-th model parameter, minus the learning rate (α) multiplied by the gradient coefficient (λ) multiplied by the partial derivative of the first loss function with respect to the j-th model parameter. In other words, during training, for playback records that may be invalid, the influence of their gradients on the neural network model is reduced, thus ultimately obtaining a more accurate video recommendation model.

[0093] Thus, to address the issue of automatic video playback, special modifications were made to the sample videos, and a better video recommendation model was produced using gradient descent, achieving more accurate recommendation results.

[0094] In one or more optional embodiments of this application, a well-organized sample video set can be directly obtained, or multiple historical viewing records of any user can be obtained, i.e., the sample video set can be determined by comparing the played videos in the multiple historical viewing records. That is, obtaining the sample video set includes:

[0095] Obtain multiple historical viewing records of any user, wherein the historical viewing records contain video information of at least one played video;

[0096] For any given historical viewing record, determine the first identifier information of each video based on the playback progress of each video played in that historical viewing record;

[0097] Obtain the second identifier information for each played video;

[0098] Using the first and second identifier information of each played video, each played video is labeled to obtain a sample video set.

[0099] Specifically, "played video" refers to videos in the historical viewing record; "playback progress" refers to the ratio of the playback end point of a played video to the video duration. For example, if the playback end point of a played video is 10 minutes, it means that the played video was turned off at the 10-minute mark. If the video duration of a played video is 20 minutes, then the playback progress is 50%.

[0100] In practical applications, multiple historical viewing records of a user are obtained, each containing video information for one or more played videos. Taking one historical viewing record as an example: the playback progress of each played video in that record is obtained, and then a first identifier is determined for each played video based on the playback progress. Next, a second identifier is obtained for each played video, and then the first and second identifiers are labeled onto each played video, resulting in multiple sample videos carrying both identifiers. This method of identifying sample videos based on the first and second identifiers improves the confidence and reliability of the sample videos. Furthermore, training a neural network model based on these sample videos can reduce training time and improve the robustness of the video recommendation model.

[0101] It should be noted that the first and second identification information need to be matched one-to-one with each played video. For example, video A is labeled based on its first and second identification information; video B is labeled based on its first and second identification information.

[0102] In one or more optional embodiments of this application, the second identification information of each played video can be determined based on the statistical number of videos played in each historical viewing record and the first number of consecutive complete plays of videos played in each historical viewing record. That is, the specific implementation process of obtaining the second identification information of each played video can be as follows:

[0103] Determine the total number of videos played in each historical viewing record, and the first number of consecutively played videos in each historical viewing record;

[0104] For any historical viewing record, determine whether the first number corresponding to the historical viewing record is greater than the statistical number;

[0105] If so, then the second identifier information of each played video in the historical viewing record is determined to be an invalid playback identifier;

[0106] If not, then the second identifier information of each video played in the historical viewing record is determined to be a valid playback identifier.

[0107] Specifically, the statistical quantity can be the average of the videos played in each historical viewing record, the median of the videos played in each historical viewing record, or the minimum of the videos played in each historical viewing record. This application does not limit this; the first quantity refers to the number of videos played continuously and completely in a certain historical viewing record; the valid playback identifier indicates that the played video is played effectively; the invalid playback identifier indicates that the played video is played invalidly.

[0108] In practical applications, the number of plays for each historical viewing record is obtained, and then a statistical count is determined based on these numbers. Simultaneously, based on the playback progress of the videos in each historical viewing record, a first number of consecutive complete plays for each historical viewing record is determined. Further, it is determined whether the first number for each historical viewing record is greater than the statistical count: for historical viewing records where the first number is greater than the statistical count, the second identifier information for each played video is marked as invalid playback; for historical viewing records where the first number is less than or equal to the statistical count, the second identifier information for each played video is marked as valid playback. In this way, potentially invalid playback videos can be identified from a user's historical viewing records. If a user watches videos normally, there is a high probability of interactive behavior. If there is no continuous interactive behavior (including liking, giving coins, favorites, pausing, etc.) for a long period, but several videos are played consecutively and completely, there is a high probability that it is an invalid playback record. Therefore, this method can improve the accuracy of the second identifier information to a certain extent.

[0109] For example, based on the historical viewing records, the average number of videos watched per user per video playback application, K (K>0), is calculated as the statistical count. If a user's historical viewing record contains records of M consecutively and completely played videos, M is the first count. If M>K, then the user is likely not actually watching videos during this period. These M records are recorded, and the second identifier information of each played video in the historical viewing record is determined as an invalid playback identifier. If M≤K, the second identifier information of each played video in the historical viewing record is determined as a valid playback identifier.

[0110] In addition, after determining the second identifier information, it is also necessary to record these M videos and mark them to indicate that each video has been played continuously and completely N videos before it, where N is a natural number.

[0111] In one or more optional embodiments of this application, the first identification information, i.e., the number of videos that have been played continuously and completely before the already played video is marked as continuously and completely played, is used to determine the first identification information of each played video based on the playback progress of each played video in the historical viewing record. The specific implementation process can be as follows:

[0112] For any played video in the historical viewing record, determine a second number of consecutive complete playbacks of a designated playback video corresponding to the played video, wherein the designated playback video is a video played before the played video in the historical viewing record;

[0113] The second quantity is determined as the first identification information of the played video.

[0114] Specifically, the second quantity refers to the number of videos that were played continuously and completely before a certain video in a certain viewing history.

[0115] In practical applications, for any played video in the viewing history, the number of consecutive complete plays of videos played before the played video in the viewing history is counted, which is the second number; then the second number is used as the first identification information of the played video.

[0116] For example, in a viewing history, there are three played videos. The first played video is not played continuously and completely, the second played video is played continuously and completely, and the third played video is played continuously and completely. In this case, the first identifier information of the first played video is 0, the first identifier information of the second played video is 0, and the first identifier information of the third played video is 1.

[0117] In addition, you can mark only the first identifier information of the played videos that have been played continuously and completely, and set the first identifier information of other played videos that have not been played continuously and completely to 0 by default.

[0118] See Figure 2 , Figure 2 The illustration shows a schematic diagram of the effect of a historical viewing record in a video recommendation method provided in an embodiment of this application: Videos 1, 2, and 7 are not fully played, while videos 3, 4, 5, and 6 are fully played, meaning that the historical viewing record contains four consecutive fully played videos. Assuming the statistical count K = 2.3, these four videos are marked as follows:

[0119] a. Video 3 was not played continuously in its entirety before this point, so the first identifier is 0;

[0120] b. One video was played continuously before video 4, and the first identifier information is 1;

[0121] c. Two videos were played continuously before video 5, and the first identifier is 2;

[0122] d. Three videos were played continuously before video 6, and the first identifier information is 3.

[0123] This application provides a video recommendation method that obtains user information of a target user, video information of multiple videos to be recommended, and viewing characteristics of the target user. The viewing characteristics indicate whether multiple historical viewing records of the target user are played continuously and completely. Based on the user information, the video information of a first video to be recommended, and the viewing characteristics, a recommendation weight for the first video to be recommended is determined for the target user, wherein the first video to be recommended is any one of the multiple videos to be recommended. Based on the recommendation weight of each video to be recommended for the target user, a target video is determined from the multiple videos to be recommended and recommended to the target user. By correcting the user information and the video information of each video to be recommended through the target user's viewing characteristics, the recommendation weight of each video to be recommended for the target user is determined, improving the accuracy of the recommendation weight. This allows for a more accurate judgment of user preferences, thus more accurately recommending videos that the user likes, thereby improving the accuracy of video recommendations and ultimately increasing user engagement.

[0124] The following is in conjunction with the appendix Figure 3 Taking the video recommendation method provided in this application as an example in an Internet TV scenario, the video recommendation method will be further explained. Figure 3 The diagram illustrates a video recommendation method according to an embodiment of this application, which specifically includes the following steps:

[0125] Step 302: Obtain multiple historical viewing records for any user, wherein each historical viewing record contains video information of at least one played video.

[0126] Step 304: For any historical viewing record, determine the first identifier information of each played video based on the playback progress of each played video in the historical viewing record.

[0127] Optionally, based on the playback progress of each played video in the historical viewing record, the first identification information of each played video is determined, including:

[0128] For any played video in the historical viewing record, determine the second number of consecutive complete playbacks of the designated playback video corresponding to the played video, wherein the designated playback video is the played video in the historical viewing record that was played before the played video.

[0129] The second quantity is determined as the first identifier information of the played video.

[0130] Step 306: Determine the statistical number of videos played in each historical viewing record, and the first number of consecutive complete plays of videos played in each historical viewing record.

[0131] Step 308: For any historical viewing record, determine whether the first number corresponding to the historical viewing record is greater than the statistical number.

[0132] If yes, proceed to step 310; otherwise, proceed to step 312.

[0133] Step 310: Determine that the second identification information of each played video in the historical viewing record is an invalid playback identifier.

[0134] Step 312: Determine that the second identifier information of each played video in the historical viewing record is a valid playback identifier.

[0135] Step 314: Using the first and second identifier information of each played video, label each played video to obtain a sample video set.

[0136] Step 316: Obtain the preset neural network model, extract the video information of any sample video from the sample video set, input the video information of the sample video into the neural network model, and obtain the prediction result corresponding to the sample video.

[0137] Step 318: Calculate the initial loss value based on the prediction results and the second identifier information carried by the sample video.

[0138] Step 320: Determine the gradient coefficients corresponding to the sample video based on the first identifier information carried by the sample video.

[0139] Step 322: Calculate the loss value based on the gradient coefficients and the initial loss value.

[0140] Step 324: For any model parameter in the neural network model, input the initial value and loss value of the model parameter into the preset parameter determination model to determine the adjustment value of the model parameter.

[0141] Step 326: Adjust the model parameters in the neural network model according to the adjustment value.

[0142] Step 328: Continue to perform the step of extracting video information from any sample video in the sample video set. If the preset training stopping condition is met, the trained neural network model is determined as the video recommendation model.

[0143] Step 330: Obtain the target user's user information, the video information of multiple videos to be recommended, and the target user's viewing characteristics. The viewing characteristics indicate whether the target user's multiple historical viewing records are played continuously and completely.

[0144] Step 332: Input the user information, the video information of the first video to be recommended, and the viewing features into the video recommendation model to determine the recommendation weight of each video to be recommended for the target user. The first video to be recommended is any one of the multiple videos to be recommended.

[0145] Optionally, the video recommendation model determines the target user's video preference information based on user information and the feature information of whether each of the target user's historical viewing records are played continuously and completely; and determines the recommendation weight of each video to be recommended for the target user based on the video preference information and the video information of each video to be recommended.

[0146] Step 334: Sort the recommendation weights of each video to be recommended to the target user from largest to smallest, determine the videos to be recommended corresponding to the top N recommendation weights as target videos, and recommend the target videos to the target user, where N is a positive integer.

[0147] This application provides a video recommendation method that uses the viewing characteristics of target users, such as whether their historical viewing records are played continuously and completely, to correct user information and video information of each video to be recommended. This determines the recommendation weight of each video to be recommended for the target user, improving the accuracy of the recommendation weight. This allows for a more accurate judgment of user preferences, thus recommending videos that users like more accurately, thereby improving the accuracy of video recommendations and ultimately increasing user engagement.

[0148] Corresponding to the above method embodiments, this application also provides embodiments of a video recommendation device. Figure 4 A schematic diagram of a video recommendation device according to an embodiment of this application is shown. Figure 4 As shown, the device includes:

[0149] The first acquisition module 402 is configured to acquire user information of the target user, video information of multiple videos to be recommended, and viewing characteristics of the target user, wherein the viewing characteristics characterize whether multiple historical viewing records of the target user are played continuously and completely.

[0150] The determining module 404 is configured to determine the recommendation weight of the first video to be recommended for the target user based on the user information, the video information of the first video to be recommended, and the viewing characteristics, wherein the first video to be recommended is any one of the plurality of videos to be recommended;

[0151] The recommendation module 406 is configured to determine a target video from the plurality of videos to be recommended based on the recommendation weight of each video to be recommended for the target user, and recommend the target video to the target user.

[0152] In one or more optional embodiments of this application, the determining module 404 is configured to:

[0153] Based on the user information and the viewing characteristics, the video preference information of the target user is determined, wherein the video preference information represents the video information that the target user prefers to watch;

[0154] Based on the video preference information and the video information of the first video to be recommended, the recommendation weight of the first video to be recommended for the target user is determined.

[0155] In one or more optional embodiments of this application, the apparatus further includes a second acquisition module configured to:

[0156] A pre-trained video recommendation model is obtained, wherein the video recommendation model is trained based on sample videos carrying first identification information and second identification information, the first identification information representing the continuous and complete playback mark corresponding to the sample video, and the second identification information representing whether the sample video is played effectively.

[0157] Accordingly, the determining module 404 is further configured to:

[0158] The user information, the video information of the first video to be recommended, and the viewing features are input into the video recommendation model to determine the recommendation weight of the first video to be recommended for the target user.

[0159] In one or more optional embodiments of this application, the apparatus further includes a training module configured to:

[0160] Obtain a sample video set and a preset neural network model, wherein the sample video set contains multiple sample videos carrying first identification information and second identification information;

[0161] Extract video information from any sample video from the sample video set, input the video information of the sample video into the neural network model, and obtain the prediction result corresponding to the sample video;

[0162] Based on the prediction result, the first identification information and the second identification information carried by the sample video, calculate the loss value;

[0163] Based on the loss value, the model parameters of the neural network model are adjusted, and the step of extracting video information from any sample video in the sample video set is continued. When the preset training stopping condition is met, the trained neural network model is determined as the video recommendation model.

[0164] In one or more optional embodiments of this application, the training module is further configured to:

[0165] Calculate the initial loss value based on the prediction result and the second identification information carried by the sample video;

[0166] Based on the first identifier information carried by the sample video, determine the gradient coefficient corresponding to the sample video;

[0167] The loss value is calculated based on the gradient coefficients and the initial loss value.

[0168] In one or more optional embodiments of this application, the training module is further configured to:

[0169] For any model parameter in the neural network model, the initial value of the model parameter and the loss value are input into a preset parameter determination model to determine the adjustment value of the model parameter;

[0170] The model parameters in the neural network model are adjusted according to the adjustment value.

[0171] In one or more optional embodiments of this application, the training module is further configured to:

[0172] Obtain multiple historical viewing records of any user, wherein the historical viewing records contain video information of at least one played video;

[0173] For any given historical viewing record, determine the first identifier information of each video based on the playback progress of each video played in that historical viewing record;

[0174] Obtain the second identifier information for each played video;

[0175] Using the first and second identifier information of each played video, each played video is labeled to obtain a sample video set.

[0176] In one or more optional embodiments of this application, the training module is further configured to:

[0177] Determine the total number of videos played in each historical viewing record, and the first number of consecutively played videos in each historical viewing record;

[0178] For any historical viewing record, determine whether the first number corresponding to the historical viewing record is greater than the statistical number;

[0179] If so, then the second identifier information of each played video in the historical viewing record is determined to be an invalid playback identifier;

[0180] If not, then the second identifier information of each video played in the historical viewing record is determined to be a valid playback identifier.

[0181] In one or more optional embodiments of this application, the training module is further configured to:

[0182] For any played video in the historical viewing record, determine a second number of consecutive complete playbacks of a designated playback video corresponding to the played video, wherein the designated playback video is a video played before the played video in the historical viewing record;

[0183] The second quantity is determined as the first identification information of the played video.

[0184] In one or more optional embodiments of this application, the recommendation module 406 is further configured to:

[0185] The recommendation weights of each video to be recommended for the target user are arranged from largest to smallest. The videos to be recommended corresponding to the top N recommendation weights are determined as the target videos, where N is a positive integer.

[0186] This application provides a video recommendation device that acquires user information of a target user, video information of multiple videos to be recommended, and viewing characteristics of the target user. The viewing characteristics indicate whether multiple historical viewing records of the target user are played continuously and completely. Based on the user information, the video information of a first video to be recommended, and the viewing characteristics, a recommendation weight for the first video to be recommended is determined for the target user, wherein the first video to be recommended is any one of the multiple videos to be recommended. Based on the recommendation weight of each video to be recommended for the target user, a target video is determined from the multiple videos to be recommended and recommended to the target user. By correcting the user information and the video information of each video to be recommended using the viewing characteristics representing each historical viewing record of the target user, the recommendation weight of each video to be recommended for the target user is determined, improving the accuracy of the recommendation weight. This allows for a more accurate judgment of user preferences, thus more accurately recommending videos that the user likes, thereby improving the accuracy of video recommendations and ultimately increasing user engagement.

[0187] The above is an illustrative scheme of a video recommendation device according to this embodiment. It should be noted that the technical solution of this video recommendation device and the technical solution of the video recommendation method described above belong to the same concept. For details not described in detail in the technical solution of the video recommendation device, please refer to the description of the technical solution of the video recommendation method described above.

[0188] Figure 5 A structural block diagram of a computing device 500 according to an embodiment of this application is shown. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 560 is used to store data.

[0189] The computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 540 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0190] In one embodiment of this application, the aforementioned components of the computing device 500 and Figure 5 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 5 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.

[0191] The computing device 500 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 500 can also be a mobile or stationary server.

[0192] The processor 520 executes the computer instructions to implement the video recommendation method.

[0193] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the video recommendation method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the video recommendation method described above.

[0194] An embodiment of this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the video recommendation method as described above.

[0195] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the video recommendation method described above. Details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the video recommendation method described above.

[0196] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0197] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0198] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0199] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0200] The preferred embodiments disclosed above are merely illustrative of this application. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this application. These embodiments are selected and specifically described in this application to better explain the principles and practical applications of this application, thereby enabling those skilled in the art to better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.

Claims

1. A video recommendation method, characterized by, The method comprises: obtaining user information of a target user, video information of a plurality of videos to be recommended, and viewing characteristics of the target user, wherein the viewing characteristics represent whether a plurality of historical viewing records of the target user are continuously and completely played; inputting the user information, video information of a first video to be recommended, and the viewing characteristics into a video recommendation model to determine a recommendation weight of the first video to be recommended for the target user; wherein the first video to be recommended is any one of the plurality of videos to be recommended; determining a target video from the plurality of videos to be recommended according to the recommendation weight of each video to be recommended for the target user, and recommending the target video to the target user; wherein the method further comprises: obtaining a pre-trained video recommendation model, which is trained based on sample videos carrying first identification information and second identification information; wherein the first identification information is the number of videos that are continuously and completely played before the sample video in a historical viewing record in which the sample video is located; and the second identification information is an invalid playing identifier or a valid playing identifier obtained by comparing the number of played videos in each historical viewing record with the number of videos that are continuously and completely played in the historical viewing record in which the sample video is located.

2. The method of claim 1, wherein, The method further comprises: determining video preference information of the target user according to the user information and the viewing characteristics, wherein the video preference information represents video information that the target user prefers to watch; determining the recommendation weight of the first video to be recommended for the target user according to the video preference information and the video information of the first video to be recommended.

3. The method of claim 1, wherein, Before obtaining the pre-trained video recommendation model, the method further comprises: obtaining a sample video set and a preset neural network model, wherein the sample video set comprises a plurality of sample videos carrying first identification information and second identification information; extracting video information of any sample video from the sample video set, inputting the video information of the sample video into the neural network model to obtain a prediction result corresponding to the sample video; calculating a loss value according to the prediction result, the first identification information carried by the sample video, and the second identification information carried by the sample video; adjusting model parameters of the neural network model according to the loss value, continuing to perform the step of extracting video information of any sample video from the sample video set, and determining the trained neural network model as a video recommendation model if a preset training stop condition is met.

4. The method of claim 3, wherein, The method further comprises: calculating an initial loss value according to the prediction result and the second identification information carried by the sample video; determining a gradient coefficient corresponding to the sample video according to the first identification information carried by the sample video; the gradient coefficient is used to represent a probability that the sample video is not invalid playing. According to the gradient coefficient and the initial loss value, a loss value is calculated.

5. The method of claim 3, wherein, The adjusting the model parameter of the neural network model according to the loss value comprises: For any model parameter in the neural network model, an initial value of the model parameter and the loss value are input into a preset parameter determination model to determine an adjustment value of the model parameter; According to the adjustment value, the model parameter in the neural network model is adjusted.

6. The method according to any one of claims 3-5, characterized in that, The obtaining the sample video set comprises: Obtaining a plurality of historical viewing records of any user, wherein the historical viewing records contain video information of at least one played video; For any historical viewing record, first identification information of each played video is determined according to a playing progress of each played video in the historical viewing record; Second identification information of each played video is obtained; The sample video set is obtained by respectively labeling each played video by using the first identification information and the second identification information of each played video.

7. The method of claim 6, wherein, The obtaining the second identification information of each played video comprises: Determining a statistical quantity of played videos in each historical viewing record and a first quantity of played videos that are continuously and completely played in each historical viewing record; For any historical viewing record, it is determined whether the first quantity corresponding to the historical viewing record is greater than the statistical quantity; If yes, the second identification information of each played video in the historical viewing record is determined as invalid playing identification; If no, the second identification information of each played video in the historical viewing record is determined as valid playing identification.

8. The method of claim 1, wherein, The determining the target video from the plurality of to-be-recommended videos according to the recommendation weight of each to-be-recommended video for the target user comprises: Arranging the recommendation weight of each to-be-recommended video for the target user from large to small, and determining to-be-recommended videos corresponding to the top N recommendation weights as target videos, wherein N is a positive integer.

9. A video recommendation apparatus, comprising: Comprise: The first obtaining module is configured to obtain user information of a target user, video information of a plurality of to-be-recommended videos, and viewing characteristics of the target user, wherein the viewing characteristics represent whether a plurality of historical viewing records of the target user are continuously and completely played; The determining module is configured to input the user information, video information of a first to-be-recommended video, and the viewing characteristics into a video recommendation model to determine a recommendation weight of the first to-be-recommended video for the target user; wherein the first to-be-recommended video is any one of the plurality of to-be-recommended videos; The recommendation module is configured to determine a target video from the plurality of to-be-recommended videos according to the recommendation weight of each to-be-recommended video for the target user, and recommend the target video to the target user; Further comprising: Obtaining a pre-trained video recommendation model, wherein the video recommendation model is trained based on sample videos carrying first identification information and second identification information; The first identification information is the number of videos that are played continuously and completely before the sample video in the historical viewing record in which the sample video is located; and the second identification information is an invalid playing identification or a valid playing identification obtained by comparing the number of played videos in each historical viewing record with the number of videos that are played continuously and completely in the historical viewing record in which the sample video is located.

10. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein, The processor executes the computer instructions to implement the steps of the method in any one of claims 1-8.

11. A computer-readable storage medium storing computer instructions, wherein, The computer instructions are executed by the processor to implement the steps of the method in any one of claims 1-8.

12. A computer program product comprising computer instructions, characterised in that, The computer instructions are executed by the processor to implement the steps of the method in any one of claims 1-8. The computer instructions are executed by the processor to implement the steps of the method in any one of claims 1-8.

Citation Information

Patent Citations

  • Video recall method and device and video recommendation method and device

    CN111400546A

  • Short video recommendation method

    CN113268633A