A long-term resource allocation method, device, and equipment for a cache system

By adopting resource allocation methods in multiple users and different states in the cache system, the problems of low efficiency of resource use, deception and long-term unfair allocation in the prior art are solved, and more efficient and fair resource allocation is achieved.

CN115408346BActive Publication Date: 2025-06-17TIANJIN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210646616.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2025-06-17
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

The prior art cannot effectively solve the problems of inefficient resource use, fraud and unfair long-term resource allocation in shared cache systems, especially when user needs change over time.

Method used

A long-term resource allocation method for the cache system is proposed. By obtaining the user's file cache request, it determines whether there are unused resources in the current cache system, and adopts different resource allocation methods based on priority and number of visits, including efficiency and fair resource allocation methods.

Benefits of technology

It improves the efficiency of cache resources, ensures fairness among users, and avoids fraudulent problems in resource allocation and long-term unfair distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115408346B_ABST
    Figure CN115408346B_ABST
Patent Text Reader

Abstract

The present application provides a long-term resource allocation method, device, and equipment for a caching system. The method includes: obtaining a file caching request of a user; determining whether there are unused resources in the current caching system; if not, determining whether the access times of the file with the lowest priority in the current caching system are greater than a set threshold; and if not, determining that the current caching system belongs to a first state and adopting an efficiency-based resource allocation method; otherwise, determining that the current caching system belongs to a second state and adopting a fairness-based resource allocation method. The long-term resource allocation method and device for the caching system of the present application support multi-user sharing of the cache to improve the caching efficiency, adopt different resource allocation methods according to different states of the current caching system, ensure fairness among users, and improve the allocation efficiency at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer caching and high-performance computing, and particularly to a long-term resource allocation method and apparatus for a caching system. Background Art

[0002] In the current big data era, hundreds of millions of incremental data are generated every day. How to store and reasonably utilize these data will be a huge challenge for people. With the continuous development of cloud infrastructure, cloud services have gradually matured and become widely popular. For most users with no long-term high demands, they no longer need to purchase hardware resources by themselves, but only need to obtain resources by purchasing cloud services. Therefore, cloud services have alleviated the phenomenon of resource waste to a certain extent. If users obtain the long-term right to use cloud services by subscribing and paying, cloud service providers will give users a certain discount according to the subscription duration. This method can not only save users' costs, but also encourage users to always use cloud services and establish a long-term friendly cooperation relationship. Although users get discounts when purchasing long-term subscription services, the resource demands of users change over time. Sometimes, some users may store a large amount of cold data in the cache. Therefore, it is difficult to ensure that these resources are always fully utilized. To improve the utilization efficiency of cache resources, the most effective method is resource sharing. Max-Min Fairness (MMF) is a relatively popular resource allocation strategy. In a shared environment, it can maximize the minimum fair share obtained by users. However, there is a fatal problem, that is, this strategy is memoryless, that is, it can only ensure the fairness of users at each instant of allocation, and cannot record the historical behavior of users. These allocation strategies are not applicable to long-term shared caching systems, and there are problems such as low resource utilization efficiency, cheating problems, and unfair long-term total allocated resources. Thus, there is a trade-off between fairness and efficiency in a shared system. How to maximize the utilization efficiency of system resources under the condition of ensuring the minimum fairness of users, and how to avoid these problems while ensuring long-term fairness have not been considered yet. Summary of the Invention

[0003] In view of the limitations of the prior art, we propose a long-term resource allocation method and apparatus for a caching system, which support multi-user shared caching to improve caching efficiency, can adopt different resource allocation methods according to different states of the current system, ensure fairness among users, and improve the allocation efficiency at the same time.

[0004] This application provides a long-term resource allocation method for a caching system, including the following steps:

[0005] Obtain the file caching requests of users;

[0006] Determine whether there are unused resources in the current cache system;

[0007] If not, determine whether the access count of the file with the lowest priority in the current cache system is greater than a set threshold; and,

[0008] If not, determine that the current cache system belongs to the first state and adopt an efficiency-based resource allocation method; otherwise, determine that the current cache system belongs to the second state and adopt a fairness-based resource allocation method;

