Resource scheduling methods, apparatus, electronic devices and readable storage media
By receiving system request messages, determining the maximum available resources, and allocating them reasonably, the problem of uneven distribution of shared resources is solved, thereby improving system stability and resource utilization efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, the shared resource allocation method results in some systems being unable to obtain resources, affecting system stability and causing uneven resource utilization.
By receiving system request messages, the maximum available resource quantity is determined, and resources are allocated reasonably according to system needs. Priorities and reserved resources are set to ensure that each system allocates the required resources within its maximum available resource quantity.
This improves the rationality of shared resource allocation and the stability of system operation, avoids resource contention, and ensures that resources are used in a balanced manner across all systems.
Smart Images

Figure CN115801700B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network resources, and more specifically, to resource scheduling methods, apparatus, electronic devices, and readable storage media. Background Technology
[0002] With the development of network technology, more and more services are being provided through the internet. Examples include live video streaming services and web page services. Different services are provided through different systems. These systems can be understood as programs that provide network-based services. These programs can run on servers or cloud servers and use resources provided by server providers to offer services to users. For example, a system providing the aforementioned live video streaming service can be called a live video streaming system, and a system used to improve web page loading speed can be called a page acceleration system, and so on.
[0003] As the types of network services provided to users increase, so too do the types of systems used. These systems all operate on the network, and therefore share common resources. These common resources are also known as shared resources. To avoid conflicts when multiple systems use shared resources, it is necessary to schedule the use of shared resources across multiple systems to prevent conflicts arising from simultaneous use of the same shared resources.
[0004] In existing technologies, resource usage conflicts are avoided by locking resources to prevent other systems from using them. For example, when system A needs to use A amount of resources, system A first reserves A amount of resources from shared resources and then sets a flag on the reserved resources (this flag indicates that A amount of resources have been used, i.e., locked). When system B needs to use shared resources, it cannot use the flagged resources and can only use other resources in the shared resources besides those reserved by system A. After system A has used up A amount of resources, the flag is removed, and that portion becomes shared resources again. While this method can resolve shared resource usage conflicts, it does not consider the balance of resource usage. For example, system A may reserve a large amount of resources, resulting in other systems having fewer or no resources available. Therefore, existing resource allocation methods may prevent systems using shared resources from obtaining the corresponding resources, thus affecting the operation of those systems. Summary of the Invention
[0005] This application provides resource scheduling methods, apparatus, electronic devices, and readable storage media to at least address the problem in the prior art where, when allocating shared resources, a system using the shared resources may not be able to obtain the corresponding resources, thus affecting the operation of the system.
[0006] According to one aspect of this application, a resource scheduling method is provided, comprising: receiving a request message from a system, wherein the system is one of multiple systems sharing resources, the request message being used to request resource allocation for the system; determining a maximum available resource amount for the system in the shared resources, and sending the maximum available resource amount to the system; receiving an amount of resources required by the system based on the maximum available resource amount; and allocating resources to the system from the shared resources based on the amount of resources required by the system, wherein the resources allocated to the system are less than or equal to the maximum available resource amount.
[0007] According to another aspect of this application, a resource scheduling method is also provided, comprising: sending a request message, wherein the request message is used to request the allocation of resources for a system, the system being one of multiple systems sharing resources; receiving a maximum available resource quantity corresponding to the system; determining the amount of resources required by the system based on the actual resources required by the system and the maximum available resource quantity, wherein the amount of resources required by the system is less than or equal to the maximum available resource quantity; sending the amount of resources required by the system; and receiving resources allocated to the system from the shared resources, wherein the resources allocated to the system are allocated based on the amount of resources required by the system.
[0008] According to another aspect of this application, a resource scheduling apparatus is also provided, comprising: a first receiving module, configured to receive a request message from a system, wherein the system is one of multiple systems sharing resources, and the request message is used to request resource allocation for the system; a first determining module, configured to determine the maximum available resource amount of the system in the shared resources, and send the maximum available resource amount to the system; a second receiving module, configured to receive the amount of resources required by the system based on the maximum available resource amount; and an allocation module, configured to allocate resources to the system from the shared resources based on the amount of resources required by the system, wherein the resources allocated to the system are less than or equal to the maximum available resource amount.
[0009] According to another aspect of this application, a resource scheduling apparatus is also provided, comprising: a first sending module for sending a request message, wherein the request message is used to request resource allocation for a system, the system being one of multiple systems sharing resources; a third receiving module for receiving the maximum available resource quantity corresponding to the system; a second determining module for determining the amount of resources required by the system based on the actual resources required by the system and the maximum available resource quantity, wherein the amount of resources required by the system is less than or equal to the maximum available resource quantity; a second sending module for sending the amount of resources required by the system; and a third receiving module for receiving resources allocated to the system from the shared resources, wherein the resources allocated to the system are allocated based on the amount of resources required by the system.
[0010] According to another aspect of this application, an electronic device is also provided, including a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the above-described method steps.
[0011] According to another aspect of this application, a readable storage medium is also provided, on which computer instructions are stored, wherein the computer instructions, when executed by a processor, implement the above-described method steps.
[0012] In this embodiment, a method is employed that receives a request message from a system, wherein the system is one of multiple systems sharing resources, and the request message requests resource allocation for the system; determines the maximum available resource amount for the system in the shared resources, and sends the maximum available resource amount to the system; receives the amount of resources required by the system based on the maximum available resource amount; and allocates resources to the system from the shared resources according to the amount of resources required by the system, wherein the resources allocated to the system are less than or equal to the maximum available resource amount. This application solves the problem in the prior art where systems using shared resources may not receive the corresponding resources, thus affecting the system's operation, by improving the rationality of shared resource allocation and thereby improving the operational stability of systems using shared resources. Attached Figure Description
[0013] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0014] Figure 1 This is a flowchart of a resource scheduling method according to an embodiment of this application. Figure 1 ;
[0015] Figure 2This is a schematic diagram of the shared resource aggregation management process according to an embodiment of this application;
[0016] Figure 3 This is a schematic diagram of the process of summarizing shared resources with costs according to an embodiment of this application;
[0017] Figure 4 This is a flowchart of a resource scheduling method according to an embodiment of this application. Figure 2 ;
[0018] Figure 5 This is a schematic diagram illustrating the allocation of shared resources among multiple systems according to an embodiment of this application;
[0019] Figure 6 This is a schematic diagram illustrating the allocation of resources according to priority order based on embodiments of this application; and,
[0020] Figure 7 This is a schematic diagram of the architecture of a CDN network according to an embodiment of this application. Detailed Implementation
[0021] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0022] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0023] Since the systems providing various services all run on the network, these systems inevitably use the same resources, including various computing resources and network resources. The resource scheduling method provided in the following embodiments is not affected by the type of resource; it can be applied to any situation where shared resources need to be scheduled among multiple systems. The systems involved in the following embodiments can include systems providing various services, such as a video system for providing live video streaming services, a web page system for providing web page services, a web page acceleration system for providing web page acceleration, a big data service system for providing big data statistics, and a streaming media system for providing streaming media computing, etc. Because these systems provide different services and have different requirements—for example, a video system for providing live video streaming has high requirements for network latency; a web page system has relatively lower requirements for network latency compared to a live streaming system; a big data service system requires more computing resources, while a streaming media system requires more network resources, etc.—requires resource scheduling based on the actual situation of each system.
[0024] The following implementation provides a resource scheduling method. Figure 1 This is a flowchart of a resource scheduling method according to an embodiment of this application. Figure 1 ,like Figure 1 As shown below, Figure 1 The steps included in the method are explained.
[0025] Step S102: Receive a request message from a system, wherein the system is one of multiple systems that share resources, and the request message is used to request the allocation of resources to the system.
[0026] In an alternative implementation, in order to better manage and schedule shared resources, a system for managing and scheduling shared resources can be set up. In order to distinguish this system from the system that uses shared resources, and considering that the system is used for unified planning and orchestration of shared resources, the system for managing and scheduling shared resources will be referred to as the resource orchestration system in the following implementation. Figure 2 This is a flowchart illustrating the shared resource aggregation and management process according to an embodiment of this application, such as... Figure 2 As shown, a system for resource aggregation can also be set up, i.e. Figure 2The resource aggregation system in the document is used to aggregate resources. This system allows for the input of resources, which are then aggregated into shared resources. The orchestration system manages and schedules these shared resources, allocating them to systems that use them, and ultimately, outputting the shared resources. In practical applications, a single system can perform both the functions of the resource aggregation system and the resource orchestration system. Figure 1 The steps shown can all be performed by the resource orchestration system.
[0027] Step S104: Determine the maximum amount of available resources in the shared resources and send the maximum amount of available resources to the system.
[0028] In this step, the maximum available resource quantity of the system can be pre-configured, or, as another optional implementation, the maximum available resource quantity can be generated based on the type of shared resource and the demand for that type of resource by the services provided by the system. For example, when the shared resource is bandwidth, the video live streaming system has a greater demand for bandwidth resources than the big data processing system used for big data computation and aggregation. Therefore, when allocating bandwidth resources, the maximum available resource quantity of the video live streaming system is greater than that of the big data processing system. Similarly, when the shared resource is storage, the big data processing system has a greater demand for storage resources than the video live streaming system. Therefore, when allocating storage resources, the maximum available resource quantity of the big data processing system is greater than that of the video live streaming system. In this optional implementation, when allocating different types of shared resources, the maximum available resource quantity of the system for that type of shared resource is determined according to the type of shared resource to ensure that the system's demand for different types of shared resources can be met.
[0029] Step S106: Receive the amount of required resources determined by the system based on the maximum available resource amount, wherein the amount of resources required by the system is less than or equal to the maximum available resource amount.
[0030] The above steps yield the maximum amount of available resources that the system can use. This maximum amount of available resources is not the same as the amount of resources required by the system. For example, if a system determines that the maximum amount of available storage resources it can use is 10G (1KB = 1024 bytes, 1MB = 1024KB, 1G = 1024MB), meaning that the actual storage resources required by the system cannot exceed 10G, then if the amount of resources required by the system is 8G, then 8G can be taken as the amount of resources required by the system.
[0031] Step S108: Allocate resources to the system from the shared resources according to the amount of resources required by the system, wherein the resources allocated to the system are less than or equal to the maximum available resource amount.
[0032] This step involves allocating resources based on the amount of resources required by the system. A simple implementation is to allocate resources to the system based on its required amount; for example, if the system requires 8GB of storage, then 8GB can be allocated. However, in actual implementation, the resources used by the system during operation may not be stable, and there may be brief peaks in resource usage (which may exceed the previously calculated amount of resources required by the system). To address this, as an optional implementation, some resources can be added to the required amount (e.g., a predetermined percentage) as the amount of resources allocated to the system. That is, resources equal to or greater than the required amount of resources can be allocated from the shared resources. This optional implementation provides protection against sudden increases in resources during actual system operation. In the example above, resources can be increased by 10%, that is, 8G * 10% = 0.8G of resources. At this time, the amount of resources required by the system is 8G, but the amount of resources allocated to the system is 8.8G. It should be noted that the amount of resources finally allocated to the system is less than or equal to the maximum available resources of the system.
[0033] In this step, resources are allocated from the shared resources according to the amount of resources required by the system, and the resources allocated to the system will not exceed the maximum available resources corresponding to the system. If there are still resources remaining in the maximum available resources after the resources are allocated, the remaining resources are put back into the shared resources for resource allocation to other systems.
[0034] In the above steps, all systems that need to use shared resources allocate resources within their corresponding maximum available resource amounts. This ensures that there is an upper limit to the resources allocated to each system, preventing some systems from grabbing shared resources without restraint. The above steps solve the problem caused by the uneven allocation of shared resources in the prior art, improve the rationality of shared resource allocation to a certain extent, and thus improve the operational stability of systems using shared resources.
[0035] The maximum available resource quantity for different systems can be pre-configured or related to the system's priority. In one optional implementation, priorities can be introduced, with different priorities corresponding to different maximum available resource quantities. When allocating shared resources, allocation is performed according to the maximum available resource quantity corresponding to the system's priority, in order to satisfy the shared resource needs of each system as much as possible. Specifically, determining the maximum available resource quantity of a system in the shared resources can include the following steps: obtaining the system's priority; and determining the maximum available resource quantity of the system in the shared resources based on the system's priority.
[0036] The system priority can be pre-configured or, as an alternative implementation, can be generated based on the type of shared resource and the demand of the services provided by the system for that type of resource. For example, when the shared resource is bandwidth, a live video streaming system has a greater demand for bandwidth than a big data processing system used for big data computation and aggregation; therefore, the live video streaming system has a higher priority than the big data processing system when allocating bandwidth resources. Similarly, when the shared resource is storage, a big data processing system has a greater demand for storage than a live video streaming system; therefore, the big data processing system has a higher priority than the live video streaming system when allocating storage resources. In this alternative implementation, the maximum available resource amount corresponding to the system is related to its own priority. When allocating different types of shared resources, the system priority is determined according to the type of shared resource to ensure that the system's demand for different types of shared resources can be met.
[0037] In multiple systems sharing resources, higher-priority systems typically consume more resources than lower-priority systems. This means higher-priority systems have more control over resource allocation. However, this can lead to a situation where higher-priority systems may experience resource shortages. To ensure sufficient resources, higher-priority systems could preempt resources from lower-priority systems. While this approach guarantees adequate resources for higher-priority systems, resource preemption can significantly impact the operation of lower-priority systems, potentially causing them to malfunction. To address this, the maximum available resource amount corresponding to the system's priority is used as the upper limit for resource allocation. This prevents higher-priority systems from preempting resources from lower-priority systems. In the above implementation, considering that the maximum available resource amount is the upper limit of resources the system can use, the required resource amount is determined by fully considering various scenarios and aiming to meet the system's maximum demand. In one optional implementation, if resources are added to the amount required by the system, and the increased amount is used as the resources allocated to the system, the amount of added resources can be determined based on the system's priority. Higher priority systems can receive larger increases in resource allocation, but the final allocated resources cannot exceed the maximum available resource amount. This optional implementation provides a certain level of resource redundancy to ensure the stability of system resource usage. Furthermore, it limits the resources used by high-priority systems, ensuring that all priority systems receive corresponding shared resources, thus guaranteeing a balanced distribution of resources among the systems.
[0038] The above optional implementation sets an upper limit on the use of shared resources by systems of different priorities, which can ensure the balance of resource allocation to a certain extent. However, considering the complexity of the actual environment, there may still be situations where the resources allocated to the system are insufficient. To solve this problem, as an optional implementation, resource reservation can be used. That is, a portion of resources is reserved in advance, wherein the reserved resources do not participate in the resource allocation among the multiple systems; after allocating resources to the multiple systems, a second request message is received from at least one of the multiple systems, wherein the second request message is used to instruct the system sending the second request message to add resources on top of the already allocated resources; resources are allocated from the reserved resources to the system that sent the second request message. For example, if the total shared storage resources are 1000G, when allocating storage resources to multiple systems, a certain percentage of resources (5% to 10%) is reserved from the 1000G as reserved resources. If 10% is reserved as reserved resources, then 1000G * 10% = 100G of storage resources will not be allocated among the multiple systems as shared resources.
[0039] The reserved resources can be used as backup resources. For example, when a new system using shared resources is added, the reserved resources can be allocated to the new system. Considering that adding new systems is not frequent, the reserved resources are more often used when systems with allocated resources are short of resources. In this case, if only one system requests additional resources from the reserved resources, resources can be allocated directly according to the request. If multiple systems request resources from the reserved resources, allocation is based on system priority. That is, allocating resources from the reserved resources to the system that sent the second request message includes: when receiving second request messages from at least two systems, allocating resources from the reserved resources to the at least two systems in descending order of priority. In the example above, the reserved resources are 100G. The system receives a second request message from two systems, where system A has a higher priority than system B. System A requests to allocate 80G of storage resources, while system B requests to allocate 30G of storage resources. At this time, system A is given priority in allocating 80G of storage resources. Then, the remaining storage resources of 100G-80G=20G are allocated to system B, and system B is notified that only 20G of resources remain.
[0040] When using shared resources, each system desires more resources for better speed and stability. However, resources are finite. Therefore, the resource orchestration system determines the maximum available resources a system can use based on its priority. Then, it determines the amount of resources allocated based on the required resources (the resources allocated to the system are also called the resources occupied by the system). It's important to note that resource usage also incurs costs. Systems using these shared resources desire autonomy in resource allocation, meaning they want to determine the amount of resources they need based on resource costs and the system's actual situation. Figure 3 This is a schematic diagram of the process of aggregating shared resources with costs according to an embodiment of this application, such as... Figure 3 As shown, after the resource aggregation system aggregates resources to obtain shared resources, the billing rule system can import billing rules into the shared resources, thus obtaining the usage cost of the shared resources. In this way, the amount of resources required by each system can be determined by each system according to its own needs. Figure 4 This is a flowchart of a resource scheduling method according to an embodiment of this application. Figure 2 , Figure 4 This is described from the perspective of systems that use shared resources, such as... Figure 4 As shown below, Figure 4 The steps involved are explained.
[0041] Step S402: Send a request message, wherein the request message is used to request the allocation of resources for the system, and the system is one of multiple systems that share resources.
[0042] Step S404: Receive the maximum available resource quantity corresponding to the system;
[0043] Step S406: Determine the amount of resources required by the system based on the actual resources required by the system and the maximum available resources, wherein the amount of resources required by the system is less than or equal to the maximum available resources;
[0044] Step S408: Send the amount of resources required by the system;
[0045] Step S410: Receive resources allocated to the system from the shared resources, wherein the resources allocated to the system are allocated according to the amount of resources required by the system.
[0046] Through the above steps, the system can determine the amount of resources required by the system based on its maximum available resources. On the one hand, the system has a certain degree of autonomy in determining the amount of resources used for shared resources. On the other hand, the resources used by the system are also limited by the maximum available resources, thereby ensuring the balance of resource allocation among various systems and providing stability for the operation of multiple systems.
[0047] In one implementation, the resource orchestration system and multiple systems sharing resources can be considered as a single resource scheduling system. In this system, a system awaiting allocation of shared resources sends a request message; the resource orchestration system receives the request message from the system awaiting allocation; the resource orchestration system obtains the priority of the system and, based on the priority, obtains the maximum available resource quantity corresponding to that system, and sends the maximum available resource quantity to the system; the system receives the maximum available resource quantity and determines the amount of resources required by the system from it; the system sends the required resources to the resource orchestration system; the resource orchestration system receives the required resources and allocates resources to the system from the maximum available resource quantity based on the required resources; the system receives and uses the resources allocated to it.
[0048] In the above steps, when allocating resources, the priorities of the multiple systems can be obtained, and resources are then allocated in descending order of priority. The maximum amount of available resources that the system with the highest priority among the multiple systems can use is all the shared resources. The maximum amount of available resources that other priority systems can use is the amount of remaining resources in the shared resources, where the remaining resources are the resources remaining after deducting the resources occupied by other systems with higher priorities. Figure 5 This is a schematic diagram illustrating the allocation of shared resources among multiple systems according to an embodiment of this application, such as... Figure 5As shown, System 1 has a higher priority than System 2, System 2 has a higher priority than System 3, and System 3 has a higher priority than System 4. The resource orchestration system first allocates all shared resources as the maximum available resource for System 1. Then, System 1 allocates 30% of its shared resources as its own resources. The remaining shared resources are allocated as the maximum available resource for System 2, and System 2 allocates another 30% of its remaining shared resources as its own resources. The remaining shared resources after allocation by System 2 are allocated as the maximum available resource for System 3, and System 3 allocates another 50% of its remaining shared resources as its own resources. The remaining shared resources after allocation by System 3 are allocated as the maximum available resource for System 4, and System 4 allocates another 30% of its remaining shared resources as its own resources. After allocation by the four systems, the remaining resources can be reserved for future allocation when a new system joins or when the resources of the four systems are insufficient.
[0049] Figure 6 This is a schematic diagram illustrating the allocation of resources according to priority order based on an embodiment of this application, as shown below. Figure 6 As shown, System A, being the highest priority system, has all of its shared resources (i.e., the maximum available resources). The resource orchestration system allocates 60% of its visible resources to System A. System B has a lower priority than System A but a higher priority than System C. Its visible resources are the resources remaining after the resource orchestration system allocated resources to System A. The resource orchestration system allocates 60% of System B's visible resources to System B. System C has the lowest priority, and no other system shares this resource after System C. System C's visible resources are the resources remaining after allocating resources to Systems A and B. Since System C is the last system to allocate this shared resource, the resource orchestration system allocates all (100%) of its visible resources to System C. It should be noted that... Figure 6 The reserved resources have not been used in the allocation of shared resources. Figure 6When System B determines its resource needs, it cannot exclusively possess all visible resources because System C has not yet allocated any resources. As an alternative implementation, when allocating shared resources according to system priority, each system can also consider systems that have not yet been allocated resources when determining the amount of resources it needs. For example, determining the amount of resources needed by a system based on its actual resource needs and the maximum available resource quantity includes: if the actual resource needs are less than the maximum available resource quantity, using the actual resource needs as the required resource quantity; if the actual resource needs are greater than or equal to the maximum available resource quantity, and there are other systems with lower priority than the system that have not yet allocated resources, obtaining a portion of the resources from the maximum available resource quantity as the required resource quantity; wherein, the portion of resources is determined based on the priority of the system and other systems with lower priority, with higher priority systems obtaining more resources from the maximum available resource quantity.
[0050] The resource allocation methods described above can be applied to various networks or other networks or scenarios. The following explanation uses a Content Delivery Network (CDN) as an example. A CDN is a network built on top of an existing network for content distribution. CDNs distribute content through load balancing, resource scheduling, and other technologies, enabling users to access the content they need from the nearest location, reducing network congestion, and increasing the speed at which users can access the content they require. Figure 7 This is a schematic diagram of the CDN network architecture according to an embodiment of this application, as shown below. Figure 7 As shown, the origin server, as the content provider, delivers content to CDN nodes. Users in different locations can choose the nearest CDN node to retrieve the content, improving retrieval speed. CDN nodes are located at the edge of the network, closer to users, and therefore also... Figure 7 CDN nodes in the network are called edge nodes, except for Figure 7 In addition to the edge nodes shown, intermediate nodes can also be set between the edge nodes and the source station. Figure 7 (Not shown in the image) These intermediate nodes can obtain content from the source site and distribute the obtained content to the edge nodes. In the following implementation, intermediate nodes and edge nodes are collectively referred to as nodes.
[0051] In a CDN network, each node is used for content delivery and storage; therefore, a node can also be considered a resource used in the CDN. Links are needed between nodes for content transmission, and these links can also be considered resources used in the CDN. It should be noted that each node can include multiple physical servers, which can be divided into multiple groups. Different groups can provide different services, and these groups can also be considered resources. Various types of content can be distributed using a CDN network. For example, video systems can use CDNs to distribute videos, and web systems can use CDNs to distribute web pages. When these systems use CDNs for content distribution, the shared resources are the resources used for content distribution within the content distribution network, such as nodes, groups, and links. In this optional embodiment, video systems, web systems, and other systems that use CDNs for content distribution are referred to as components.
[0052] CDNs are not only used for content distribution by video and web systems; in fact, multiple components (i.e., systems using CDNs for content distribution) share resources. As the number of components (i.e., systems) increases, resource conflicts can occur if these components do not coordinate their resource usage. This implementation introduces a resource orchestration system to resolve conflicts arising from multiple components using shared resources. Because shared resources are complex, the resource orchestration system can extract usable shared resources for easier resource scheduling, achieving unified orchestration of shared resources (which can be resources across the entire CDN network), thus avoiding conflicts and resource waste caused by different components.
[0053] In this optional implementation, the priority of different types of resources used by each component is managed, and shared resources are allocated and controlled according to priority. Furthermore, resource monitoring methods can be added to issue alarms when resources are used abnormally. For example, when allocating node resources to components 1, 2, and 3, component 1 has a higher priority than component 2, and component 2 has a higher priority than component 3. Edge nodes A, B, and C are allocated to component 1, with node A's resources being dedicated to component 1. Nodes B and C are allocated to component 2, with node B being shared by components 1 and 2. Nodes B and C are allocated to component 3, with node C being shared by components 1, 2, and 3. When monitoring the traffic of nodes A, B, and C, it is found that the traffic of component 1 in node C is greater than the traffic of component 1 in node A. This indicates that node A allocated to component 1 is not being fully utilized, and an alarm can be issued at this time.
[0054] When allocating shared resources, a component queries the maximum available resource amount it can use based on the resource name (e.g., node name, group name, link name). The resource orchestration system obtains the maximum available resource amount that the component can use from the queried shared resources based on the component's identification information, component priority, and the resource queried by the component. The maximum available resource amount for each component can be obtained based on the component's priority, the number of components using the shared resource, and the remaining resources. After obtaining the maximum available resource amount, the system returns it to the component. The component performs resource planning based on the maximum available resource amount, calculates the resources planned to be used on nodes, groups, and links in this round of planning, and reports it to the resource orchestration system (carrying the component name and resource name in the reported message). For each type of resource, a certain buffer can also be reserved. The resources in this buffer are reserved for use when component resources are insufficient. If components of different priorities all request to use the reserved resource, the higher-priority component will preempt the lower-priority component to a certain extent (i.e., prioritize satisfying the needs of the higher-priority component).
[0055] When policy components of different priorities use resources simultaneously, high-priority components have absolute priority in preempting shared resources. Low-priority components can only see the remaining resources after high-priority components have allocated them. If high-priority components preempt too much shared resource, it will affect low-priority components. In this optional implementation, a certain percentage of resource usage can be configured as a maximum (i.e., the maximum available resource amount, also known as a quota) for each component, achieving hard resource isolation. Through resource quotas, the impact of high-priority components preempting resources on low-priority components is reduced or even eliminated. The pre-defined priority and quota work together to allocate currently available resources to the component, increasing system stability.
[0056] It should be noted that the aforementioned resource orchestration system can be used solely for the allocation of shared resources. This means the system does not interfere with the services provided by individual components. In this way, resource scheduling and service provision can be delegated to different systems. Each component focuses on ensuring the proper functioning of its services, while resource scheduling is handled by the resource orchestration system. This makes resource allocation clearer and improves the stability of the CDN network. In short, the resource orchestration system coordinates multiple components, eliminating separate management of resource allocation among them, removing complex and confusing resource reservation relationships, and unifying resource management.
[0057] In this embodiment, an electronic device is provided, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to perform the methods described in the above embodiments.
[0058] The aforementioned program can run on a processor or be stored in memory (or computer-readable medium). Computer-readable medium includes both permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable medium does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0059] These computer programs may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes can be implemented using different modules, and different steps can be implemented using different modules.
[0060] This embodiment provides such a device. This device is called a resource scheduling device, and the modules within this device correspond to… Figure 1 The steps shown in the diagram indicate that the apparatus includes: a first receiving module for receiving a request message from a system, wherein the system is one of multiple systems sharing resources, and the request message is for requesting resource allocation for the system; a first determining module for determining the maximum available resource amount of the system in the shared resources and sending the maximum available resource amount to the system; a second receiving module for receiving the amount of resources required by the system based on the maximum available resource amount; and an allocation module for allocating resources to the system from the shared resources based on the amount of resources required by the system, wherein the resources allocated to the system are less than or equal to the maximum available resource amount.
[0061] Optionally, the allocation module is used to allocate resources from the shared resources that are equal to or greater than the amount of resources required by the system.
[0062] Optionally, the first determining module is used to obtain the priority of the system; and determine the maximum amount of available resources of the system in the shared resources based on the priority of the system.
[0063] Optionally, the maximum amount of available resources that the highest priority system in the plurality of systems can use is all the shared resources. The maximum amount of available resources that other priority systems can use is the amount of remaining resources in the shared resources, wherein the remaining resources are the resources remaining in the shared resources after deducting the resources occupied by other systems with higher priority than this system.
[0064] Optionally, the first receiving module is further configured to receive a second request message sent by at least one of the plurality of systems, wherein the second request message is used to instruct the system sending the second request message to add resources based on the already allocated resources; the allocation module is further configured to allocate resources from reserved resources to the system sending the second request message, wherein the reserved resources are not involved in the resource allocation of the plurality of systems.
[0065] Optionally, the allocation module is configured to, upon receiving a second request message from at least two systems, allocate resources to the at least two systems from the reserved resources in descending order of their priorities.
[0066] In another embodiment, another resource scheduling apparatus is also provided, wherein the modules in the apparatus correspond to Figure 4 The steps shown in the diagram indicate that the apparatus includes: a first sending module for sending a request message, wherein the request message requests resource allocation for a system, the system being one of multiple systems sharing resources; a third receiving module for receiving the maximum available resource amount corresponding to the system; a second determining module for determining the amount of resources required by the system based on the actual resources required by the system and the maximum available resource amount, wherein the amount of resources required by the system is less than or equal to the maximum available resource amount; a second sending module for sending the amount of resources required by the system; and a third receiving module for receiving resources allocated to the system from the shared resources, wherein the resources allocated to the system are allocated based on the amount of resources required by the system.
[0067] Optionally, the second determining module is configured to: when the amount of resources actually required by the system is less than the maximum available resource amount, use the amount of resources actually required by the system as the amount of resources required by the system; when the amount of resources actually required by the system is greater than or equal to the maximum available resource amount, and there are other systems with a lower priority than the system that have not yet been allocated resources, obtain a portion of the resources from the maximum available resource amount as the resources required by the system; wherein, the portion of resources is determined based on the priority of the system and the other systems with a lower priority than the system, and the higher the priority, the more resources are obtained from the maximum available resource amount.
[0068] Optionally, the plurality of systems are systems that use a content delivery network to distribute content, and the shared resources include resources in the content delivery network used for content distribution.
[0069] The above-described apparatus is used to implement the functions of the methods in the above embodiments. Each module in the system or apparatus corresponds to each step in the method, as has already been described in the method and will not be repeated here.
[0070] The above optional implementation methods solve the problem in the prior art where a system using a shared resource may not be able to obtain the corresponding resources when allocating shared resources, thus affecting the operation of the system. This improves the rationality of shared resource allocation and thus improves the operational stability of the system using shared resources.
[0071] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A resource scheduling method, comprising: Receive a request message from a system, wherein the system is one of multiple systems that share resources, and the request message is used to request the allocation of resources to the system; Determine the maximum amount of available resources in the shared resources and send the maximum amount of available resources to the system; Receive the amount of required resources determined by the system based on the maximum available resource quantity; Allocate resources from the shared resources that are equal to or greater than the amount of resources required by the system, wherein the resources allocated to the system are less than or equal to the maximum available resource amount.
2. The method according to claim 1, wherein, Determining the maximum amount of available resources for the system in the shared resources includes: Obtain the priority of the system; The maximum amount of available resources for the system in the shared resources is determined based on the system's priority.
3. The method according to claim 2, wherein, The maximum amount of available resources that the highest priority system in the plurality of systems can use is all of the shared resources. The maximum amount of available resources that other priority systems can use is the amount of remaining resources in the shared resources, wherein the remaining resources are the resources remaining in the shared resources after deducting the resources occupied by other systems with higher priority than the current system.
4. The method according to any one of claims 1 to 3, wherein, After allocating resources to the plurality of systems, the method further includes: Receive a second request message sent by at least one of the plurality of systems, wherein the second request message is used to instruct the system sending the second request message to increase resources based on the already allocated resources; Resources are allocated from the reserved resources to the system that sent the second request message, wherein the reserved resources are not involved in the resource allocation of the multiple systems.
5. The method according to claim 4, wherein, Allocating resources from the reserved resources to the system that sent the second request message includes: Upon receiving a second request message from at least two systems, resources are allocated to the at least two systems from the reserved resources in descending order of their priority.
6. The method according to any one of claims 1 to 3, wherein, The multiple systems are systems that use a content delivery network to distribute content, and the shared resources include resources in the content delivery network used for content distribution.
7. A resource scheduling method, comprising: Send a request message, wherein the request message is used to request the allocation of resources for a system, which is one of multiple systems that share resources; Receive the maximum available resource quantity corresponding to the system; The amount of resources required by the system is determined based on the actual resources required by the system and the maximum available resources, wherein the amount of resources required by the system is less than or equal to the maximum available resources. Send the amount of resources required by the system; Receive resources allocated to the system from the shared resources, wherein the resources allocated to the system are allocated according to the amount of resources required by the system, and the amount of resources allocated to the system is greater than or equal to the amount of resources required by the system.
8. The method according to claim 7, wherein, Determining the amount of resources required by the system based on the actual resources needed by the system and the maximum available resources includes: If the actual amount of resources required by the system is less than the maximum amount of available resources, the actual amount of resources required by the system shall be taken as the amount of resources required by the system. If the actual amount of resources required by the system is greater than or equal to the maximum available resources, and there are other systems with lower priority than the system that have not yet been allocated resources, a portion of the resources shall be obtained from the maximum available resources as the resources required by the system; wherein, the portion of resources is determined according to the priority of the system and the other systems with lower priority than the system, and the higher the priority, the more resources shall be obtained from the maximum available resources.
9. A resource scheduling device, comprising: The first receiving module is configured to receive a request message from a system, wherein the system is one of multiple systems that share resources, and the request message is used to request the allocation of resources to the system. The first determining module is used to determine the maximum amount of available resources in the shared resources of the system, and send the maximum amount of available resources to the system; The second receiving module is used to receive the amount of required resources determined by the system based on the maximum available resource quantity; An allocation module is configured to allocate resources from the shared resources that are equal to or greater than the amount of resources required by the system, wherein the resources allocated to the system are less than or equal to the maximum available resource amount.
10. A resource scheduling device, comprising: The first sending module is used to send a request message, wherein the request message is used to request the allocation of resources for the system, and the system is one of multiple systems that share resources. The third receiving module is used to receive the maximum available resource quantity corresponding to the system; The second determining module is used to determine the amount of resources required by the system based on the actual resources required by the system and the maximum available resources, wherein the amount of resources required by the system is less than or equal to the maximum available resources. The second sending module is used to send the amount of resources required by the system; The third receiving module is configured to receive resources allocated to the system from the shared resources, wherein the resources allocated to the system are allocated according to the amount of resources required by the system, and the amount of resources allocated to the system is greater than or equal to the amount of resources required by the system.
11. An electronic device comprising a memory and a processor; wherein, The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps of any one of claims 1 to 6 or any one of claims 7 to 8.
12. A readable storage medium having computer instructions stored thereon, wherein, When executed by a processor, the computer instructions implement the method steps of any one of claims 1 to 6 or any one of claims 7 to 8.
Citation Information
Patent Citations
Method for resource planning method in communication system
CN1510935A
Protection of resource information based on dynamic assignment of resources in a wireless network
US20170318022A1
Method and device for sharing ABIS resources
WO2011075919A1