A video recommendation method and device, electronic equipment and storage medium
By acquiring users' historical viewing records and predicting viewing duration, videos with suitable playback durations are filtered out for recommendation, solving the problem of low recommendation accuracy in existing technologies and achieving higher recommendation accuracy and user satisfaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING QIYI CENTURY SCI & TECH CO LTD
- Filing Date
- 2023-03-28
- Publication Date
- 2026-04-17
AI Technical Summary
Existing video recommendation methods have low accuracy, mainly because they only recommend videos based on the type selected by the user and fail to consider the user's viewing habits and video duration at different times.
By obtaining the historical viewing records of users to be recommended, identifying the predicted viewing time of users in different time periods, filtering out videos whose playback time is less than the predicted viewing time in the current time period, and making recommendations based on the user's selection information.
This improves the accuracy of video recommendations and user experience, ensuring that recommended videos match users' viewing habits and viewing time requirements at the current time.
Smart Images

Figure CN116347171B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and in particular to a video recommendation method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, watching videos for leisure and entertainment has become one of the main forms of relaxation for people. To improve the user experience while watching videos, operators often recommend videos to users.
[0003] However, current video recommendations to users are often based solely on the type of video selected by the user, such as movies, anime, or news, resulting in low accuracy in video recommendations. Summary of the Invention
[0004] The purpose of this invention is to provide a video recommendation method, apparatus, electronic device, and storage medium to improve the accuracy of video recommendations. The specific technical solution is as follows:
[0005] In a first aspect of this invention, a video recommendation method is provided, comprising:
[0006] Obtain the historical viewing records of the user to be recommended; based on the historical viewing records, identify one or more videos to be recommended to the user and the playback duration of each video;
[0007] Based on the pre-determined predicted viewing time of the user to be recommended at different time periods, identify the predicted viewing time of the user to be recommended in the current time period;
[0008] Based on the playback duration of each video to be recommended, identify videos among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration of the current time period, and recommend them to the users to be recommended.
[0009] In one possible implementation, before identifying the predicted viewing time of the user to be recommended in the current time period based on the predetermined predicted viewing time of the user to be recommended in different time periods, the method further includes:
[0010] Based on the historical viewing records of the users to be recommended, identify the duration of video viewing by the users to be recommended at different times;
[0011] Based on the duration of video viewing at different times, predict the viewing time of the user to be recommended at different times.
[0012] In one possible implementation, identifying the predicted viewing time of the user to be recommended in the current time period based on the predetermined predicted viewing time of the user to be recommended in different time periods includes:
[0013] Identify the current time period among multiple pre-set time periods;
[0014] Based on the pre-determined predicted viewing duration of the user to be recommended at different time periods and the current time period, the corresponding predicted viewing duration is identified.
[0015] In one possible implementation, identifying the predicted viewing time of the user to be recommended in the current time period based on the predetermined predicted viewing time of the user to be recommended in different time periods includes:
[0016] Identify the current time period among multiple pre-set time periods;
[0017] Calculate the difference between the current time and the starting value of the time period in which the current time is located to obtain a first difference; calculate the difference between the starting value and the ending value of the time period in which the current time is located to obtain a second difference; calculate the ratio of the first difference to the sum of the first difference and the second difference to obtain a first ratio, wherein the predicted viewing time of the user to be recommended in different time periods includes the viewing time intervals corresponding to different time periods;
[0018] Identify the time period in which the current moment is located, and based on the time period in which the current moment is located and the viewing duration intervals corresponding to the different time periods, identify the viewing duration interval corresponding to the current moment; calculate the difference between the start value and the end value of the corresponding viewing duration interval to obtain the third difference;
[0019] The product of the first ratio and the third difference is calculated and summed with the starting value of the viewing time interval to obtain the predicted viewing time of the user to be recommended in the current time period.
[0020] In one possible implementation, after identifying videos among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration for the current time period, and recommending them to the users to be recommended, the method further includes:
[0021] Obtain the selection information of the user to be recommended for the recommended video;
[0022] Based on the selection information, identify one or more target videos that match the selection information from one or more videos to be recommended to the user to be recommended, and the playback duration of each target video; identify videos from the one or more target videos whose playback duration is less than the predicted viewing duration of the current time period, and recommend them to the user to be recommended.
[0023] In one possible implementation, identifying one or more videos to be recommended to the user and the playback duration of each video based on the historical viewing records includes:
[0024] Based on the historical viewing records, the identity feature vector of the user to be recommended is calculated using user profiles;
[0025] Calculate the similarity between the identity feature vector of the user to be recommended and the video feature vector of each video in the preset video set;
[0026] Based on the calculated similarity, one or more videos to be recommended to the user are determined, and the playback duration of each video to be recommended is obtained.
[0027] In a second aspect of the invention, a video recommendation device is also provided, comprising:
[0028] The playback duration acquisition module is used to acquire the historical viewing records of the user to be recommended; based on the historical viewing records, it identifies one or more videos to be recommended to the user and the playback duration of each video;
[0029] The viewing duration calculation module is used to identify the predicted viewing duration of the user to be recommended in the current time period based on the pre-determined predicted viewing duration of the user to be recommended in different time periods.
[0030] The recommended video recognition module is used to identify videos among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration of the current time period, based on the playback duration of each video to be recommended, and to recommend them to the users to be recommended.
[0031] In one possible implementation, the device further includes:
[0032] The total duration calculation module is used to identify the total duration of video viewing by the user to be recommended each time the application is opened during different time periods, based on the user's historical viewing records.
[0033] The duration creation module is used to create the predicted viewing duration of the user to be recommended in different time periods based on the total viewing time of the video in different time periods.
[0034] In one possible implementation, the viewing duration calculation module includes:
[0035] The time period recognition submodule is used to identify the current time period among multiple pre-set time periods;
[0036] The duration recognition submodule is used to identify the corresponding predicted viewing duration based on the pre-determined predicted viewing duration of the user to be recommended in different time periods and the time period in which the current moment is located.
[0037] In one possible implementation, the viewing duration calculation module includes:
[0038] The time period recognition submodule is used to identify the current time period among multiple pre-set time periods;
[0039] The ratio calculation submodule is used to calculate the difference between the current time and the starting value of the time period in which the current time is located, to obtain a first difference; calculate the difference between the starting value and the ending value of the time period in which the current time is located, to obtain a second difference; calculate the first difference and the ratio of the first difference to the sum of the first difference and the second difference, to obtain a first ratio. The predicted viewing time of the user to be recommended in different time periods includes the viewing time intervals corresponding to different time periods.
[0040] The difference calculation submodule is used to identify the time period in which the current moment is located, and based on the time period in which the current moment is located and the viewing duration intervals corresponding to the different time periods, to identify the viewing duration interval corresponding to the current moment; and to calculate the difference between the start value and the end value of the corresponding viewing duration interval to obtain the third difference.
[0041] The viewing duration calculation submodule is used to calculate the product of the first ratio and the third difference, and the sum of the product and the starting value of the viewing duration interval to obtain the predicted viewing duration of the user to be recommended in the current time period.
[0042] In one possible implementation, the device further includes:
[0043] The selection information acquisition module is used to acquire the selection information of the user to be recommended for the recommended video;
[0044] The video recommendation module is used to identify, based on the selection information, one or more target videos that match the selection information among one or more videos to be recommended to the user to be recommended, and the playback duration of each target video; identify videos among the one or more target videos whose playback duration is less than the predicted viewing duration of the current time period, and recommend them to the user to be recommended.
[0045] In one possible implementation, the playback duration acquisition module includes:
[0046] The user profiling submodule is used to calculate the identity feature vector of the user to be recommended based on the historical viewing records and user profile.
[0047] The similarity calculation submodule is used to calculate the similarity between the identity feature vector of the user to be recommended and the video feature vector of each video in the preset video set;
[0048] The video determination submodule is used to determine one or more videos to be recommended to the user based on the calculated similarity, and to obtain the playback duration of each video to be recommended.
[0049] In another aspect of the present invention, an electronic device is also 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.
[0050] Memory, used to store computer programs;
[0051] The processor, when executing a program stored in memory, implements any of the video recommendation methods described above.
[0052] In another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program, when executed by a processor, implements any of the video recommendation methods described above.
[0053] In another aspect 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.
[0054] This invention provides a video recommendation method, apparatus, electronic device, and storage medium. The method involves acquiring the historical viewing records of a user to be recommended to; identifying one or more videos to be recommended to the user and their playback durations based on these records; identifying the user's predicted viewing duration in the current time period based on pre-determined predicted viewing durations for the user at different time periods; and identifying videos among the one or more recommended videos whose playback duration is shorter than the predicted viewing duration for the current time period, and recommending them to the user. Therefore, the solution implemented in this application not only identifies videos favored by the user based on their historical viewing records but also filters videos favored by the user based on their playback duration in the current time period, identifies videos favored by the user whose playback duration is shorter than the predicted viewing duration, and recommends them to the user, thereby improving the accuracy of video recommendations and the user experience. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0056] Figure 1 This is a flowchart illustrating a video recommendation method in an embodiment of the present invention;
[0057] Figure 2 This is a flowchart illustrating a process for creating predicted viewing durations for different time periods in an embodiment of the present invention.
[0058] Figure 3 This is a schematic diagram of a process for identifying and predicting viewing duration in an embodiment of the present invention;
[0059] Figure 4 This is a schematic diagram of a process for obtaining the predicted viewing duration for the current time period in an embodiment of the present invention;
[0060] Figure 5 This is a schematic diagram of a process for recommending to the user to be recommended again in an embodiment of the present invention;
[0061] Figure 6 This is a list of usage durations for multiple preset times in an embodiment of the present invention;
[0062] Figure 7 This is a schematic diagram of a video recommendation device in an embodiment of the present invention;
[0063] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0064] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0065] In a first aspect of this invention, a video recommendation method is provided, see [link to relevant documentation]. Figure 1 ,include:
[0066] Step S11: Obtain the historical viewing records of the user to be recommended; based on the historical viewing records, identify one or more videos to be recommended to the user and the playback duration of each video.
[0067] In this embodiment, the historical viewing record may include the time the user opened the application, the type of video watched, and the length of the video watched. Based on the historical viewing record, videos from a preset video set that the user prefers can be identified. This can be done by identifying the characteristics of the videos preferred by the user based on the historical viewing record, and then matching these characteristics with the characteristics of each video in the preset video set. Videos with a matching degree greater than a preset matching degree threshold, or the top N videos with the highest matching degree, are selected as recommended videos. The playback duration of each recommended video is then obtained. The playback duration of a recommended video refers to its total duration; for example, a video might have a playback duration of 2 minutes.
[0068] The method described in this application is applied to a smart terminal and can be implemented through a smart terminal, specifically a computer, mobile phone, or server.
[0069] Step S12: Based on the predetermined predicted viewing duration of the user to be recommended in different time periods, identify the predicted viewing duration of the user to be recommended in the current time period.
[0070] In this embodiment, the predicted viewing time of the user to be recommended can be obtained in advance at different time periods. Specifically, a list of viewing times for the user to be recommended can be created, which can include the predicted viewing time of the user at different time periods. For example, the predicted viewing time is 60 minutes from 5:00 to 9:00, and 20 minutes from 9:00 to 12:00. Here, the current time period in this embodiment refers to the time period in which the current moment is located. Since multiple time periods are preset, when determining the current time period, it can be determined which preset time period the current moment falls into, and that is taken as the current time period. For example, if the current moment is 8:00, then the current time period is the time period from 5:00 to 9:00. In actual use, the viewing time of users often varies at different times. For example, from 5:00 to 9:00 in the morning, users often watch videos during their commute, which may be longer, while from 9:00 to 12:00, users often watch videos during work hours, which may be shorter, as they may be watching while making changes during work. In practical use, by statistically analyzing the video viewing time of a large number of users, the predicted viewing time of users in different time periods can be obtained through filtering and statistics, and the predicted viewing time of users to be recommended in different time periods can be determined based on this.
[0071] Step S13: Based on the playback duration of each video to be recommended, identify the video among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration of the current time period, and recommend it to the user to be recommended.
[0072] Specifically, based on the playback duration of each video to be recommended, videos with a playback duration shorter than the predicted viewing duration for the current time period are identified from among the one or more videos to be recommended. This can be done by comparing the playback duration of each video to be recommended with the predicted viewing duration for the current time period, and recommending the videos with shorter playback durations to the user. For example, if there are three videos to be recommended, with corresponding durations of 1 hour, 30 minutes, and 25 minutes, and the predicted viewing duration for the current time period is 40 minutes, the durations of the three videos to be recommended are compared with the predicted viewing duration of 40 minutes for the current time period. The videos with shorter playback durations are identified as the second and third videos to be recommended and recommended to the user. In one example, recommending one or more videos to the user whose playback duration is shorter than the predicted viewing duration for the current time period can be done by recommending one or more videos from among the videos to be recommended. For example, after identifying videos with shorter playback durations than the predicted viewing duration for the current time period, all identified videos with shorter playback durations than the predicted viewing duration for the current time period are recommended to the user, or the first N videos are recommended to the user. Specifically, when identifying videos among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration of the current time period based on the playback duration of each video to be recommended, and recommending them to the users to be recommended, videos with the same predicted viewing duration as the current time period can be selected for recommendation first. For example, videos whose time difference with the predicted viewing duration of the current time period is within a preset difference range can be selected for recommendation first, such as 5 minutes.
[0073] As can be seen, the solution implemented in this application can not only identify the videos that users like through their historical viewing records, but also filter the videos that users like based on their duration in the current time period, identify the videos that users like and whose duration is shorter than the predicted viewing duration, and recommend them to users, thereby improving the accuracy of video recommendations and the user experience.
[0074] In one possible implementation, before identifying the predicted viewing time of the user to be recommended in the current time period based on the predetermined predicted viewing time of the user to be recommended in different time periods, see [link to relevant documentation]. Figure 2 The method further includes:
[0075] Step S21: Based on the historical viewing records of the user to be recommended, identify the duration of video viewing by the user at different times;
[0076] Step S22: Based on the duration of video viewing at different times, create the predicted viewing duration for the user to be recommended at different times.
[0077] In this embodiment, the pre-determined predicted viewing duration of the user to be recommended at different time periods can be created based on the user's historical viewing records. Specifically, based on the user's historical viewing records, when identifying the viewing duration of each viewing session, the time when the user opens and closes the application can be counted, and the time interval between these times can be used as the duration of the current video viewing. Then, the time period in which the application was opened can be counted to obtain the predicted viewing duration of the user at different time periods. In actual use, the viewing duration of a large number of users can be statistically analyzed, and the correspondence between the predicted viewing duration of general users at different time periods can be obtained through filtering and statistics. Then, for the user to be recommended, this correspondence can be updated and revised based on the user's historical viewing records. For example, the predicted viewing duration of general users at different time periods can be updated based on the viewing duration of each time period in the user's historical viewing records to obtain the predicted viewing duration of the user to be recommended at different time periods.
[0078] As can be seen, the method of this application embodiment can identify the duration of video viewing by the user to be recommended in different time periods based on the user's historical viewing records, and thus create the predicted viewing duration of the user to be recommended in different time periods based on the viewing duration in different time periods. This facilitates the determination of the predicted viewing duration based on the correspondence, thereby improving the accuracy of the predicted duration determination.
[0079] In one possible implementation, the step of identifying the predicted viewing time of the user to be recommended in the current time period based on the pre-determined predicted viewing time of the user to be recommended in different time periods, see [link to relevant documentation]. Figure 3 ,include:
[0080] Step S121: Identify the current time period among multiple pre-set time periods;
[0081] Step S122: Identify the corresponding predicted viewing duration based on the pre-determined predicted viewing duration of the user to be recommended at different time periods and the time period in which the current moment is located.
[0082] In this embodiment of the application, when identifying the predicted viewing time of the user to be recommended in the current time period based on the predetermined predicted viewing time of the user to be recommended in different time periods, the current time period can be identified first among multiple preset time periods. Specifically, the current time can be obtained, for example, 8 o'clock, and then it can be identified which of the multiple preset time periods this time belongs to, for example, 5 o'clock to 9 o'clock. For example, the time when the user opened the application can be matched with multiple preset time periods to determine the viewing time corresponding to the current time period.
[0083] As can be seen, the method of this application embodiment can identify the time period in which the current moment is located among multiple preset time periods, and then identify the corresponding predicted viewing time based on the predicted viewing time of the user to be recommended in different time periods and the time period in which the current moment is located, thereby filtering videos based on the predicted viewing time and improving the accuracy of recommending videos to users.
[0084] In one possible implementation, the step of identifying the predicted viewing time of the user to be recommended in the current time period based on the pre-determined predicted viewing time of the user to be recommended in different time periods, see [link to relevant documentation]. Figure 4 ,include:
[0085] Step S41: Identify the time period in which the current moment is located among multiple pre-set time periods;
[0086] Step S42: Calculate the difference between the current time and the starting value of the time period in which the current time is located to obtain a first difference; calculate the difference between the starting value and the ending value of the time period in which the current time is located to obtain a second difference; calculate the ratio of the first difference to the sum of the first difference and the second difference to obtain a first ratio. The predicted viewing time of the user to be recommended in different time periods includes the viewing time intervals corresponding to different time periods.
[0087] Step S43: Identify the time period in which the current moment is located, and based on the time period in which the current moment is located and the viewing duration intervals corresponding to the different time periods, identify the viewing duration interval corresponding to the time period in which the current moment is located; calculate the difference between the start value and the end value of the corresponding viewing duration interval to obtain the third difference;
[0088] Step S44: Calculate the product of the first ratio and the third difference, and sum it with the starting value of the viewing time interval to obtain the predicted viewing time of the user to be recommended in the current time period.
[0089] In practical use, when determining the predicted viewing time for a user at different times, the viewing time may vary each time. Therefore, the viewing time corresponding to each preset time period can be considered as a time period, and the predicted viewing time for the user to be recommended at different times includes the viewing time intervals corresponding to different time periods. An example of the created time list can be seen in the table below:
[0090] Table 1. List of preset time usage durations
[0091]
[0092] For example, if the current time is 7:00, and the time period is from 5:00 to 9:00, the difference between the current time and the starting value of the time period is calculated. The first difference is 7 - 5 = 2, which corresponds to 2 hours. The difference between the starting and ending values of the time period is calculated, resulting in a second difference of 9 - 7 = 2, which also corresponds to 2 hours. The ratio of the first and second differences is calculated to be 1:(1+1) = 1:2. The time period of the current time is identified, and based on the time period of the current time and the viewing duration intervals corresponding to different time periods, the viewing duration interval corresponding to the current time period is identified as the duration interval for 5:00 to 9:00, which is 30 minutes to 60 minutes. The difference between the starting and ending values of the corresponding viewing duration interval is calculated, resulting in a third difference of 60 - 30 = 30, which corresponds to 30 minutes. The product of the first ratio and the third difference is calculated as (1 / 2)*30 = 15. The sum of this product and the starting value of the viewing time interval is 15 + 30 = 45. This gives the predicted viewing time of the user to be recommended in the current time period. Therefore, the predicted viewing time of the user to be recommended in the current time period is 45 minutes.
[0093] In practical use, corresponding time-segment tags can be created for predicted viewing durations at different times. For example, the time segment from 5 AM to 9 AM could be tagged as "morning," "wake up," "wash up," and "breakfast." See also... Figure 5Furthermore, content tag libraries can be built based on different time points and usage durations. For example, tags can be added for the time slots of 6:00, 7:00, and 8:00: "6:30 Entertainment News" and "6:30 Today's Hot Topics"; for the time slots of 9:00, 10:00, and 11:00: "9:00 Helping Users Schedule (Historical Usage Habits: Short Video Broadcast)"; and for the time slots of 12:00 and 13:00: "12:00 Lunch Time (Game Commentary)," "12:00 Lunch Time (Crosstalk and Skit Broadcast)," "12:00 Lunch Time (One Episode of a Highlighted Variety Show)," and "12:00 Lunch Time (Following UP Masters (uploa)" (Uploader) For the time slots of 14:00, 15:00, 16:00, and 17:00, tags can be added: 14:00 Helping users schedule (historical usage habits: TV show broadcast); for the time slot of 18:00, tags can be added: 18:00 Dinner time (watching an episode of a TV series), 18:00 Dinner time (same as lunch time); for the time slots of 19:00 and 20:00, tags can be added: 19:00 Entertainment time (watching a TV series), 19:00 Entertainment time (a movie), 19:00 Entertainment time (short video broadcast; TV show broadcast), 19:00 Live broadcast (Premier League Liverpool vs. Manchester United). "Helping users schedule" can refer to videos that the user does not currently prefer, recommended based on the user's usage habits, along with the corresponding tags for those videos.
[0094] As can be seen, the method of this application embodiment can calculate the predicted viewing time of the user to be recommended in the current time period, and then filter the videos to be recommended based on the recommended viewing time, thereby recommending them to the user and improving the accuracy of the recommendation.
[0095] In one possible implementation, after identifying videos among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration for the current time period, and recommending them to the users to be recommended, see [link to relevant documentation]. Figure 6 The method further includes:
[0096] Step S61: Obtain the selection information of the user to be recommended for the recommended video;
[0097] Step S62: Based on the selection information, identify one or more target videos that match the selection information among one or more videos to be recommended to the user to be recommended, and the playback duration of each target video; identify videos among the one or more target videos whose playback duration is less than the predicted viewing duration of the current time period, and recommend them to the user to be recommended.
[0098] After identifying videos among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration for the current time period, and recommending them to the users to be recommended, when it is necessary to recommend videos to the users to be recommended again, the selection information of the users to be recommended for the recommended videos can be obtained. This selection information can refer to which video the user specifically selected, or it can be information about the video selected by the user, such as the video's category, author, actors, director, etc.
[0099] Specifically, based on the selected information, one or more target videos matching the selected information and their playback durations are identified from among one or more videos to be recommended to the user. This involves matching the feature information of the user-selected video with the feature information of each video in a preset video set. Specifically, feature vectors for each video in the preset video set can be pre-obtained. These feature vectors can be calculated from information such as the video's category, author, actors, and director. For example, after obtaining the video's category, author, actors, and director information, the vectors are vectorized to obtain the video's feature vector. Then, the similarity between the feature vector corresponding to the user-selected video and the feature vectors of multiple videos to be recommended is calculated. The top few videos with the highest similarity are selected as target videos, and their playback durations are obtained. Finally, videos among the one or more target videos whose playback duration is less than the predicted viewing duration for the current time period are identified and recommended to the user. Therefore, when recommending videos to the user again, the playback duration of the recommended videos is still less than the predicted viewing duration for the current time period, improving the accuracy of the recommendations.
[0100] In one possible implementation, identifying one or more videos to be recommended to the user and their playback duration based on the historical viewing records includes: calculating the user's identity feature vector using a user profile based on the historical viewing records; calculating the similarity between the user's identity feature vector and the video feature vectors of each video in a preset video set; determining one or more videos to be recommended to the user based on the calculated similarity, and obtaining the playback duration of each video. In this embodiment, calculating the user's identity feature vector based on the historical viewing records using a user profile can be performed using various methods, such as obtaining the user's identity features and preference features. Calculating the similarity of video feature vectors can be performed using various methods, such as cosine similarity. Determining one or more videos to be recommended to the user based on the calculated similarity can involve selecting the N videos with the highest calculated similarity as the recommended videos.
[0101] As can be seen, the method of this application embodiment can identify one or more target videos that match the selection information among one or more videos to be recommended to the user to be recommended, and the playback duration of each target video, thereby identifying videos among the one or more target videos whose playback duration is less than the predicted viewing duration of the current time period, and recommending them to the user to be recommended. This not only allows for recommendations based on the current user's preferences, but also meets the playback duration requirements, thus improving the accuracy of the recommendations.
[0102] To illustrate the solutions of the embodiments of this application, the following description is provided in conjunction with specific embodiments, including:
[0103] 1. Based on users' historical usage habits, build a big data pool of recommended materials. The data values can include a large number of videos, specifically movies, short videos, etc.
[0104] 2. Taking user A as an example, according to the traditional recommendation algorithm, content suitable for user A's taste is selected from the big data pool of recommendation materials to obtain data set D1. As can be seen in the above embodiment, when selecting videos suitable for user taste, the similarity can be calculated, and then the top N videos with the highest similarity can be selected.
[0105] 3. Based on the time when the user opened the application this time and the pre-calculated estimated usage time for each time point, the estimated usage time H of the user is calculated. Based on the time when the user opened the application this time and the estimated usage time corresponding to different pre-created event segments, the estimated usage time of the user this time is calculated.
[0106] 4. In data set D1, filter out content with a duration no greater than duration H to obtain result data set D2 (this data set corresponds to a higher playback experience for users than data set D1). Select videos from those videos that suit the user's tastes, whose playback duration is no greater than the user's expected usage time.
[0107] 5. Since the data combination D2 may be a collection of multiple videos with a duration of less than H, as users watch, the subsequent recommendation set will continue to be filtered based on the duration H to ensure that the user's overall viewing time is around H. In actual use, when filtering based on the duration H, videos with a difference of no more than 5 minutes from H can be selected for recommendation.
[0108] As can be seen, the solution implemented in this application can not only identify the videos that users like through their historical viewing records, but also filter the videos that users like based on their duration in the current time period, identify the videos that users like and whose duration is shorter than the predicted viewing duration, and recommend them to users, thereby improving the accuracy of video recommendations and the user experience.
[0109] In a second aspect of the invention, a video recommendation device is also provided, see [link to relevant documentation]. Figure 7 ,include:
[0110] The playback duration acquisition module 701 is used to acquire the historical viewing records of the user to be recommended; based on the historical viewing records, it identifies one or more videos to be recommended to the user and the playback duration of each video to be recommended;
[0111] The viewing duration calculation module 702 is used to identify the predicted viewing duration of the user to be recommended in the current time period based on the predetermined predicted viewing duration of the user to be recommended in different time periods.
[0112] The recommended video recognition module 703 is used to identify, based on the playback duration of each video to be recommended, a video whose playback duration is less than the predicted viewing duration of the current time period among the one or more videos to be recommended, and recommend it to the user to be recommended.
[0113] In one possible implementation, the device further includes:
[0114] The total duration calculation module is used to identify the total duration of video viewing by the user to be recommended each time the application is opened during different time periods, based on the user's historical viewing records.
[0115] The duration creation module is used to create the predicted viewing duration of the user to be recommended in different time periods based on the total viewing time of the video in different time periods.
[0116] In one possible implementation, the viewing duration calculation module includes:
[0117] The time period recognition submodule is used to identify the current time period among multiple pre-set time periods;
[0118] The duration recognition submodule is used to identify the corresponding predicted viewing duration based on the pre-determined predicted viewing duration of the user to be recommended in different time periods and the time period in which the current moment is located.
[0119] In one possible implementation, the viewing duration calculation module includes:
[0120] The time period recognition submodule is used to identify the current time period among multiple pre-set time periods;
[0121] The ratio calculation submodule is used to calculate the difference between the current time and the starting value of the time period in which the current time is located, to obtain a first difference; calculate the difference between the starting value and the ending value of the time period in which the current time is located, to obtain a second difference; calculate the first difference and the ratio of the first difference to the sum of the first difference and the second difference, to obtain a first ratio. The predicted viewing time of the user to be recommended in different time periods includes the viewing time intervals corresponding to different time periods.
[0122] The difference calculation submodule is used to identify the time period in which the current moment is located, and based on the time period in which the current moment is located and the viewing duration intervals corresponding to the different time periods, to identify the viewing duration interval corresponding to the current moment; and to calculate the difference between the start value and the end value of the corresponding viewing duration interval to obtain the third difference.
[0123] The viewing duration calculation submodule is used to calculate the product of the first ratio and the third difference, and the sum of the product and the starting value of the viewing duration interval to obtain the predicted viewing duration of the user to be recommended in the current time period.
[0124] In one possible implementation, the device further includes:
[0125] The selection information acquisition module is used to acquire the selection information of the user to be recommended for the recommended video;
[0126] The video recommendation module is used to identify, based on the selection information, one or more target videos that match the selection information among one or more videos to be recommended to the user to be recommended, and the playback duration of each target video; identify videos among the one or more target videos whose playback duration is less than the predicted viewing duration of the current time period, and recommend them to the user to be recommended.
[0127] In one possible implementation, the playback duration acquisition module includes:
[0128] The user profiling submodule is used to calculate the identity feature vector of the user to be recommended based on the historical viewing records and user profile.
[0129] The similarity calculation submodule is used to calculate the similarity between the identity feature vector of the user to be recommended and the video feature vector of each video in the preset video set;
[0130] The video determination submodule is used to determine one or more videos to be recommended to the user based on the calculated similarity, and to obtain the playback duration of each video to be recommended.
[0131] As can be seen, the solution implemented in this application can not only identify the videos that users like through their historical viewing records, but also filter the videos that users like based on their duration in the current time period, identify the videos that users like and whose duration is shorter than the predicted viewing duration, and recommend them to users, thereby improving the accuracy of video recommendations and the user experience.
[0132] This invention also provides an electronic device, such as... Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804. The processor 801, communication interface 802, and memory 803 communicate with each other via the communication bus 804.
[0133] Memory 803 is used to store computer programs;
[0134] When processor 801 executes a program stored in memory 803, it performs the following steps:
[0135] Obtain the historical viewing records of the user to be recommended; based on the historical viewing records, identify one or more videos to be recommended to the user and the playback duration of each video;
[0136] Based on the pre-determined predicted viewing time of the user to be recommended at different time periods, identify the predicted viewing time of the user to be recommended in the current time period;
[0137] Based on the playback duration of each video to be recommended, identify videos among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration of the current time period, and recommend them to the users to be recommended.
[0138] The communication bus mentioned above 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.
[0139] The communication interface is used for communication between the aforementioned terminal and other devices.
[0140] The memory may include random access memory (RAM) or non-volatile memory, 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.
[0141] 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.
[0142] 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 any of the video recommendation methods described in the above embodiments.
[0143] 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 in the above embodiments.
[0144] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access 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., solid state disk (SSD)).
[0145] 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.
[0146] 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, the embodiments of apparatus, electronic devices, storage media, and computer program products 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.
[0147] 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, include: Obtain the historical viewing records of the user to be recommended; based on the historical viewing records, identify one or more videos to be recommended to the user and the playback duration of each video; Based on the pre-determined predicted viewing time of the user to be recommended at different time periods, identify the predicted viewing time of the user to be recommended in the current time period; Based on the playback duration of each video to be recommended, identify the video among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration of the current time period, and recommend it to the user to be recommended. The step of identifying the predicted viewing time of the user to be recommended in the current time period based on the predetermined predicted viewing time of the user to be recommended in different time periods includes: Identify the current time period among multiple pre-set time periods; Calculate the difference between the current time and the starting value of the time period in which the current time is located to obtain a first difference; calculate the difference between the starting value and the ending value of the time period in which the current time is located to obtain a second difference; calculate the ratio of the first difference to the sum of the first difference and the second difference to obtain a first ratio, wherein the predicted viewing time of the user to be recommended in different time periods includes the viewing time intervals corresponding to different time periods; Identify the time period in which the current moment is located, and based on the time period in which the current moment is located and the viewing duration intervals corresponding to the different time periods, identify the viewing duration interval corresponding to the current moment; calculate the difference between the start value and the end value of the corresponding viewing duration interval to obtain the third difference; The product of the first ratio and the third difference is calculated and summed with the starting value of the viewing time interval to obtain the predicted viewing time of the user to be recommended in the current time period.
2. The method according to claim 1, characterized in that, Before identifying the predicted viewing time of the user to be recommended in the current time period based on the predetermined predicted viewing time of the user to be recommended in different time periods, the method further includes: Based on the historical viewing records of the users to be recommended, identify the duration of video viewing by the users to be recommended at different times; Based on the duration of video viewing at different times, predict the viewing time of the user to be recommended at different times.
3. The method according to claim 1, characterized in that, After identifying videos among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration for the current time period, and recommending them to the users to be recommended, the method further includes: Obtain the selection information of the user to be recommended for the recommended video; Based on the selection information, identify one or more target videos that match the selection information from one or more videos to be recommended to the user to be recommended, and the playback duration of each target video; identify videos from the one or more target videos whose playback duration is less than the predicted viewing duration of the current time period, and recommend them to the user to be recommended.
4. The method according to claim 1, characterized in that, The step of identifying one or more videos to be recommended to the user and the playback duration of each video based on the historical viewing records includes: Based on the historical viewing records, the identity feature vector of the user to be recommended is calculated using user profiles; Calculate the similarity between the identity feature vector of the user to be recommended and the video feature vector of each video in the preset video set; Based on the calculated similarity, one or more videos to be recommended to the user are determined, and the playback duration of each video to be recommended is obtained.
5. A video recommendation device, characterized in that, include: The playback duration acquisition module is used to acquire the historical viewing records of the user to be recommended; based on the historical viewing records, it identifies one or more videos to be recommended to the user and the playback duration of each video; The viewing duration calculation module is used to identify the predicted viewing duration of the user to be recommended in the current time period based on the pre-determined predicted viewing duration of the user to be recommended in different time periods. The recommended video recognition module is used to identify, based on the playback duration of each video to be recommended, videos among the one or more videos to be recommended whose playback duration is less than the predicted viewing duration of the current time period, and recommend them to the users to be recommended. The viewing duration calculation module includes: The time period recognition submodule is used to identify the current time period among multiple pre-set time periods; The ratio calculation submodule is used to calculate the difference between the current time and the starting value of the time period in which the current time is located, to obtain the first difference; and to calculate the difference between the starting value and the ending value of the time period in which the current time is located, to obtain the second difference. Calculate the first difference and the ratio of the first difference to the sum of the second difference to obtain the first ratio. The predicted viewing time of the user to be recommended in different time periods includes the viewing time intervals corresponding to different time periods. The difference calculation submodule is used to identify the time period in which the current moment is located, and based on the time period in which the current moment is located and the viewing duration intervals corresponding to the different time periods, to identify the viewing duration interval corresponding to the current moment; and to calculate the difference between the start value and the end value of the corresponding viewing duration interval to obtain the third difference. The viewing duration calculation submodule is used to calculate the product of the first ratio and the third difference, and the sum of the product and the starting value of the viewing duration interval to obtain the predicted viewing duration of the user to be recommended in the current time period.
6. The apparatus according to claim 5, characterized in that, The device further includes: The total duration calculation module is used to identify the total duration of video viewing by the user to be recommended each time the application is opened during different time periods, based on the user's historical viewing records. The duration creation module is used to create the predicted viewing duration of the user to be recommended in different time periods based on the total viewing time of the video in different time periods.
7. 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-4.
8. 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-4.
Citation Information
Patent Citations
Video recommendation method and video recommendation system
CN107820108A
Video watching time length prediction method and device, storage medium and terminal
CN113132803A