Resource distribution method and device, storage medium and electronic equipment
By calculating the degree of user preference for media resources and media tags and adjusting the cache strategy based on these preferences, offline caching in the prior art cannot meet users' personalized needs, achieving more efficient resource distribution and better user experience.
Patent Information
- Application Number
- CN202411838026.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-25
AI Technical Summary
In the existing video playback system, offline caching mechanism cannot effectively predict and meet users' personalized content needs, resulting in low utilization of cached media resources and poor user experience.
By obtaining the historical viewing and viewing of the media resource, as well as the historical viewing and viewing of the associated media tag, the user likes the media resources and media tags, and adjust the media resources' preferences based on the media tag's preferences, determine the media resources whose target likes meet the preset conditions, and cache them offline.
It improves the accuracy of resource distribution during offline caching, so that the cached media resources are more in line with the actual needs of users and improves the user experience.
Smart Images

Figure CN119697410A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a resource distribution method and device, a storage medium, and an electronic device. Background Art
[0002] In existing video playback systems, offline caching mechanisms often cannot effectively predict and meet users' personalized content needs, and lack intelligence and dynamism in content selection and cache management, resulting in low utilization of cached media resources and poor user experience.
[0003] Therefore, there is a technical problem in the related art that the accuracy of media resource distribution during offline caching is low. Summary of the invention
[0004] The embodiments of the present application provide a resource distribution method and device, a storage medium, and an electronic device to at least solve the technical problem of poor user interaction experience on a video platform in the related art.
[0005] According to one aspect of an embodiment of the present application, a resource distribution method is provided, including: obtaining at least one media resource, wherein the at least one media resource is used to be distributed to a target account for offline caching; obtaining a first historical viewing number and a first historical browsing number of the at least one media resource in a historical time period, and obtaining a second historical viewing number and a second historical browsing number of a media tag associated with the at least one media resource in a historical time period, wherein the media tag is used to indicate a media type of the at least one media resource; determining a first degree of liking of the at least one media resource by the target account based on the first historical viewing number and the first historical browsing number, and determining a second degree of liking of the media tag by the target account based on the second historical viewing number and the second historical browsing number; adjusting the first degree of liking according to the second degree of liking to obtain a target degree of liking of the at least one media resource by the target account; determining a target media resource whose target degree of liking meets a preset condition from the at least one media resource, and distributing the target media resource to the target account for offline caching.
[0006] According to another aspect of an embodiment of the present application, a resource distribution device is also provided, including: a first acquisition unit, used to acquire at least one media resource, wherein the at least one media resource is used to be distributed to a target account for offline caching; a second acquisition unit, used to acquire a first historical viewing number and a first historical browsing number of at least one media resource in a historical time period, and to acquire a second historical viewing number and a second historical browsing number of a media tag associated with at least one media resource in a historical time period, wherein the media tag is used to indicate a media type of at least one media resource; a determination unit, used to determine a first degree of liking of the target account for at least one media resource based on the first historical viewing number and the first historical browsing number, and to determine a second degree of liking of the target account for the media tag based on the second historical viewing number and the second historical browsing number; an adjustment unit, used to adjust the first degree of liking according to the second degree of liking, to obtain a target degree of liking of the target account for at least one media resource; a distribution unit, used to determine a target media resource whose target degree of liking meets a preset condition from at least one media resource, and distribute the target media resource to the target account for offline caching.
[0007] According to another aspect of the embodiment of the present application, a computer program product is provided, the computer program product includes a computer program / instruction, the computer instruction is stored in a computer-readable storage medium. A processor of a computer device reads the computer program / instruction from the computer-readable storage medium, and the processor executes the computer program / instruction, so that the computer device executes the resource distribution method as described above.
[0008] According to another aspect of an embodiment of the present application, there is also provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the resource distribution method through the computer program.
[0009] In this embodiment, the first degree of liking of the target account for at least one media resource is determined based on the first historical viewing number and the first historical browsing number of at least one media resource in the historical time period, and the second degree of liking of the target account for the media tag is determined based on the second historical viewing number and the second historical browsing number of the media tag associated with at least one media resource in the historical time period. The first degree of liking is adjusted according to the second degree of liking (i.e., the user's preference for the media type) to obtain the final target degree of liking. This adjustment process takes into account the correlation between user preferences and media content types, making offline caching decisions more personalized and better meeting the actual needs of users. Then, the target media resource whose target degree of liking meets the preset conditions is determined from at least one media resource, and the target media resource is distributed to the target account for offline caching, so as to achieve the purpose of automatically adjusting the caching strategy according to the user's behavior patterns and preferences, and realize the technical effect of improving the accuracy of resource distribution during offline caching. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0011] Figure 1 is a flowchart of an optional resource distribution method according to an embodiment of the present application;
[0012] Figure 2 is a schematic diagram of an optional resource distribution method according to an embodiment of the present application;
[0013] Figure 3 is a schematic diagram of an optional resource distribution device according to an embodiment of the present application;
[0014] Figure 4 A schematic structural diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0015] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0016] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0017] Optionally, as an optional implementation, as Figure 1 As shown, the resource distribution method includes the following specific steps:
[0018] S102, obtaining at least one media resource, wherein the at least one media resource is used for distribution to a target account for offline caching;
[0019] S104, obtaining a first historical viewing number and a first historical browsing number of at least one media resource in a historical time period, and obtaining a second historical viewing number and a second historical browsing number of a media tag associated with at least one media resource in a historical time period, wherein the media tag is used to indicate a media type of the at least one media resource;
[0020] S106, determining a first degree of liking of the target account for at least one media resource based on the first historical viewing number and the first historical browsing number, and determining a second degree of liking of the target account for the media tag based on the second historical viewing number and the second historical browsing number;
[0021] S108, adjusting the first liking degree according to the second liking degree to obtain a target liking degree of the target account for at least one media resource;
[0022] S110, determining a target media resource whose target like degree meets a preset condition from at least one media resource, and distributing the target media resource to a target account for offline caching.
[0023] Optionally, in this embodiment, the resource distribution method can be applied to, but is not limited to, the scenario of offline playback of cached media content. In this scenario, with the development of mobile Internet, users can access multimedia resources on the Internet through a variety of terminals, but due to the limitation of terminal data traffic, they need a broadband network connection when accessing Internet resources. When there is no Internet access, multimedia resources cannot be obtained and played.
[0024] To this end, an offline caching mechanism has been introduced in related technologies. However, this mechanism cannot effectively predict and meet users' personalized content needs, and lacks intelligence and dynamism in content selection and cache management, resulting in low utilization of cached media resources and poor user experience.
[0025] In order to solve the above-mentioned defects, the resource distribution method provided by this embodiment is used to determine the first degree of liking of the target account for at least one media resource based on the first historical viewing number and the first historical browsing number of at least one media resource in the historical time period, and determine the second degree of liking of the target account for the media tag based on the second historical viewing number and the second historical browsing number of the media tag associated with at least one media resource in the historical time period. The first degree of liking is adjusted according to the second degree of liking (i.e., the user's preference for the media type) to obtain the final target degree of liking. This adjustment process takes into account the correlation between user preferences and media content types, making offline caching decisions more personalized and better meeting the actual needs of users. Then, the target media resource whose target degree of liking meets the preset conditions is determined from at least one media resource, and the target media resource is distributed to the target account for offline caching, so as to achieve the purpose of automatically adjusting the caching strategy according to the user's behavior pattern and preference, and realize the technical effect of improving the accuracy of resource distribution during offline caching.
[0026] Optionally, the media resource is a multimedia file such as video, audio, graphics, etc. displayed on a variety of terminal devices. In this embodiment, the media resource can be, but is not limited to, video content, such as movies, TV series, variety shows, documentaries, cartoons, etc.
[0027] Optionally, in this embodiment, the media tag may be, but is not limited to, an identifier used to describe the characteristics of a media resource, and is used to indicate the type, style, theme, etc. of the media resource. For example, a media resource may be labeled as "science fiction", "action", "high definition", etc., which helps to understand and classify the media resource, thereby achieving more accurate recommendation and management.
[0028] Optionally, in this embodiment, the target account is a user account used for offline caching and playback of media content. Each account may be associated with specific user preferences, historical viewing records, browsing behavior and other information, which is used to formulate offline caching strategies.
[0029] Optionally, in this embodiment, the first historical viewing number is the number of times the target account viewed a specific media resource (at least one media resource) in a historical time period; the first historical browsing number is the number of times the target account browsed (such as previewing the cover, viewing the introduction, etc.) but did not watch the specific media resource (at least one media resource) in a historical time period. It can be understood that the first historical viewing number reflects the user's direct interest in the media resource, and the first historical browsing number reflects the user's indirect interest in the media resource.
[0030] Optionally, in this embodiment, the second historical viewing number and the second historical browsing number refer to the number of times the target account viewed and browsed the media tag associated with the specific media resource in the historical time period. It is understandable that the second historical viewing number and the second historical browsing number reflect the user's preference for a certain type or theme of content.
[0031] Optionally, in this embodiment, the first degree of liking is the degree of preference of the target account for the media resource calculated based on the first historical viewing number and the first historical browsing number of the media resource. The second degree of liking is the degree of preference of the target account for the media type or theme calculated based on the second historical viewing number and the second historical browsing number of the media tag.
[0032] It should be noted that, in this embodiment, the target like degree is the first like degree adjusted by the second like degree combined with the media tag, which more accurately reflects the user's comprehensive preference for a specific media resource and is used to guide offline caching decisions.
[0033] Optionally, in this embodiment, the preset conditions are a series of standards or rules set to determine whether the target likeness is sufficient to meet the conditions for offline caching, which may include but are not limited to: likeness threshold, popularity of media resources, copyright status, storage capacity limit, etc.
[0034] Optionally, in this embodiment, at least one media resource is obtained, which will be used for offline caching. Then, the historical viewing and browsing times of these media resources and the historical viewing and browsing times of the media tags associated therewith are collected to evaluate the user's preference for specific content and the type or theme to which the content belongs.
[0035] Based on the collected historical data, the user's first preference for the media resource and the second preference for the media tag are calculated. The first preference is adjusted according to the second preference (i.e., the user's preference for the media type) to obtain the final target preference. This adjustment process takes into account the correlation between user preferences and media content types, making offline caching decisions more personalized and better meeting the actual needs of users.
[0036] Finally, media resources whose target likes meet the preset conditions are selected from at least one media resource and distributed to the target account for offline caching. The setting of preset conditions ensures that the offline cached media resources are not only liked by users, but also meet the actual restrictions such as storage capacity and copyright status, thus ensuring the rationality and practicality of the cache.
[0037] Through the embodiments provided by the present application, the first degree of liking of the target account for at least one media resource is determined based on the first historical viewing number and the first historical browsing number of at least one media resource in a historical time period, and the second degree of liking of the target account for the media tag is determined based on the second historical viewing number and the second historical browsing number of the media tag associated with at least one media resource in a historical time period. The first degree of liking is adjusted according to the second degree of liking (i.e., the user's preference for the media type) to obtain the final target degree of liking. This adjustment process takes into account the correlation between user preferences and media content types, making offline caching decisions more personalized and better meeting the actual needs of users. Then, the target media resource whose target degree of liking meets the preset conditions is determined from at least one media resource, and the target media resource is distributed to the target account for offline caching, so as to achieve the purpose of automatically adjusting the caching strategy according to the user's behavior patterns and preferences, and realize the technical effect of improving the accuracy of resource distribution during offline caching.
[0038] As an optional solution, determining a first degree of liking of the target account for at least one media resource based on the first historical viewing number and the first historical browsing number includes:
[0039] Obtain a first weight parameter associated with the number of views and a second weight parameter associated with the number of browses;
[0040] Multiply the first historical viewing number by the first weight parameter to obtain a first multiplication result, multiply the first historical viewing number by the second weight parameter to obtain a second multiplication result, obtain a first cumulative value obtained by adding the first multiplication result to the second multiplication result, and use the first cumulative value divided by the second cumulative value of the first weight parameter and the second weight parameter to obtain a first degree of likes.
[0041] Optionally, in this embodiment, the first weight parameter is used to quantify the influence of the historical viewing times on the user's preference, reflecting the relative importance of the viewing times in calculating the user's preference. The second weight parameter is used to quantify the influence of the historical browsing times on the user's preference, reflecting the relative importance of the browsing times in calculating the user's preference.
[0042] Optionally, in this embodiment, the first multiplication result is the product of the first historical viewing number and the first weight parameter, and the second multiplication result is the product of the first historical browsing number and the second weight parameter. The first multiplication result and the second multiplication result are respectively used to quantify the influence of the user's direct viewing and browsing behavior on the preference degree of the specific media resource.
[0043] Optionally, in this embodiment, the first accumulated value refers to the sum of the first multiplication result and the second multiplication result, which is used to comprehensively estimate the contribution of the user's historical viewing and browsing behaviors to the degree of preference for the media resource. The second accumulated value refers to the sum of the first weight parameter and the second weight parameter, which is used to adjust the first accumulated value to ensure that the first degree of preference finally calculated not only reflects the influence of the viewing and browsing behaviors, but also takes into account the regulatory effect of the weight parameter.
[0044] Optionally, in this embodiment, the first weight parameter and the second weight parameter are obtained based on an in-depth analysis of user behavior patterns and big data statistics, ensuring the scientificity and rationality of the weight parameter setting. The weight parameter setting is directly related to the accuracy of the user's preference calculation.
[0045] Further, the first historical viewing number and the first historical browsing number are multiplied by the corresponding weight parameters respectively to obtain a first multiplication result and a second multiplication result. This multiplication process combines the user behavior data with the weight parameters to convert the viewing and browsing behaviors into preliminary results of quantifying the degree of preference.
[0046] Next, the first multiplication result and the second multiplication result are accumulated to obtain a first accumulated value. This accumulation step ensures that the calculation result takes into account both the user's viewing behavior and browsing behavior, avoiding the bias that may be caused by a single behavior data.
[0047] Finally, the first accumulated value is divided by the sum of the first weight parameter and the second weight parameter (i.e., the second accumulated value) to obtain the first degree of liking. This calculation step not only combines the contributions of viewing and browsing behaviors, but also ensures the scientificity and accuracy of the calculation results through the adjustment of weight parameters. This method avoids calculation errors caused by improper weight parameter settings and ensures that the calculated first degree of liking can more truly reflect the user's preference for media resources.
[0048] The embodiments provided in this application focus on scientifically quantifying the user's preference for media resources. By introducing the concept of weight parameters, historical data can be weighted according to the relative importance of the user's viewing and browsing behaviors, thereby more accurately evaluating the user's preference for media resources.
[0049] As an optional solution, based on the second historical viewing number and the second historical browsing number, determining the second degree of liking of the target account for the media tag includes:
[0050] Multiply the second historical viewing number by the first weight parameter to obtain a third multiplication result, multiply the second historical viewing number by the second weight parameter to obtain a fourth multiplication result, obtain a third cumulative value obtained by adding the third multiplication result to the fourth multiplication result, and use the third cumulative value divided by the second cumulative value to obtain the second degree of likes.
[0051] Optionally, in this embodiment, the third multiplication result refers to the result obtained by multiplying the second historical viewing number by the first weight parameter, which is used to quantify the impact of the user's historical viewing behavior on the preference for a specific media tag.
[0052] Optionally, in this embodiment, the fourth multiplication result is a result obtained by multiplying the second historical browsing number by the second weight parameter, and is used to reflect the contribution of the user's historical browsing behavior to the preference for a specific media tag.
[0053] Optionally, in this embodiment, the third accumulated value is the sum of the third multiplication result and the fourth multiplication result, and is used to integrate the user's historical viewing and browsing behavior on a specific media tag, and to calculate the user's preference for the media tag.
[0054] Optionally, in this embodiment, by multiplying the second historical viewing number and the second historical browsing number with the first weight parameter and the second weight parameter, the user's preference for a specific media type can be more accurately evaluated. By accumulating the third multiplication result and the fourth multiplication result, a third cumulative value is obtained, which comprehensively considers the contribution of the user's viewing and browsing behavior to the media tag, providing basic data for calculating the second degree of liking. The third cumulative value is divided by the cumulative value of the first weight parameter and the second weight parameter to achieve standardized calculation of the user's preference for the media tag, ensuring the fairness and accuracy of the calculation results. This calculation step takes into account the regulatory effect of the weight parameter, avoids result deviation, and enables the second degree of liking to more truly reflect the user's preference for the media tag.
[0055] Through the embodiments provided in this application, by combining user behavior data and weight parameters for precise calculation, it is possible to more effectively understand user preferences and provide users with personalized content recommendations and high-quality offline video playback experience.
[0056] As an optional solution, the first degree of liking is adjusted according to the second degree of liking to obtain a target degree of liking of the target account for at least one media resource, including:
[0057] Obtaining a third weight parameter associated with at least one media content and obtaining a fourth weight parameter associated with a media tag;
[0058] Multiply the first degree of liking by the third weight parameter to obtain a fifth multiplication result, multiply the second degree of liking by the fourth weight parameter to obtain a sixth multiplication result, obtain a fourth accumulated value obtained by adding the fifth multiplication result to the sixth multiplication result, and use the fourth accumulated value divided by the fifth accumulated value of the third weight parameter and the fourth weight parameter to obtain the target degree of liking.
[0059] Optionally, in this embodiment, the third weight parameter is used to quantify the influence of the media resource itself on the target preference, reflecting the importance of the media resource in calculating the final preference. In this embodiment, the third weight parameter can be set according to, but not limited to, the characteristics of the media resource (such as newness, popularity, etc.) to ensure that the preference evaluation of the media resource is more comprehensive and accurate.
[0060] Optionally, in this embodiment, the fourth weight parameter corresponds to the third weight parameter and is used to quantify the influence of the media tag on the target's likeability, reflecting the importance of the media type in calculating the final likeability. This parameter can be, but is not limited to, based on the user's preference for content of different types or themes.
[0061] Optionally, in this embodiment, the fifth multiplication result is the product of the first liking degree (i.e., the user's direct liking degree for the media resource based on viewing and browsing behavior) and the third weight parameter, reflecting the contribution of the media resource's own characteristics to the user's liking degree. The sixth multiplication result is the product of the second liking degree (i.e., the user's liking degree for the media tag) and the fourth weight parameter, emphasizing the influence of the media type on the user's liking degree.
[0062] It should be noted that dividing the fourth accumulated value by the accumulated value of the third weight parameter and the fourth weight parameter realizes the standardized calculation of the target like degree, ensuring the fairness and accuracy of the final result. This calculation step avoids result bias by balancing the contribution of media resources and media tags, so that the target like degree can more truly reflect the user's comprehensive preference for media resources.
[0063] Through the embodiment provided by this application, by introducing the third weight parameter and the fourth weight parameter, as well as a series of weighted processing and standardized calculations, it is detailed how to comprehensively evaluate the user's direct preference for media resources and indirect preference for media tags to obtain a more accurate target preference degree. The implementation of this method is of great significance for the optimization of content recommendation and caching strategies in offline playback systems, which can significantly improve the user's content acquisition experience in offline environments, while optimizing the allocation of server resources and reducing network transmission pressure.
[0064] As an optional solution, distribute the target media resources to the target account for offline caching, including:
[0065] After compressing the target media resource, the target media resource is divided into a first number of media resource segments;
[0066] When the number of available cache areas in the cache space is not less than the first number, cache the first number of media resource segments one by one in the available cache areas, and initialize access timestamp information associated with each cache area and initialize access frequency information associated with each cache area;
[0067] When the number of available cache areas in the cache space is less than the first number, a second number of used cache areas are determined from the cache space, and cache contents of the second number of used cache areas are cleared to obtain a second number of available cache areas, wherein the second number of available cache areas are used to assist in storing the first number of media resource fragments.
[0068] Optionally, in this embodiment, the media resource fragments are multiple smaller parts into which the target media resource is divided for storage management and offline playback. Each fragment may contain a part of the video, such as a chapter, an advertisement, or a specific scene. The cache space refers to the storage area on the terminal device where the user account is located for storing offline media content, which can be the internal storage or external storage of the device.
[0069] Optionally, in this embodiment, the access timestamp information records the time point when the media content segment in the cache area was last accessed, which is used by the system to determine the activity of the cached content. The access frequency information records the number of times the media content segment in the cache area is accessed, which is used by the system to determine the usage frequency of the cached content.
[0070] Optionally, in this embodiment, the target media resource is compressed to reduce the file size, and then divided into multiple segments for easy storage and playback. Subsequently, storage allocation of media resource segments is performed based on the availability of cache space. If the number of available cache areas is sufficient, the system will directly cache each segment and initialize the corresponding access timestamp and access frequency information to provide data support for subsequent content management and intelligent cache strategies. If the cache space is insufficient, the cache content cleanup process will be executed. By determining and cleaning the second number of used cache areas, space can be freed up to store segments of the target media resource, ensuring that users can obtain the latest offline content in a timely manner. This process may follow the LRU or LFU algorithm, and intelligently eliminate inactive or low-frequency media resources based on the usage of the cached content, thereby achieving dynamic management and optimization of the cache space.
[0071] Through the embodiments provided in this application, cache space can be allocated and managed more efficiently, ensuring the smooth progress of the offline cache process.
[0072] As an optional solution, determining a second number of used cache areas from the cache space includes:
[0073] Determine from the cache space the M used cache areas with the lowest access frequencies indicated by the access time frequency information, and determine the M used cache areas with the lowest access frequencies as the second number of used cache areas, where M is a positive integer; or,
[0074] Determine from the cache space the M used cache areas with the earliest last access time indicated by the access timestamp information, and determine the M used cache areas with the earliest last access time as the second number of used cache areas.
[0075] Optionally, in this embodiment, M used cache areas refer to the number of areas that need to clear cache content determined based on access time frequency information or access timestamp information, and M is a positive integer representing the number of cache areas that can be dynamically adjusted in the cache management strategy.
[0076] Optionally, in this embodiment, the M used cache areas with the lowest access frequency are determined based on the access time frequency information. This process can intelligently filter out those media contents that are less frequently accessed by users as the primary target of content cleaning by evaluating the usage frequency of the media resource segments. This strategy ensures that the media resource segments stored in the cache space are more active and more likely to meet the current needs of users.
[0077] Optionally, in this embodiment, based on the access timestamp information, the M used cache areas with the earliest last access time are determined as the objects of content cleaning. This process evaluates the time point when the media resource was last accessed, intelligently selects those media contents that have not been accessed for a long time, and vacates the cache space. This ensures that the system can update the cache content in a timely manner, give priority to retaining those media resources that have been recently accessed by users, and improve the immediacy and relevance of offline playback.
[0078] Through the embodiments provided in the present application, a cache area selection strategy based on access time frequency information or access timestamp information is used to intelligently determine a second number of used cache areas for content cleaning to free up space for storing new media resource fragments. The cache content can be dynamically adjusted according to user behavior data and actual usage to ensure that users can obtain more personalized and high-quality video playback services in an offline environment.
[0079] As an optional solution, determining a second number of used cache areas from the cache space further includes:
[0080] Determine N used cache areas with the lowest access frequency indicated by access time frequency information from the M used cache areas with the earliest most recent access time, and determine the N used cache areas with the lowest access frequency as the second number of used cache areas, where N is a positive integer less than or equal to M; or,
[0081] Determine N used cache areas with the earliest last access time indicated by access timestamp information from the M used cache areas with the lowest access frequency, and determine the N used cache areas with the earliest last access time as the second number of used cache areas.
[0082] Optionally, in this embodiment, the N used cache areas refer to the cache areas with the lowest access frequency or the earliest last access time that are further screened out from the M used cache areas, and N is a positive integer less than or equal to M, and is used to more accurately locate the cache space that needs to be cleared to make room for storing new media resource fragments.
[0083] Optionally, in this embodiment, N used cache areas with the lowest access frequency are further selected from the M used cache areas with the earliest last access time as the second number of used cache areas that need to be cleaned up. This process not only takes into account the usage time of the cached content, but also combines the consideration of the access frequency, ensuring that the system can give priority to cleaning up those media resource segments that have not been accessed for a long time and have a low usage frequency, further optimizing the use efficiency of the cache space.
[0084] Optionally, in this embodiment, N used cache areas with the earliest last access time are determined from the M used cache areas with the lowest access frequency as the second number of used cache areas for content cleaning. This strategy not only focuses on the low point of access frequency but also considers the time point of the last access when deciding which cache content needs to be cleaned, ensuring that the media resource fragments retained in the cache space have both high access requirements and meet the characteristics of recent access, thereby improving the immediacy and relevance of the cache content.
[0085] It is understandable that whether filtering based on access timestamp information or filtering based on access frequency, it is possible to more accurately locate the cache area that needs to be cleaned, ensuring that the media resource fragments stored in the cache space have both high activity and meet user needs for content immediacy and relevance.
[0086] Through the embodiments provided by this application, by introducing a dual screening mechanism based on access timestamp information and access time frequency information, the determination process of the second number of used cache areas in the offline cache space is further refined. This method not only improves the accuracy of cache content cleaning, but also optimizes the dynamic management of cache space, achieves a high degree of matching between cache content and user needs, and significantly improves the user's experience of obtaining personalized and high-quality video playback services in an offline environment.
[0087] As an optional solution, the above resource distribution method is applied to a cached media content offline playback system, such as Figure 2 As shown, the system includes a user terminal 202, a cache server cluster 204, a content distribution network 206, and a media content management module 208. The user terminal 202 includes a smart phone, a tablet computer, a smart TV, and a PC, which is responsible for initiating a play request, displaying media content, and providing a user interaction interface. The cache server cluster 204, deployed in the cloud or edge network, is responsible for storing copies of media content that users may access, and performs intelligent cache scheduling based on user behavior and network conditions. The content distribution network 206 connects the media content source with the cache server. The media content management module 208 manages the source data, copyright information, and storage location of the media content, and supports rapid retrieval and distribution of content.
[0088] As an optional solution, the resource distribution method is applied to a cached media content offline playback method, which can be implemented based on but not limited to the cached media content offline playback system. The offline playback method includes the following steps:
[0089] S1: Data cache, obtains the user's historical viewing history, browsing behavior, interests and hobbies, predicts the media content that the user may watch in the future, and downloads it from the CDN to the cache server in advance. It uses a hybrid algorithm that combines LRU (eliminating the least recently used data first) and LFU (eliminating the least frequently used data) with timestamps to dynamically adjust the cache content.
[0090] S2: Data processing, compressing the cached content, and then dividing the media content into multiple segments for storage.
[0091] S3: Offline playback: the user selects media content and then plays the media content offline according to the selection.
[0092] In step S1, it includes the following steps:
[0093] S11: Acquire previously viewed media content and create a multi-dimensional radar chart about the media content (the multi-dimensional radar chart may include but is not limited to the following three dimensions: media content viewing dimension, media content browsing dimension, and media content label dimension, wherein the media content label dimension is used to indicate the user's preference for a specific type of media content, corresponding to the above interests and hobbies).
[0094] S12: Obtain the number of times G and the number of times L the media content has been viewed in the past.
[0095] S13: Weights are assigned to the number of views and the number of page views, which are σ G , σ L .
[0096] S14: For a dimension, the calculation formula for user preference is: Where A is the proportion of this dimension in the video multi-dimensional radar chart. It should be noted that in the process of calculating the user's preference for a media tag, the original parameter of the number of times the media content is viewed is replaced by the number of times the media tag is viewed, and the original parameter of the number of times the media content is browsed is replaced by the number of times the media tag is browsed. The corresponding weights can remain unchanged or be adjusted accordingly, and are set according to actual needs, and this embodiment does not limit this.
[0097] S15: Then, for each media content that has been watched and browsed in the past, calculations are performed, and all calculation results are summed up to obtain the user's liking degree B for the media content in this dimension.
[0098] S16: Then, the likeability of each media content is calculated according to the media content in the CDN, and the media content is downloaded in descending order of likeability.
[0099] In S16, the method for calculating the likeability of each media content includes the following steps:
[0100] S161: Obtain a multi-dimensional radar chart of media content in the CDN. The multi-dimensional radar chart includes n dimensions, which are q1, q2, ..., q n , the preference level of each dimension is L1, L2, ... L n .
[0101] S162: Then according to the formula Calculate the degree of like for the video, where B i For users to i The total liking of the dimension.
[0102] In step S1, the method for dynamically adjusting the cache includes the following steps:
[0103] A1: Initialize the cache, set the maximum capacity of the cache, and create a data structure to store the cache content.
[0104] A2: Define a node data structure. For each cache item, define a node data structure.
[0105] A3: Cache access logic.
[0106] A31: Lookup cache.
[0107] A32: Add cache.
[0108] A33: Update cache.
[0109] A4: Cache maintenance: Set a timer or background thread to traverse the linked list regularly and delete cache items that have not been accessed for more than a threshold time.
[0110] In step A1, the data structure uses a combination of a hash table and a linked list. The hash table is used to quickly find the value corresponding to the key in the cache, and the linked list is used to maintain the access order or frequency of the cache.
[0111] In step A2, the node data structure includes:
[0112] Key, the identifier of the cache item.
[0113] Value, the content of the cache item.
[0114] Access timestamp, which records the last time the cache item was accessed.
[0115] Access frequency, which records the number of times the cache item is accessed.
[0116] Step A31 comprises the following steps:
[0117] A311: When a cache item needs to be accessed, first look up the section corresponding to the key in the hash table.
[0118] A312: If the node is found, update the access timestamp of the node or increase the access frequency.
[0119] A313: If the node is not found, proceed to the next step.
[0120] In step A32, it includes the following steps:
[0121] A321: If the cache is not full, create a new node, add it to the hash table and linked list, and set the corresponding access timestamp or access frequency.
[0122] A322: If the cache is full, the node with the earliest access timestamp is selected for elimination or the node with the lowest access frequency is selected for elimination. If the frequencies are the same, the node with the earliest timestamp can be selected.
[0123] A323: Add new nodes to the hash table and linked list, and update the structure of the linked list to reflect the new access order or frequency.
[0124] In step A33, it includes the following steps:
[0125] A331: If you need to update the value of a cache item, first look up the node corresponding to the key in the hash table.
[0126] A332: If the node is found, update its value, access timestamp, and access frequency.
[0127] A333: If the node is not found, proceed according to the logic of adding cache.
[0128] Through the embodiments provided by this application, a multi-dimensional radar chart of each video is first established, and the user's preference for each dimension is calculated based on previous browsing and viewing records, and then the preference for the media content is calculated for the uncached media content, so that the media content can be matched with the user to achieve the purpose of self-learning and self-updating. For cached videos, timestamps and access frequencies are used for control, and the cache can be updated in real time, thereby realizing dynamic cache control and optimizing terminal memory.
[0129] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0130] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0131] According to another aspect of the embodiment of the present application, a resource distribution device for implementing the above resource distribution method is also provided. Figure 3 As shown, the device comprises:
[0132] A first acquisition unit 302 is used to acquire at least one media resource, wherein the at least one media resource is used to be distributed to a target account for offline caching;
[0133] A second acquisition unit 304 is used to acquire a first historical viewing number and a first historical browsing number of at least one media resource in a historical time period, and acquire a second historical viewing number and a second historical browsing number of a media tag associated with at least one media resource in a historical time period, wherein the media tag is used to indicate a media type of at least one media resource;
[0134] A determination unit 306, configured to determine a first degree of liking of the target account for at least one media resource based on the first historical viewing count and the first historical browsing count, and to determine a second degree of liking of the target account for the media tag based on the second historical viewing count and the second historical browsing count;
[0135] An adjusting unit 308 is configured to adjust the first liking degree according to the second liking degree to obtain a target liking degree of the target account for at least one media resource;
[0136] The distribution unit 310 is used to determine a target media resource whose target like degree meets a preset condition from at least one media resource, and distribute the target media resource to a target account for offline caching.
[0137] As an optional solution, the determining unit 306 includes:
[0138] A first acquisition module, used to acquire a first weight parameter associated with the number of views and a second weight parameter associated with the number of browses;
[0139] The first calculation module is used to multiply the first historical viewing number by the first weight parameter to obtain a first multiplication result, multiply the first historical viewing number by the second weight parameter to obtain a second multiplication result, obtain a first cumulative value obtained by adding the first multiplication result to the second multiplication result, and use the first cumulative value divided by the second cumulative value of the first weight parameter and the second weight parameter to obtain a first degree of liking.
[0140] As an optional solution, the determining unit 306 includes:
[0141] The second calculation module is used to multiply the second historical viewing number by the first weight parameter to obtain a third multiplication result, multiply the second historical viewing number by the second weight parameter to obtain a fourth multiplication result, obtain a third cumulative value obtained by adding the third multiplication result to the fourth multiplication result, and use the third cumulative value to divide the second cumulative value to obtain a second degree of liking.
[0142] As an optional solution, the adjustment unit 308 includes:
[0143] A second acquisition module, used to acquire a third weight parameter associated with at least one media content and to acquire a fourth weight parameter associated with a media tag;
[0144] The third calculation module is used to multiply the first degree of liking by the third weight parameter to obtain a fifth multiplication result, multiply the second degree of liking by the fourth weight parameter to obtain a sixth multiplication result, obtain a fourth accumulated value obtained by adding the fifth multiplication result to the sixth multiplication result, and use the fourth accumulated value divided by the fifth accumulated value of the third weight parameter and the fourth weight parameter to obtain the target degree of liking.
[0145] As an optional solution, the distribution unit 310 includes:
[0146] A division module, configured to divide the target media resource into a first number of media resource segments after compressing the target media resource;
[0147] a cache module, configured to cache the first number of media resource segments one by one in the available cache areas when the number of available cache areas in the cache space is not less than the first number, and initialize access timestamp information associated with each cache area and initialize access frequency information associated with each cache area;
[0148] A determination module is used to determine a second number of used cache areas from the cache space when the number of available cache areas in the cache space is less than the first number, clean up the cache contents of the second number of used cache areas, and obtain a second number of available cache areas, wherein the second number of available cache areas are used to assist in storing the first number of media resource fragments.
[0149] As an optional solution, determine the modules, including:
[0150] A first determination submodule is used to determine, from the cache space, M used cache areas with the lowest access frequencies indicated by the access time frequency information, and determine the M used cache areas with the lowest access frequencies as a second number of used cache areas, where M is a positive integer; or
[0151] The second determination submodule is used to determine from the cache space the M used cache areas with the earliest last access time indicated by the access timestamp information, and determine the M used cache areas with the earliest last access time as the second number of used cache areas.
[0152] As an optional solution, the module is determined to further include:
[0153] A third determination submodule is used to determine N used cache areas with the lowest access frequency indicated by the access time frequency information from the M used cache areas with the earliest most recent access time, and determine the N used cache areas with the lowest access frequency as a second number of used cache areas, where N is a positive integer less than or equal to M; or,
[0154] The fourth determination submodule is used to determine the N used cache areas with the earliest last access time indicated by the access timestamp information from the M used cache areas with the lowest access frequency, and determine the N used cache areas with the earliest last access time as the second number of used cache areas.
[0155] According to another aspect of the embodiment of the present application, an electronic device for implementing the above resource distribution method is also provided, further as follows Figure 4 As shown, the electronic device includes a memory 402 and a processor 404. The memory 402 stores a computer program, and the processor 404 is configured to execute the steps in any of the above method embodiments through the computer program.
[0156] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0157] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0158] S1, obtaining at least one media resource, wherein the at least one media resource is used to be distributed to a target account for offline caching;
[0159] S2, obtaining a first historical viewing number and a first historical browsing number of at least one media resource in a historical time period, and obtaining a second historical viewing number and a second historical browsing number of a media tag associated with at least one media resource in a historical time period, wherein the media tag is used to indicate a media type of at least one media resource;
[0160] S3, determining a first degree of liking of the target account for at least one media resource based on the first historical viewing number and the first historical browsing number, and determining a second degree of liking of the target account for the media tag based on the second historical viewing number and the second historical browsing number;
[0161] S4, adjusting the first degree of liking according to the second degree of liking to obtain a target degree of liking of the target account for at least one media resource;
[0162] S5, determining a target media resource whose target like degree meets a preset condition from at least one media resource, and distributing the target media resource to a target account for offline caching.
[0163] Alternatively, a person skilled in the art may understand that: Figure 4 The structure shown is for illustration only. Figure 4 The structure of the electronic device is not limited. Figure 4More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 4 Different configurations are shown.
[0164] Among them, the memory 402 can be used to store software programs and modules, such as the program instructions / modules corresponding to the resource distribution method and device in the embodiment of the present application. The processor 404 executes various functional applications and data processing by running the software programs and modules stored in the memory 402, that is, realizing the above-mentioned resource distribution method. The memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 402 may further include a memory remotely arranged relative to the processor 404, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 402 can be specifically used, but is not limited to, to store information such as the first degree of liking, the second degree of liking, and the target degree of liking. As an example, if Figure 4 As shown, the memory 402 may include, but is not limited to, the first acquisition unit 302, the second acquisition unit 304, the determination unit 306, the adjustment unit 308, and the distribution unit 310 in the resource distribution device. In addition, it may also include, but is not limited to, other module units in the resource distribution device, which will not be repeated in this example.
[0165] Optionally, the transmission device 406 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 406 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0166] In addition, the electronic device further comprises: a display 408 for displaying information such as the first degree of liking, the second degree of liking, and the target degree of liking; and a connection bus 410 for connecting various module components in the electronic device.
[0167] In other embodiments, the client or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. A peer-to-peer network may be formed between the nodes, and any form of computing device, such as a server, a client, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0168] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.
[0169] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0170] It should be noted that the computer system of the electronic device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0171] The computer system includes a central processing unit (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) or the program loaded from the storage part to the random access memory (RAM). In the random access memory, various programs and data required for system operation are also stored. The central processing unit, the read-only memory and the random access memory are connected to each other through a bus. The input / output interface (I / O interface) is also connected to the bus.
[0172] The following components are connected to the input / output interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a local area network card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the input / output interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0173] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions defined in the system of the present application are executed.
[0174] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0175] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0176] S1, obtaining at least one media resource, wherein the at least one media resource is used to be distributed to a target account for offline caching;
[0177] S2, obtaining a first historical viewing number and a first historical browsing number of at least one media resource in a historical time period, and obtaining a second historical viewing number and a second historical browsing number of a media tag associated with at least one media resource in a historical time period, wherein the media tag is used to indicate a media type of at least one media resource;
[0178] S3, determining a first degree of liking of the target account for at least one media resource based on the first historical viewing number and the first historical browsing number, and determining a second degree of liking of the target account for the media tag based on the second historical viewing number and the second historical browsing number;
[0179] S4, adjusting the first degree of liking according to the second degree of liking to obtain a target degree of liking of the target account for at least one media resource;
[0180] S5, determining a target media resource whose target like degree meets a preset condition from at least one media resource, and distributing the target media resource to a target account for offline caching.
[0181] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the electronic device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0182] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0183] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0184] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0185] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0186] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A resource distribution method, characterized in that: include: Acquire at least one media resource, wherein the at least one media resource is used to be distributed to a target account for offline caching; Acquire a first historical viewing number and a first historical browsing number of the at least one media resource in a historical time period, and acquire a second historical viewing number and a second historical browsing number of a media tag associated with the at least one media resource in the historical time period, wherein the media tag is used to indicate a media type of the at least one media resource; Determining a first degree of liking of the target account for the at least one media resource based on the first historical viewing count and the first historical browsing count, and determining a second degree of liking of the target account for the media tag based on the second historical viewing count and the second historical browsing count; adjusting the first liking degree according to the second liking degree to obtain a target liking degree of the target account for the at least one media resource; A target media resource whose target like degree meets a preset condition is determined from the at least one media resource, and the target media resource is distributed to the target account for offline caching.
2. The method according to claim 1, characterized in that The determining, based on the first historical viewing number and the first historical browsing number, a first liking degree of the target account for the at least one media resource includes: Obtaining a first weight parameter associated with the number of views and a second weight parameter associated with the number of browses; Multiply the first historical viewing number by the first weight parameter to obtain a first multiplication result, multiply the first historical viewing number by the second weight parameter to obtain a second multiplication result, obtain a first cumulative value obtained by adding the first multiplication result to the second multiplication result, and use the first cumulative value divided by the second cumulative value of the first weight parameter and the second weight parameter to obtain the first degree of liking.
3. The method according to claim 2, characterized in that The determining, based on the second historical viewing number and the second historical browsing number, a second degree of liking of the target account for the media tag includes: Multiply the second historical viewing number by the first weight parameter to obtain a third multiplication result, multiply the second historical viewing number by the second weight parameter to obtain a fourth multiplication result, obtain a third accumulated value obtained by adding the third multiplication result to the fourth multiplication result, and use the third accumulated value to divide the second accumulated value to obtain the second degree of liking.
4. The method according to claim 1, characterized in that The adjusting the first liking degree according to the second liking degree to obtain a target liking degree of the target account for the at least one media resource includes: Obtaining a third weight parameter associated with the at least one media content and obtaining a fourth weight parameter associated with the media tag; Multiply the first degree of liking by the third weight parameter to obtain a fifth multiplication result, multiply the second degree of liking by the fourth weight parameter to obtain a sixth multiplication result, obtain a fourth accumulated value obtained by adding the fifth multiplication result to the sixth multiplication result, and use the fourth accumulated value divided by the fifth accumulated value of the third weight parameter and the fourth weight parameter to obtain the target degree of liking.
5. The method according to claim 1, characterized in that The distributing the target media resource to the target account for offline caching includes: After compressing the target media resource, the target media resource is divided into a first number of media resource segments; When the number of available cache areas in the cache space is not less than the first number, cache the first number of media resource segments one by one in the available cache areas, and initialize access timestamp information associated with each cache area and initialize access frequency information associated with each cache area; When the number of available cache areas in the cache space is less than the first number, a second number of used cache areas are determined from the cache space, and cache contents of the second number of used cache areas are cleared to obtain a second number of available cache areas, wherein the second number of available cache areas are used to assist in storing the first number of media resource fragments.
6. The method according to claim 5, characterized in that The determining a second number of used cache areas from the cache space includes: Determine from the cache space the M used cache areas with the lowest access frequencies indicated by the access time frequency information, and determine the M used cache areas with the lowest access frequencies as the second number of used cache areas, where M is a positive integer; or, Determine from the cache space the M used cache areas with the earliest last access time indicated by the access timestamp information, and determine the M used cache areas with the earliest last access time as the second number of used cache areas.
7. The method according to claim 6, characterized in that The determining of a second number of used cache areas from the cache space further includes: Determine, from the M used cache areas with the earliest most recent access time, the N used cache areas with the lowest access frequency indicated by the access time frequency information, and determine the N used cache areas with the lowest access frequency as the second number of used cache areas, where N is a positive integer less than or equal to M; or, Determine N used cache areas with the earliest last access time indicated by the access timestamp information from the M used cache areas with the lowest access frequency, and determine the N used cache areas with the earliest last access time as the second number of used cache areas.
8. A resource distribution device, characterized in that: include: A first acquisition unit, configured to acquire at least one media resource, wherein the at least one media resource is used to be distributed to a target account for offline caching; A second acquisition unit is used to acquire a first historical viewing number and a first historical browsing number of at least one media resource in a historical time period, and acquire a second historical viewing number and a second historical browsing number of a media tag associated with at least one media resource in a historical time period, wherein the media tag is used to indicate a media type of the at least one media resource; a determination unit, configured to determine a first degree of liking of the target account for at least one media resource based on the first historical viewing count and the first historical browsing count, and to determine a second degree of liking of the target account for the media tag based on the second historical viewing count and the second historical browsing count; an adjusting unit, configured to adjust the first liking degree according to the second liking degree, so as to obtain a target liking degree of the target account for at least one media resource; The distribution unit is used to determine a target media resource whose target like degree meets a preset condition from at least one media resource, and distribute the target media resource to a target account for offline caching.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed by an electronic device.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.