An episode recommendation method, device, apparatus and storage medium
Patent Information
- Application Number
- CN202410701902.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-05-31
AI Technical Summary
[0003]现有技术中,随着用户量的积累,用户数据不断增多,用户观看完成的内容也会逐渐积累,对剧集进行看完判定时的难度增加,在存储成本增加的同时,也增加了为用户生成推荐剧集的时间
[0017]采用本申请提供的剧集推荐方法,在用户账户登录目标页面时,获取该用户账户对应的布隆过滤器,布隆过滤器中存储了用户的已看完剧集数据,再获取用户已看完剧集数据对应的剧集更新信息,根据该剧集更新信息是否存储至布隆过滤器中,确定待推荐剧集。布隆过滤器在存储已看完剧集数据时对已看完剧集数据进行了压缩,降低了存储空间的需求,并且可以快速检索用户的已看完剧集数据,在降低了存储成本的同时,对用户的已看完剧集数据进行快速检索,有效的提高了剧集推荐的准确度和速度,提升了用户的使用体验和用户个性化推荐效果。
Smart Images

Figure CN118585670B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent analysis technology, and more specifically, to a method, apparatus, device, and storage medium for recommending TV series. Background Technology
[0002] When users watch TV series on video websites, the websites need to record their playback data and recommend content based on this data. Currently, video websites directly store users' playback records and use this information to determine if a user has finished watching a series, recommending unfinished episodes and the latest episodes.
[0003] In existing technologies, as the number of users accumulates and user data continues to increase, the amount of content that users have finished watching also gradually accumulates, increasing the difficulty of determining whether a series has been watched. This not only increases storage costs but also increases the time required to generate recommended series for users. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for recommending TV series, aiming to reduce storage costs while improving the personalized recommendation effect for users.
[0005] The first aspect of this application provides a method for recommending TV series, the method comprising:
[0006] In response to a user account logging into a target page, the user activity level of the user account is determined, whereby the user activity level represents the frequency with which the user account logs into the target page to watch TV series.
[0007] Based on the user activity level, the corresponding Bloom filter for the user account is obtained from the corresponding storage system. The Bloom filter stores the data of the episodes watched by the user account.
[0008] Get episode information for episodes that are currently being updated;
[0009] Based on the episode information of the updated episodes and the data of episodes already watched stored in the Bloom filter, the episodes to be recommended for the user account are determined.
[0010] A second aspect of this application provides a TV series recommendation device, the device comprising:
[0011] The user data acquisition module is used to determine the user activity level of the user account in response to the user account logging into the target page. The user activity level represents the frequency with which the user account logs into the target page to watch TV series.
[0012] The Bloom filter acquisition module is used to acquire the Bloom filter corresponding to the user account in the corresponding storage system based on the user activity level. The Bloom filter stores the data of the episodes watched by the user account.
[0013] Update the episode information acquisition module to obtain episode information for episodes that are being updated;
[0014] The module for generating recommended TV series is used to determine the recommended TV series corresponding to the user account based on the TV series information of the updated TV series and the data of the TV series that have been watched stored in the Bloom filter.
[0015] A third aspect of this application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps described in the first aspect of this application.
[0016] A fourth aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method described in the first aspect of this application.
[0017] The TV series recommendation method provided in this application retrieves the Bloom filter corresponding to the user account when the user logs into the target page. The Bloom filter stores the user's watched TV series data. Then, it retrieves the TV series update information corresponding to the user's watched series data. Based on whether this update information is stored in the Bloom filter, the TV series to be recommended are determined. The Bloom filter compresses the watched series data when storing it, reducing storage space requirements and enabling rapid retrieval of the user's watched series data. While reducing storage costs, it also allows for rapid retrieval of the user's watched series data, effectively improving the accuracy and speed of TV series recommendations, enhancing the user experience, and improving the personalized recommendation effect. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a TV series recommendation method proposed in one embodiment of this application;
[0020] Figure 2 This is a flowchart of a TV series recommendation method proposed in one embodiment of this application;
[0021] Figure 3 This is a flowchart of a TV series recommendation method proposed in one embodiment of this application;
[0022] Figure 4 This is a flowchart of a TV series recommendation method proposed in one embodiment of this application;
[0023] Figure 5 This is a flowchart of a TV series recommendation method proposed in one embodiment of this application;
[0024] Figure 6 This is a flowchart of a TV series recommendation method proposed in one embodiment of this application;
[0025] Figure 7 This is a flowchart of a TV series recommendation method proposed in one embodiment of this application;
[0026] Figure 8 This is a flowchart illustrating the generation process of a Bloom filter according to an embodiment of this application;
[0027] Figure 9 This is a flowchart illustrating the generation process of a Bloom filter according to an embodiment of this application;
[0028] Figure 10 This is a flowchart of a TV series recommendation service proposed in one embodiment of this application;
[0029] Figure 11 This is a schematic diagram of a TV series recommendation device according to an embodiment of this application. Detailed Implementation
[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] refer to Figure 1 , Figure 1 This is a flowchart of a TV series recommendation method proposed in one embodiment of this application. Figure 1 As shown, the method includes the following steps:
[0032] S11: In response to a user account logging into a target page, determine the user activity level of the user account, whereby the user activity level represents the frequency with which the user account logs into the target page to watch TV series.
[0033] In this embodiment, user activity is a metric for evaluating a user's level of activity. The more frequently a user logs into the target page to watch TV series, the higher their account's activity level. The target page is the video page where the user has registered. The user account is the account the user registered with on the server corresponding to that target page.
[0034] In this embodiment, the user opens the target page of the video website using a personal terminal, logs in to the user account on the target page, and after the server corresponding to the target page detects that the user account has logged in to the target page, it obtains the user activity level of the user account from the server based on the logged-in user account.
[0035] For example, the target page can be a page on a video website or a page on a video application, specifically a personalized recommendation scenario page that is designed to display personalized recommended content to users.
[0036] S12: Based on the user activity level, retrieve the Bloom filter corresponding to the user account from the corresponding storage system. The Bloom filter stores the data of episodes watched by the user account.
[0037] In this embodiment, a Bloom filter is a data structure that is actually a very long binary vector used to quickly check whether an element belongs to a certain set. It can quickly determine whether an element is in a large set, and the judgment speed is fast and does not consume too much memory. The "watched episodes" data refers to the information related to the episodes the user has already watched, including the episode name, the number of episodes watched, and the viewing time.
[0038] In this embodiment, each user account corresponds to a Bloom filter. The Bloom filter converts the data of watched episodes corresponding to the user account into corresponding hash values through hash operations, and the hash values corresponding to each watched episode are represented in an array of preset length. After determining the Bloom filter corresponding to the user account, the Bloom filter is called from the corresponding storage system.
[0039] In this embodiment, the Bloom filter corresponding to each user account is pre-stored in the corresponding storage system. The correspondence between each user account and the Bloom filter is stored in the server. The server corresponding to the target page queries the Bloom filter corresponding to the watched episodes data of the user account. Each user account has a corresponding user ID, and the identifier of the Bloom filter corresponding to the user account is the same as the user ID. The server accesses the corresponding storage system in the server and searches for the Bloom filter identified by the user ID in the storage system. The Bloom filter stores the watched episodes data corresponding to the user account. The Bloom filter converts the watched episodes data corresponding to the user account into corresponding hash values through hash operation. The hash values corresponding to each watched episode are represented in an array of a preset length.
[0040] For example, a user's account ID is 001, and the correspondence stored in the server is that user 001 corresponds to Bloom filter 001.
[0041] In this embodiment, reference Figure 2 , Figure 2 This is a flowchart of a TV series recommendation method proposed in one embodiment of this application, such as... Figure 2 As shown, step S12 specifically includes:
[0042] S12-1: When the user activity level is not less than a preset user activity level threshold, the Bloom filter is obtained from the first storage system. The first storage system is used to store the Bloom filter generated by hot data. The hot data is the data of watched episodes corresponding to the user account whose user activity level is not less than the preset user activity level threshold.
[0043] In this embodiment, the first storage system is a storage system with a fast cache read speed, but its storage cost is also relatively high. The first storage system is used to store hot data, which is data whose access frequency is higher than a preset data access frequency threshold. The user activity threshold is used to characterize the frequency with which a user account logs into the target page to watch TV series. When the user activity level corresponding to a user account is not less than the preset user activity threshold, the data of the TV series watched by that user account is considered hot data; when the user activity level corresponding to a user account is less than the preset user activity threshold, the data of the TV series watched by that user account is considered cold data.
[0044] In this embodiment, when the user activity level corresponding to a user account is not less than a preset user activity threshold, the data of episodes watched by the user account is considered hot data. The Bloom filter generated based on the watched data of the user account is stored in the first storage system. At this time, the first storage system is accessed to retrieve the Bloom filter corresponding to the user account from the first storage system.
[0045] S12-2: When the user activity level is less than the preset user activity level threshold, the Bloom filter is obtained from the second storage system. The second storage system is used to store the Bloom filter generated from cold data. The cold data is the data of watched episodes corresponding to the user account whose user activity level is less than the preset user activity level threshold.
[0046] In this embodiment, the second storage system is a storage system with lower storage costs. Its cache read speed is slightly lower than that of the first storage system, but its storage capacity is larger.
[0047] In this embodiment, when the user activity level of a user account is less than a preset user activity threshold, the data of the series that have been watched by the user account is considered cold data. The Bloom filter generated based on the data of the series that have been watched is stored in the second system. At this time, the second storage system is accessed to retrieve the Bloom filter corresponding to the user account from the second storage system.
[0048] In this embodiment, the read response speed of the first storage system is higher than that of the second storage system, but the storage cost is higher. Therefore, the Bloom filter of the user accounts with high activity is stored in the first storage system, which ensures that when an active user visits the target page to watch a TV series, the TV series to be watched can be quickly recommended to the user. This ensures the user experience of active users while saving storage costs.
[0049] S13: Get episode information for episodes that are currently being updated.
[0050] In this embodiment, the TV series being updated refers to the TV series that are in an updated state on the server corresponding to the target webpage. The TV series information includes the name of the TV series, the total number of episodes of the TV series, the latest updated episode, the update time, and other information. The TV series information of each TV series is stored in the server.
[0051] In this embodiment, while obtaining the Bloom filter corresponding to the user account, the server corresponding to the target webpage obtains the episode information of the episodes being updated from the server.
[0052] For example, on a video website, there are 20 different TV series that are currently being updated. The backend server of the target webpage obtains the names of these 20 TV series, the total number of episodes, and the latest updated episode from the server.
[0053] S14: Based on the episode information of the updated episodes and the data of the episodes that have been watched stored in the Bloom filter, determine the episodes to be recommended for the user account.
[0054] In this embodiment, the TV series to be recommended are those that the backend server of the target webpage needs to recommend to the user.
[0055] In this embodiment, the backend server of the target webpage determines the latest episode number of the updated series based on the series information of the updated series. In the obtained Bloom filter, it checks whether the data of watched series includes the updated series. If the data of watched series does not include the updated series, the updated series is selected as the series to be recommended for the user account.
[0056] refer to Figure 3 , Figure 3 This is a flowchart of a TV series recommendation method proposed in an embodiment of this application, such as... Figure 3 As shown, step S14 specifically includes the following steps:
[0057] S14-1: Determine the newly added episodes within a preset time period based on the episode information of the updated episodes.
[0058] In this embodiment, the TV series being updated will generally add some episodes every once in a while. After obtaining the TV series information of the TV series being updated, the TV series added within the preset time period are determined.
[0059] For example, the preset time period can be set according to the update frequency of the series, such as the previous 24 hours before the current time.
[0060] For example, if a series currently has 28 episodes and the 28th episode is added within 24 hours, then the updated series corresponding to this series is the 28th episode of that series.
[0061] S14-2: Determine whether the watched episode data stored in the Bloom filter includes the newly added episodes.
[0062] In this embodiment, the Bloom filter stores the data of episodes watched by the user account. When the backend server of the target page determines the episodes added during the preset time period, it searches for the newly added episodes in the Bloom filter.
[0063] In this embodiment, when searching for newly added episodes, the mapping function used when creating the Bloom filter is used to perform a hash mapping on the newly added episodes, mapping the episode name and episode number of the newly added episodes to the corresponding hash values. Based on these values, the value of the bit corresponding to the hash value is checked in the binary vector of the Bloom filter to see if it is 1. When the value of the corresponding bit is 1, it means that the updated episode is stored in the Bloom filter. When the value of the corresponding bit is 0, it means that the updated episode is not stored in the Bloom filter.
[0064] refer to Figure 4 , Figure 4This is a flowchart of a TV series recommendation method proposed in an embodiment of this application, such as... Figure 4 As shown, the specific steps of step S14-2 include:
[0065] S14-2-1: Map the episode name and episode number of the newly added series to the corresponding hash value according to the mapping function used when creating the Bloom filter.
[0066] In this embodiment, the name and episode number of the newly added series are entered into the mapping function used when creating the Bloom filter, and a hash operation is performed through the mapping function to obtain the corresponding hash value.
[0067] S14-2-2: Check whether the bit value corresponding to the hash value is 1 in the Bloom filter.
[0068] In this embodiment, after obtaining the hash value corresponding to the newly added episode, the value of the bit corresponding to the hash value is checked in the Bloom filter to see if it is 1.
[0069] S14-2-3: If the value of the bit corresponding to the hash value is 1, it is determined that the data of watched episodes includes the newly added episodes.
[0070] S14-2-4: If the value of the bit corresponding to the hash value is 0, it is determined that the data of watched episodes does not include the newly added episodes.
[0071] In this embodiment, if the value of the bit corresponding to the hash value is 1, it is determined that the data of watched episodes includes the newly added episode; if the value of the bit corresponding to the hash value is 0, it is determined that the data of watched episodes does not include the newly added episode.
[0072] For example, if the latest episode of a TV series is episode 28, the Bloom filter maps episode 28 (i.e., "XX (TV series name) 28") to the Bloom filter using the mapping function. The mapped value is 8. The filter then checks if the 8th bit of the data stored in the Bloom filter is 1. If the 8th bit is 1, it means that episode 28 of the TV series has been stored in the Bloom filter, indicating that the latest episode of the TV series has been watched by the user. If the 8th bit is 0, it means that episode 28 of the TV series has not been stored in the Bloom filter, indicating that the latest episode of the TV series has not been watched by the user.
[0073] S14-3: If the newly added series is not included in the watched series data stored in the Bloom filter, the newly added series is identified as the series to be recommended.
[0074] In this embodiment, if the data of watched episodes stored in the Bloom filter does not include newly added episodes, the newly added episodes of that episode are identified as episodes to be recommended.
[0075] For example, if the latest episode of a TV series is episode 28, and a query reveals that episode 28 of the series is not stored in the Bloom filter corresponding to the user's account, it is determined that the user has not finished watching the series, and the newly added episodes of the series will then be recommended to the user.
[0076] In this embodiment, after the backend server of the target page detects that a user account has logged into the target page, it obtains the Bloom filter corresponding to the user account, and then obtains the episode information of the episodes being updated. By checking whether the updated episodes of the episodes being updated are stored in the Bloom filter, the episodes to be recommended are determined. The user's watched data is stored in the Bloom filter, which effectively compresses the massive amount of user data, reduces storage costs, and determines the episodes to be recommended for the user account by querying whether updated episodes exist in the Bloom filter. The query speed is fast, which improves the speed of generating episodes to be recommended and effectively enhances the user experience.
[0077] refer to Figure 5 , Figure 5 This is a flowchart of a TV series recommendation method proposed in an embodiment of this application, such as... Figure 5 As shown, after step S14, the following steps are also included:
[0078] S21: Display the recommended TV series in the TV series recommendation section of the target page.
[0079] In this embodiment, the TV series recommendation section is a module on the target page, which is dedicated to recommending the latest updated TV series to users.
[0080] In this embodiment, after determining the recommended TV series corresponding to the user account, the recommended TV series is displayed in the TV series recommendation section of the target page.
[0081] For example, the recommended episode section can display images of the episodes to be recommended, indicating which episode is being recommended. Alternatively, the recommended episode section can display clips of the episodes to be recommended.
[0082] In this embodiment, the recommended TV series are displayed in the TV series recommendation section of the target page, effectively recommending updated TV series to users and further improving the user experience.
[0083] refer to Figure 6 , Figure 6 This is a flowchart of a TV series recommendation method proposed in an embodiment of this application, such as... Figure 6 As shown, the procedure before step S11 also includes:
[0084] S31: Based on the user activity level of each user account, the data of watched episodes is divided into cold data and hot data.
[0085] In this embodiment, user activity is an evaluation standard for a user's level of activity. The more frequently a user logs into the target page to watch TV series, the higher their account's user activity level. Cold data is data that is not frequently used, while hot data is data that is frequently used.
[0086] In this embodiment, the backend server corresponding to the target webpage will count the user activity of each user account. The basis for determining user activity is the time when the user recently watched the series. The closer the viewing time is to the current time, the higher the user activity. The further the viewing time is from the current time, the lower the user activity.
[0087] In this embodiment, after obtaining the data of the series watched by each user account, the data of the series watched by all user accounts is divided into cold data and hot data according to the user activity of each user account.
[0088] refer to Figure 7 , Figure 7 This is a flowchart of a TV series recommendation method proposed in an embodiment of this application, such as... Figure 7 As shown, step S31 specifically includes:
[0089] S31-1: If the user activity level of the user account is not less than the preset user activity threshold, the data of the series that have been watched corresponding to the user account shall be determined as the hot data.
[0090] In this embodiment, user activity represents the frequency with which a user logs into the target webpage to watch TV series.
[0091] In this embodiment, if the user activity level of a user account is not less than a preset user activity threshold, the data of episodes watched by the user account is determined as hot data.
[0092] S31-2: If the user activity level of a user account is less than the preset user activity threshold, the data of the episodes watched by the user account shall be identified as cold data.
[0093] In this embodiment, if the user activity level of a user account is less than a preset user activity threshold, the data of episodes watched by the user account is identified as cold data.
[0094] For example, if a user logs into the target webpage and watches a series within the past day, the user's activity level is 100. If the user does not log into the target webpage within the past day, the activity level is reduced by 1. The user activity level threshold is set to 70. When the user activity level is not less than 70, the data of the series watched by the user account is identified as hot data. When the user activity level is less than 70, the data of the series watched by the user account is identified as cold data.
[0095] In this embodiment, if a user's playback history data does not contain any content that has been watched, then the user's playback history data is stored as cold data.
[0096] S32: Store the Bloom filter generated based on the thermal data in the first storage system.
[0097] In this embodiment, after generating a corresponding Bloom filter for each user account, the Bloom filter generated based on the hot data is stored in the first storage system. The Bloom filter stored in the first storage system has a fast access speed and is suitable for providing recommendation services to users with high user activity.
[0098] For example, the first storage system is CouchBase, which is a distributed data storage system with high read and write speeds.
[0099] S33: Store the Bloom filter generated based on the cold data in the second storage system.
[0100] In this embodiment, the Bloom filters corresponding to the cold data are stored in the second storage system. Using the second storage system to store the Bloom filters generated from the cold data results in lower storage costs. Because users with low activity levels do not frequently watch TV series, storing their corresponding Bloom filters in the second storage system effectively reduces storage costs.
[0101] For example, the second storage system is HBase, which is a distributed data storage system with low storage costs.
[0102] In this embodiment, the Bloom filter corresponding to hot data is stored in a first storage system with a high read / write speed, which can quickly recommend TV series to user accounts with high user activity. The Bloom filter corresponding to cold data is stored in a second storage system with lower storage cost, which can ensure that TV series are recommended to user accounts with low user activity while reducing storage cost and saving storage space.
[0103] refer to Figure 8 , Figure 8 This is a flowchart illustrating the generation process of a Bloom filter according to an embodiment of this application, as follows: Figure 8As shown, the steps for generating the Bloom filter include:
[0104] S41: Obtain playback record data corresponding to all user accounts stored in the server.
[0105] In this embodiment, the playback record data is the playback data recorded by the server when the user is watching videos, including the names of the videos the user has watched, the viewing progress of each video, the viewing time, and other data.
[0106] In this embodiment, before generating the Bloom filter, the playback record data corresponding to all the user accounts stored in the server is first obtained. The server stores the playback record data corresponding to each user account, and the playback record data corresponding to each user can be obtained based on the user account.
[0107] In this embodiment, playback record data is divided into existing data and incremental data. Existing data is the cumulative playback record data of users before day t-1, and incremental data is the cumulative playback record data of users from day t-1 to the current time. For example, if t is set to the day when the playback record data is obtained, then before day t-1 is before yesterday, and from day t-1 to the current time is the time from yesterday to today when the playback record data is obtained. Because the playback record data in the server is stored in the corresponding storage space at fixed times, the data before day t-1 will be placed in the long-term storage device, and the data from day t-1 to the current time will be placed in the temporary storage. After the preset update time, it will be changed to existing data.
[0108] S42: Based on the playback record data, determine the number of episodes watched for each user account.
[0109] In this embodiment, after obtaining the playback record data corresponding to the user account, the playback record data is judged according to the preset judgment rules to determine the number of episodes watched for each user account.
[0110] refer to Figure 9 , Figure 9 This is a flowchart illustrating the generation process of a Bloom filter according to an embodiment of this application, as follows: Figure 9 As shown, step S42 specifically includes:
[0111] S42-1: For each user account, based on the playback record data, determine the historical drama series watched by the user account.
[0112] In this embodiment, the history of watched episodes refers to the episodes that the user has watched.
[0113] In this embodiment, after obtaining the playback history data of a user account, the historical drama series corresponding to that user account are determined from the playback history data. The playback history data contains a large amount of video data; videos belonging to drama series are filtered out from these videos, and the playback history of individual videos is filtered out to obtain the historical drama series corresponding to that user account.
[0114] For example, the playback history data includes playback history of TV series, playback history of news videos, playback history of short videos, etc., from which the playback history of TV series is filtered out to determine the historical TV series watched by the user account.
[0115] S42-2: For each historically watched TV series, if the latest episode in the historically watched TV series has reached the end of the video, and the percentage of all episodes in the historically watched TV series that have reached the end of the video exceeds a preset percentage threshold, the historically watched TV series is determined as the series that the user account has finished watching, and the series that has been finished watching data is obtained.
[0116] In this embodiment, the video end point is the point in time when a video ends. For videos without an ending theme song, the video end point can be the last second of the video; for series with an ending theme song, the video end point can be the first second of the ending theme song. The percentage threshold is the proportion of series that have finished playing out of the total number of series.
[0117] In this embodiment, for each historically watched TV series, if the latest episode of the series has reached the end of the credits and the percentage of all episodes in the historically watched series that have reached the end of the credits exceeds a preset percentage threshold, the historically watched TV series is determined as the series that the user account has finished watching, and thus the data of series that have been finished watching is obtained.
[0118] For example, when the percentage threshold is set to 50%, a series is considered to have been watched when more than 50% of the episodes in a series have been played.
[0119] In this embodiment, the user's playback record data is statistically analyzed every day to obtain the data of the episodes the user has watched. After the incremental data for each day is calculated, the incremental data for that day is added to the existing data for use in the calculation for the next day.
[0120] In this embodiment, each episode in the playback record data is judged by a preset judgment rule to determine the episode data that the user account has finished watching. The judgment is efficient and ensures that the subsequent episode recommendations for the user are accurate.
[0121] S43: Create a binary vector with a preset number of bits in advance, wherein the initial value of each bit of the binary vector is 0.
[0122] In this embodiment, when creating a Bloom filter, it is first necessary to create a binary vector with a preset number of bits, the initial value of each bit of the binary vector being 0.
[0123] S44: For each user account, the data of episodes watched by the user account is converted into a corresponding hash value through a mapping function.
[0124] In this embodiment, for each user account, the data of the episodes watched by that user account is converted into a corresponding hash value through a mapping function.
[0125] S45: Based on the hash value, modify the value at the corresponding position in the binary vector to 1 to obtain the Bloom filter corresponding to the user account.
[0126] In this embodiment, after obtaining the corresponding hash value, the value at the corresponding position in the binary vector is modified to 1 to obtain the Bloom filter corresponding to the user account.
[0127] For example, a binary vector of length 10 is preset. After a user watches episode 25 of TV series A, the mapping function maps "A, 25" to a hash value, resulting in a hash value of "2, 8". At this point, the second and eighth bits of the binary vector are set to 1, and the binary vector in the Bloom filter is "0100000100".
[0128] In this embodiment, when generating a Bloom filter based on the data of watched episodes corresponding to a user account, the Bloom filter can be generated using an existing generation script. It is only necessary to set the expected error rate (fpp) and expected insertions (expected number of elements) of the Bloom filter according to the actual data situation. These two parameters determine the data space occupied by the Bloom filter; the lower the fpp, the larger the data space occupied by the Bloom filter; the higher the expected insertions, the larger the data space occupied by the Bloom filter.
[0129] For example, if the number of episodes a user has watched, X < 300, set expectedInsertions = X + 20; if the number of episodes a user has watched, X > 300, set expectedInsertions = X. fpp can be set to 1E-6, which is 0.000001.
[0130] refer to Figure 10 , Figure 10 This is a flowchart of a TV series recommendation service proposed in one embodiment of this application, such as... Figure 10As shown, this embodiment first collects playback history data of user accounts, including existing data and incremental data. After collecting the user playback history data, it determines whether the playback history data has been watched, thus obtaining the data of watched episodes. After the determination is completed, the existing data is updated, and the data of watched episodes is separated into hot and cold data according to the user activity corresponding to the user account. The Bloom filter generated based on the hot data is stored in the first storage system, and the Bloom filter generated based on the cold data is stored in the second storage system. When providing episode recommendation services, the Bloom filter corresponding to the user account is called to obtain the episode information of the episodes being updated, generate episodes to be recommended, and provide recommendation services to users.
[0131] In this embodiment, the playback history data of each user account was analyzed to determine the watched data for each user account, effectively identifying the series watched by each user account. Then, based on user activity, the watched data was divided into cold data and hot data. The user's watched data was compressed and stored using a Bloom filter, reducing the required storage space and storage costs. Furthermore, the faster query speed of the Bloom filter improves the speed of generating recommended series for users. A separate storage strategy was adopted for cold and hot data: the Bloom filters for cold data were stored in a lower-cost storage system, while the Bloom filters for hot data were stored in a higher-cost storage system, further saving storage space and reducing storage costs. While saving storage space and reducing storage costs, the system also quickly generates recommended series for users, improving the user experience.
[0132] Based on the same inventive concept, one embodiment of this application provides a TV series recommendation device. (Reference) Figure 11 , Figure 11 This is a schematic diagram of a TV series recommendation device 1100 according to an embodiment of this application. Figure 11 As shown, the device includes:
[0133] User data acquisition module 1101 is used to determine the user activity level of the user account in response to the user account logging into the target page, wherein the user activity level represents the frequency with which the user account logs into the target page to watch TV series;
[0134] The Bloom filter acquisition module 1102 is used to acquire the Bloom filter corresponding to the user account in the corresponding storage system based on the user activity level. The Bloom filter stores the data of the episodes watched by the user account.
[0135] The TV series information acquisition module 1103 is used to acquire TV series information of TV series that are being updated;
[0136] The TV series generation module 1104 is used to determine the TV series to be recommended for the user account based on the TV series information of the updated TV series and the data of the TV series that have been watched stored in the Bloom filter.
[0137] Optionally, the Bloom filter acquisition module includes:
[0138] The first acquisition submodule is used to acquire the Bloom filter from the first storage system when the user activity level is not less than a preset user activity level threshold. The first storage system is used to store the Bloom filter generated by hot data. The hot data is the data of watched episodes corresponding to the user account whose user activity level is not less than the preset user activity level threshold.
[0139] The second acquisition submodule is used to acquire the Bloom filter from the second storage system when the user activity level is less than the preset user activity level threshold. The second storage system is used to store the Bloom filter generated from cold data, where the cold data is the data of watched episodes corresponding to the user account whose user activity level is less than the preset user activity level threshold.
[0140] Optionally, the read response speed of the first storage system is higher than that of the second storage system.
[0141] Optionally, the device further includes:
[0142] The data classification module is used to divide the watched episodes corresponding to each user account into cold data and hot data based on the user activity level of each user account.
[0143] A first storage module is used to store the Bloom filter generated based on the thermal data into a first storage system;
[0144] The second storage module is used to store the Bloom filter generated based on the cold data into the second storage system.
[0145] Optionally, the apparatus further includes a Bloom filter generation module, the Bloom filter generation module comprising:
[0146] The data acquisition submodule is used to acquire playback record data corresponding to all the user accounts stored in the server;
[0147] The "Watched Episodes Data Determination" submodule is used to determine the watched episodes data corresponding to each user account based on the playback record data.
[0148] The vector creation submodule is used to pre-create a binary vector of a preset number of bits, wherein the initial value of each bit of the binary vector is 0;
[0149] The numerical mapping submodule is used to convert the data of watched episodes corresponding to each user account into a corresponding hash value through a mapping function.
[0150] The Bloom filter generation submodule is used to modify the value at the corresponding position in the binary vector to 1 based on the hash value, so as to obtain the Bloom filter corresponding to the user account.
[0151] Optionally, the submodule for determining the number of episodes watched includes:
[0152] The historical viewing episode acquisition submodule is used to determine the historical viewing episodes corresponding to each user account based on the playback record data.
[0153] The "Watched Series Determination" submodule is used to determine the watched series corresponding to the user account as watched series for each historically watched series if the latest episode of the historically watched series has been played to the end of the video, and the percentage of episodes that have been played to the end of the video in all historically watched series exceeds a preset percentage threshold.
[0154] Optionally, the data classification module includes:
[0155] The hot data determination submodule is used to determine the watched episode data corresponding to the user account as the hot data when the user activity level of the user account is not less than a preset user activity threshold.
[0156] The cold data determination submodule is used to determine the watched episode data corresponding to the user account as cold data when the user activity level of the user account is less than the preset user activity threshold.
[0157] Optionally, the module for generating recommended TV series includes:
[0158] The newly added series determination submodule is used to determine the series added within a preset time period based on the series information of the updated series.
[0159] A new episode determination submodule is added to determine whether the watched episode data stored in the Bloom filter includes the newly added episodes.
[0160] The submodule for generating recommended TV series is used to identify the newly added TV series as the TV series to be recommended when the data of watched TV series stored in the Bloom filter does not include the newly added TV series.
[0161] Optionally, the series determination submodule includes:
[0162] A new episode mapping submodule is added, which is used to map the episode name and episode number of the newly added episode to the corresponding hash value according to the mapping function used when creating the Bloom filter;
[0163] The numerical judgment submodule is used to check whether the value of the bit corresponding to the hash value is 1 in the Bloom filter;
[0164] The first numerical determination submodule is used to determine, when the value of the bit corresponding to the hash value is 1, that the data of watched episodes includes the newly added episodes;
[0165] The second numerical determination submodule is used to determine that the data of watched episodes does not include the newly added episodes when the value of the bit corresponding to the hash value is 0.
[0166] Optionally, the device further includes:
[0167] The TV series display module is used to display the TV series to be recommended in the TV series recommendation section of the target page.
[0168] Based on the same inventive concept, another embodiment of this application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the TV series recommendation method as described in any of the above embodiments of this application.
[0169] Based on the same inventive concept, another embodiment of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the TV series recommendation method described in any of the above embodiments of this application.
[0170] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0171] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0172] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0173] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0174] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0175] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0176] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0177] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0178] The above provides a detailed description of the TV series recommendation method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for recommending TV series, characterized in that, The method includes: In response to a user account logging into a target page, the user activity level of the user account is determined, whereby the user activity level represents the frequency with which the user account logs into the target page to watch TV series. Based on the user activity level, the corresponding Bloom filter for the user account is obtained from the corresponding storage system. The Bloom filter stores the data of the episodes watched by the user account. Get episode information for episodes that are currently being updated; Based on the episode information of the updated episodes and the data of the episodes that have been watched stored in the Bloom filter, determine the episodes to be recommended for the user account; Based on the user activity level, retrieve the Bloom filter corresponding to the user account from the corresponding storage system, including: When the user activity level is not less than a preset user activity level threshold, the Bloom filter is obtained from the first storage system. The first storage system is used to store the Bloom filter generated by hot data. The hot data is the data of the episodes watched by the user account whose user activity level is not less than the preset user activity level threshold. When the user activity level is less than the preset user activity level threshold, the Bloom filter is retrieved from the second storage system. The second storage system is used to store the Bloom filter generated from cold data. The cold data is the data of watched episodes corresponding to the user account whose user activity level is less than the preset user activity level threshold. The read response speed of the first storage system is higher than that of the second storage system.
2. The method according to claim 1, characterized in that, Before determining the user activity level of the user account in response to the user account login target page, the method further includes: Based on the user activity level of each user account, the series watched by each user account are divided into cold data and hot data. The Bloom filter generated based on the thermal data is stored in the first storage system; The Bloom filter generated based on the cold data is stored in the second storage system.
3. The method according to claim 2, characterized in that, The steps for generating the Bloom filter include: Retrieve playback record data for all user accounts stored on the server; Based on the playback history data, determine the number of episodes watched for each user account; A binary vector of a predetermined number of bits is created in advance, with each bit of the binary vector having an initial value of 0; For each user account, the data of watched episodes corresponding to the user account is converted into a corresponding hash value using a mapping function; Based on the hash value, the value at the corresponding position in the binary vector is modified to 1 to obtain the Bloom filter corresponding to the user account.
4. The method according to claim 3, characterized in that, The step of determining the number of episodes watched for each user account based on the playback history data includes: For each user account, the playback history data is used to determine the historical episodes watched by that user account. For each historically watched TV series, if the latest episode of the historically watched TV series has reached the end of the video, and the percentage of all episodes in the historically watched TV series that have reached the end of the video exceeds a preset percentage threshold, the historically watched TV series is determined as the series that the user account has finished watching, and the series that has been finished watching data is obtained.
5. The method according to claim 2, characterized in that, The method of dividing the watched episodes data into cold data and hot data based on the user activity level of each user account includes: If the user activity level of the user account is not less than a preset user activity threshold, the data of the episodes watched by the user account will be identified as the hot data. If the user activity level of a user account is less than the preset user activity threshold, the data of the episodes watched by the user account will be identified as cold data.
6. The method according to claim 1, characterized in that, The step of determining the recommended series for the user account based on the series information in the updated series and the watched series data stored in the Bloom filter includes: Based on the episode information of the episodes in the update, determine the episodes added within a preset time period in the update; Determine whether the watched episode data stored in the Bloom filter includes the newly added episodes; If the newly added series is not included in the watched series data stored in the Bloom filter, the newly added series will be identified as the series to be recommended.
7. The method according to claim 6, characterized in that, Determining whether the watched episode data stored in the Bloom filter includes the newly added episodes includes: Based on the mapping function used when creating the Bloom filter, the episode name and episode number of the newly added series are mapped to the corresponding hash value; Check whether the bit value corresponding to the hash value is 1 in the Bloom filter; If the value of the bit corresponding to the hash value is 1, it is determined that the data of watched episodes includes the newly added episodes; If the value of the bit corresponding to the hash value is 0, it is determined that the data of watched episodes does not include the newly added episodes.
8. The method according to claim 1, characterized in that, The method further includes: The recommended TV series will be displayed in the TV series recommendation section of the target page.
9. A TV series recommendation device, characterized in that, The device includes: The user data acquisition module is used to determine the user activity level of the user account in response to the user account login target page. The Bloom filter acquisition module is used to acquire the Bloom filter corresponding to the user account in the corresponding storage system based on the user activity level. The Bloom filter stores the data of the episodes watched by the user account. Update the episode information acquisition module to obtain episode information for episodes that are being updated; The module for generating recommended TV series is used to determine the recommended TV series corresponding to the user account based on the TV series information of the updated TV series and the data of the TV series that have been watched stored in the Bloom filter. The Bloom filter acquisition module includes: The first acquisition submodule is used to acquire the Bloom filter from the first storage system when the user activity level is not less than a preset user activity level threshold. The first storage system is used to store the Bloom filter generated by hot data. The hot data is the data of watched episodes corresponding to the user account whose user activity level is not less than the preset user activity level threshold. The second acquisition submodule is used to acquire the Bloom filter from the second storage system when the user activity level is less than the preset user activity level threshold. The second storage system is used to store the Bloom filter generated from cold data, where the cold data is the data of watched episodes corresponding to the user account whose user activity level is less than the preset user activity level threshold. The read response speed of the first storage system is higher than that of the second storage system.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 8.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Episode updating prompting method, terminal and computer readable storage medium
CN107509088A
Video recommendation filtering method and device, server and storage medium
CN111711860A
Data processing method and device
CN114385596A
Big data-based network literature movie recommendation management system
CN117708436A