[0009] Among them, the efficiency-based resource allocation method includes the following steps:

[0010] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system;

[0011] If so, delete the file with the lowest priority in the current cache system, cache the requested file in the current cache system, and update the total resource allocation of the user to which the file belongs;

[0012] The fairness-based resource allocation method includes the following steps:

[0013] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system; and, if so,

[0014] Determine whether the users to which the requested file and the file with the lowest priority in the current cache system belong are the same; and, if not

[0015] Determine whether the total resource allocation of the user to which the requested file belongs is greater than the total resource allocation of the user to which the file with the lowest priority in the current cache system belongs; and,

[0016] If so, abandon caching the requested file.

[0017] If not, delete the file with the lowest priority in the current cache system, cache the requested file in the cache system, and update the total resource allocation of the user to which the file belongs.

[0018] Preferably, the long-term resource allocation method of the cache system further includes:

[0019] Determine whether there are unused resources in the current cache system;

[0020] If so, cache the requested file and update the total resource allocation of the user to which the file belongs.

[0021] Preferably, the efficiency-based resource allocation method further includes the following steps:

[0022] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system; and,

[0023] If not, abandon caching the requested file and update the total resource allocation of the user to whom the file with the lowest priority in the current cache system belongs.

[0024] Preferably, the fair resource allocation method further includes the following steps:

[0025] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system; and, if so,

[0026] Determine whether the users to whom the requested file and the file with the lowest priority in the current cache system belong are the same;

[0027] If so, delete the file with the lowest priority in the current cache system, cache the requested file in the cache system, and update the total resource allocation of the user to whom the file belongs.

[0028] Preferably, the fair resource allocation method further includes the following steps:

[0029] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system;

[0030] If not, abandon caching the requested file and update the total resource allocation of the user to whom the file with the lowest priority in the current cache system belongs.

[0031] The present application also provides a long-term resource allocation device for a cache system, which is applied to a cache system and is characterized by including:

[0032] A request acquisition module, configured to acquire a file caching request of a user;

[0033] A first judgment module, configured to judge whether the current cache system has unused resources;

[0034] A second judgment module, configured to judge the relationship between the access times of the file with the lowest priority in the current cache system and a set threshold;

[0035] A resource allocation module, configured to adopt different resource allocation methods according to different relationships between the access times of the file with the lowest priority in the current cache system and the set threshold;

[0036] When the access times of the file with the lowest priority in the current cache system are less than the set threshold, judge that the current cache system belongs to the first state and adopt an efficiency-based resource allocation method; otherwise, judge that the current cache system belongs to the second state and adopt a fairness-based resource allocation method;

[0037] Among them, the efficiency resource allocation method includes the following steps:

[0038] Judge whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system;

[0039] If so, delete the file with the lowest priority in the current cache system, cache the requested file in the current cache system, and update the total resource allocation of the user to which the file belongs;

[0040] The fairness resource allocation method includes the following steps:

[0041] Judge whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system; and if so,

[0042] Judge whether the users to which the requested file and the file with the lowest priority in the current cache system belong are the same; and if not

[0043] Judge whether the total resource allocation of the user to which the requested file belongs is greater than the total resource allocation of the user to which the file with the lowest priority in the current cache system belongs; and

[0044] If so, give up caching the requested file.

[0045] If not, delete the file with the lowest priority in the current cache system, cache the requested file in the cache system, and update the total resource allocation of the user to which the file belongs.

[0046] This application also provides an electronic device, including a memory and a processor, the memory stores a computer program, and is characterized in that when the processor executes the computer program, the following steps are implemented:

[0047] Obtain the file caching request of the user;

[0048] Judge whether the current cache system has unused resources;

[0049] If not, judge whether the access times of the file with the lowest priority in the current cache system are greater than a set threshold; and

[0050] If not, judge that the current cache system belongs to the first state and adopt the efficiency resource allocation method; if so, judge that the current cache system belongs to the second state and adopt the fairness resource allocation method.

[0051] Among them, the efficiency resource allocation method includes the following steps:

[0052] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system;

[0053] If so, delete the file with the lowest priority in the current cache system, cache the requested file in the current cache system, and update the total resource allocation of the user to which the file belongs;

[0054] The fair resource allocation method includes the following steps:

[0055] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system; and if so,

[0056] Determine whether the users to which the requested file and the file with the lowest priority in the current cache system belong are the same; and if not

[0057] Determine whether the total resource allocation of the user to which the requested file belongs is greater than the total resource allocation of the user to which the file with the lowest priority in the current cache system belongs; and

[0058] If so, abandon caching the requested file.

[0059] If not, delete the file with the lowest priority in the current cache system, cache the requested file in the cache system, and update the total resource allocation of the user to which the file belongs.

[0060] The long-term resource allocation method and device of the cache system in this application support multi-user sharing of the cache to improve the cache efficiency. According to different states of the current cache system, different resource allocation methods are adopted to ensure fairness among users and improve the allocation efficiency at the same time. Description of the Drawings

[0061] Figure 1 It is a schematic flowchart of a long-term resource allocation method for a cache system provided by an embodiment of this application;

[0062] Figure 2 It is a schematic structural diagram of a long-term resource allocation device for a cache system provided by an embodiment of this application;

[0063] Figure 3 It is a schematic entity structure diagram of an electronic device provided by an embodiment of this application. Detailed Embodiment

[0064] To make the objectives, technical solutions and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in specific embodiments with reference to the accompanying drawings. Apparently, the described embodiments are only a part rather than all of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without creative efforts shall fall within the scope of protection of this application.

[0065] Figure 1 The flowchart shows a long-term resource allocation method for a cache system provided by an embodiment of this application. As Figure 1 shown, the long-term resource allocation method for the cache system of this embodiment is described as follows:

[0066] Step 101: Obtain the file cache request of the user.

[0067] Step 102: Determine whether there are unused resources in the current cache system.

[0068] Step 103: If so, cache the requested file and update the total resource allocation of the user to whom the file belongs.

[0069] Step 104: If not, determine whether the access count of the file with the lowest priority in the current cache system is greater than a set threshold.

[0070] Step 105: If not, adopt an efficiency-based resource allocation method.

[0071] Step 106: If so, adopt a fairness-based resource allocation method.

[0072] Among them, the efficiency-based resource allocation method includes the following steps:

[0073] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system;

[0074] If so, delete the file with the lowest priority in the current cache system, cache the requested file in the current cache system, and update the total resource allocation of the user to whom the file belongs;

[0075] The fairness-based resource allocation method includes the following steps:

[0076] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system; and if so,

[0077] Determine whether the users to whom the requested file and the file with the lowest priority in the current cache system belong are the same; and if not

[0078] Determine whether the total resource allocation of the user to whom the requested file belongs is greater than the total resource allocation of the user to whom the file with the lowest priority in the current cache system belongs; and,

[0079] If so, abandon caching the requested file.

[0080] If not, delete the file with the lowest priority in the current cache system, cache the requested file in the cache system, and update the total resource allocation of the user to whom the file belongs.

[0081] In one embodiment, the long-term resource allocation method of the cache system further includes:

[0082] Determine whether the current cache system has unused resources;

[0083] If so, cache the requested file and update the total resource allocation of the user to whom the file belongs.

[0084] In one embodiment, the efficiency-based resource allocation method further includes the following steps:

[0085] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system;

[0086] If not, abandon caching the requested file, and update the total resource allocation of the user to whom the file with the lowest priority in the current cache system belongs.

[0087] In one embodiment, the fairness-based resource allocation method further includes the following steps:

[0088] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system; and, if so,

[0089] Determine whether the users to whom the requested file and the file with the lowest priority in the current cache system belong are the same;

[0090] If so, delete the file with the lowest priority in the current cache system, cache the requested file in the cache system, and update the total resource allocation of the user to whom the file belongs.

[0091] In one embodiment, the fairness-based resource allocation method further includes the following steps:

[0092] Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system;

[0093] If not, abandon caching the requested file, and update the total resource allocation of the user to whom the file with the lowest priority in the current cache system belongs.

[0094] Figure 2 The structural schematic diagram of a long-term resource allocation device for a cache system provided by an embodiment of the present application includes:

[0095] A request acquisition module 21, configured to acquire a file cache request of a user;

[0096] A first judgment module 22, configured to judge whether there is unused resources in the current cache system;

[0097] A second judgment module 23, configured to judge the relationship between the access times of the file with the lowest priority in the current cache system and a set threshold;

[0098] A resource allocation module 24, configured to adopt different resource allocation methods according to different relationships between the access times of the file with the lowest priority in the current cache system and the set threshold.

[0099] When the access times of the file with the lowest priority in the current cache system are less than the set threshold, it is judged that the current cache system belongs to the first state, and an efficiency-based resource allocation method is adopted; otherwise, it is judged that the current cache system belongs to the second state, and a fairness-based resource allocation method is adopted;

[0100] Among them, the efficiency-based resource allocation method includes the following steps:

[0101] Judge whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system;

[0102] If so, delete the file with the lowest priority in the current cache system, cache the requested file in the current cache system, and update the total resource allocation amount of the user to which the file belongs;

[0103] The fairness-based resource allocation method includes the following steps:

[0104] Judge whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system; and if so,

[0105] Judge whether the users to which the requested file and the file with the lowest priority in the current cache system belong are the same; and if not

[0106] Judge whether the total resource allocation amount of the user to which the requested file belongs is greater than the total resource allocation amount of the user to which the file with the lowest priority in the current cache system belongs; and,

[0107] If so, give up caching the requested file.

[0108] Otherwise, delete the file with the lowest priority in the current cache system, cache the requested file in the cache system, and update the total resource allocation of the user to which the file belongs.

[0109] Figure 3 FIG. shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. As shown in the figure, the electronic device may include a processor 31, a memory 32, and a bus 33;

[0110] Among them, the processor 31 and the memory 32 communicate with each other through the bus 33;

[0111] The processor 31 may call the logical instructions of the memory 32 to execute the methods provided by the above method embodiments, for example, including: obtaining a file cache request of a user; determining whether there is unused resources in the current cache system; if not, according to the file cache request, determining the relationship between the access times of the file with the lowest priority in the current cache system and a set threshold; according to different relationships, adopting different resource allocation methods.

[0112] An embodiment of the present application discloses a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above method embodiments, for example, including: obtaining a file cache request of a user; determining whether there is unused resources in the current cache system; if not, according to the file cache request, determining the relationship between the access times of the file with the lowest priority in the current cache system and a set threshold; according to different relationships, adopting different resource allocation methods.

[0113] An embodiment of the present application provides a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium stores computer instructions. The computer instructions cause the computer to execute the methods provided by the above method embodiments, for example, including: obtaining a file cache request of a user; determining whether there is unused resources in the current cache system; if not, according to the file cache request, determining the relationship between the access times of the file with the lowest priority in the current cache system and a set threshold; according to different relationships, adopting different resource allocation methods. Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product 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.

[0114] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate a means for implementing the specified functions in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.

[0115] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction means that implements the specified functions in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.

[0116] It should be noted that, in this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising the element. The orientation or positional relationship indicated by terms such as "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation of the present invention. Unless otherwise expressly specified and limited, the terms "mounted", "connected" and "coupled" shall be construed broadly. For example, it may be a fixed connection, a detachable connection, or an integral connection. It may be a mechanical connection or an electrical connection. It may be directly connected or indirectly connected through an intermediate medium, and may be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention may be understood according to specific circumstances.

[0117] In the description of the present invention, a large number of specific details are set forth. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail so as not to obscure the understanding of this description. Similarly, it should be understood that, in order to streamline the disclosure of the present invention and assist in understanding one or more of the various inventive aspects, in the foregoing description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected by the claims, the inventive aspects lie in less than all of the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate embodiment of the present invention. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present invention is not limited to any single aspect, nor to any single embodiment, nor to any arbitrary combination and / or permutation of these aspects and / or embodiments. Moreover, each aspect and / or embodiment of the present invention may be used alone or in combination with one or more other aspects and / or their embodiments.

[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be covered by the scope of the claims and the description of the present invention.

Claims

1. A long-term resource allocation method for a cache system, characterized in that, The method includes the following steps: Obtain the file caching request of the user; Judge whether there are unused resources in the current caching system; If not, judge whether the access times of the file with the lowest priority in the current caching system are greater than the set threshold; And, If not, judge that the current caching system belongs to the first state and adopt an efficiency resource allocation method; if so, judge that the current caching system belongs to the second state and adopt a fairness resource allocation method; Among them, the efficiency resource allocation method includes the following steps: Judge whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current caching system; If so, delete the file with the lowest priority in the current caching system, cache the requested file in the current caching system, and update the total resource allocation of the user to which the file belongs; The fairness resource allocation method includes the following steps: Judge whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current caching system; and, if so, Judge whether the users to which the requested file and the file with the lowest priority in the current caching system belong are the same; and, if not Judge whether the total resource allocation of the user to which the requested file belongs is greater than the total resource allocation of the user to which the file with the lowest priority in the current caching system belongs; And, If so, abandon caching the requested file; If not, delete the file with the lowest priority in the current caching system, cache the requested file in the caching system, and update the total resource allocation of the user to which the file belongs.

2. The long-term resource allocation method for a cache system according to claim 1, characterized in that, The long-term resource allocation method of the caching system further includes: Judge whether there are unused resources in the current caching system; If so, cache the requested file and update the total resource allocation of the user to which the file belongs.

3. The long-term resource allocation method for a cache system according to claim 1, characterized in that, The efficiency resource allocation method further includes the following steps: Judge whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current caching system; If not, abandon caching the requested file and update the total resource allocation of the user to which the file with the lowest priority in the current caching system belongs.

4. The long-term resource allocation method for a cache system according to claim 1, characterized in that, The fairness resource allocation method further includes the following steps: Judge whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current caching system; and, if so, Judge whether the users to which the requested file and the file with the lowest priority in the current caching system belong are the same; If so, delete the file with the lowest priority in the current caching system, cache the requested file in the caching system, and update the total resource allocation of the user to which the file belongs.

5. The long-term resource allocation method for a cache system according to claim 1, characterized in that, The fairness resource allocation method further includes the following steps: Judge whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current caching system; If not, abandon caching the requested file and update the total resource allocation of the user to which the file with the lowest priority in the current caching system belongs.

6. A long-term resource allocation device for a cache system, applied to a cache system, characterized in that, Includes: A request acquisition module for acquiring the file caching request of the user; A first judgment module for judging whether there are unused resources in the current caching system; A second judgment module for judging the relationship between the access times of the file with the lowest priority in the current caching system and the set threshold; A resource allocation module, which is used to adopt different resource allocation methods according to different relationships between the access times of the file with the lowest priority in the current cache system and a set threshold; When the access times of the file with the lowest priority in the current cache system are less than the set threshold, it is determined that the current cache system belongs to the first state, and an efficiency-based resource allocation method is adopted; otherwise, it is determined that the current cache system belongs to the second state, and a fairness-based resource allocation method is adopted; Among them, the efficiency-based resource allocation method includes the following steps: Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system; If so, delete the file with the lowest priority in the current cache system, cache the requested file in the current cache system, and update the total resource allocation of the user to which the file belongs; The fairness-based resource allocation method includes the following steps: Determine whether the priority of the requested file is greater than the priority of the file with the lowest priority in the current cache system; and if so, Determine whether the users to which the requested file and the file with the lowest priority in the current cache system belong are the same; and if not Determine whether the total resource allocation of the user to which the requested file belongs is greater than the total resource allocation of the user to which the file with the lowest priority in the current cache system belongs; And, If so, abandon caching the requested file; If not, delete the file with the lowest priority in the current cache system, cache the requested file in the cache system, and update the total resource allocation of the user to which the file belongs.

7. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Cache control method and server

    CN107666509A

  • Resource allocation method and device for heterogeneous cache system

    CN111510479A