Resource allocation method based on dynamic programming, network, storage medium and processor

By using a dynamic programming approach to resource allocation, and leveraging the Hestia module and application container orchestration system to optimize resource allocation, the problems of low resource utilization and machine failures in cloud computing clusters have been solved, achieving stable and efficient resource management.

CN116149843BActive Publication Date: 2026-04-14SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
Filing Date
2022-11-28
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing resource allocation algorithms in cloud computing clusters have the risk of low resource utilization and machine failure, and cannot balance stability and efficiency.

Method used

By using a dynamic programming approach to resource allocation, the Hestia module is used for prior testing to record the prior dataset, dynamically adjust resource quotas, optimize resource allocation, and combine the application container orchestration system and scheduling module to select the most suitable machine to allocate resources.

Benefits of technology

It improved resource utilization, avoided resource shortages, ensured stable service quality from applications, and enhanced overall resource allocation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116149843B_ABST
    Figure CN116149843B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of point cloud semantic segmentation, and provides a resource allocation method based on dynamic programming, a network, a storage medium and a processor. The resource allocation method based on dynamic programming records a priori data set through some priori tests when allocating resources to a to-be-deployed application, adjusts the amount of resources provided in the computer through the a priori data set, dynamically adjusts the allocation of resources along with the change of load, and simultaneously achieves the purposes of improving resource utilization and avoiding resource shortage. The method effectively avoids the shortcomings that the existing resource allocation methods cannot balance stability and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of information technology, and in particular relates to a resource allocation method based on dynamic programming, a network and storage medium, and a processor. Background Technology

[0002] Resource scheduling algorithms have been a long-standing research area in cloud computing. Many researchers have conducted in-depth studies on improving resource efficiency for different scenarios. The primary problem that resource scheduling algorithms address is determining the optimal strategy for utilizing the resources of a cluster of physical machines to ensure maximum resource efficiency. These strategies include, but are not limited to, selecting suitable machines during application deployment, dynamically adjusting resource allocation during application runtime, and adjusting application deployment locations to ensure stability when resources on a single physical machine are insufficient. These strategies aim to ensure stable application operation (using the minimum resources required for its operation) while minimizing idle resources across the entire cluster. Resource types are numerous, including but not limited to CPU, memory, network interface cards (NICs), and cache.

[0003] Current technologies require applications to provide two parameters when requesting resources: `request` and `limit`. `request` represents the minimum resources required for the application to run, and `limit` represents the maximum resources the application needs. Existing technologies allocate resources based on these two parameters. Resource allocation algorithms based on the `request` parameter determine whether the remaining resources on the machine can satisfy the requested resource value; if so, the application is launched on the machine. Resource allocation algorithms based on the `limit` parameter determine whether the remaining resources on the machine can satisfy the requested `limit` value, and vice versa.

[0004] When too many applications are deployed, the resource allocation algorithm based on request parameters will result in the sum of all applications' requests approaching the total resources of the entire machine. However, the sum of all applications' limits will exceed the total resources of the entire machine. This means that when some applications suddenly need to use the limit amount of resources, it will lead to insufficient resources on a single machine and cause machine failure.

[0005] While resource allocation algorithms based on the limit parameter will never experience machine failures due to insufficient resources, in most cases, the resources requested by applications (limit-request) are either unused or only minimally used, resulting in low machine resource utilization. Existing technologies have shortcomings. Summary of the Invention

[0006] The purpose of this application is to provide a resource allocation method, network and storage media and processor based on dynamic programming. By accumulating prior knowledge through prior testing of applications to be deployed, the appropriate resource quotas for them under a certain load are determined. With limited overall resources on a single machine, the resource utilization rate is improved compared to previous methods, and the application can provide stable service quality, solving the technical problem of establishing a secure coexistence relationship between authorized users and cognitive users.

[0007] On the one hand, this application provides a resource allocation method based on dynamic programming, including the following steps:

[0008] s1. The application to be deployed requests deployment from the application container orchestration system;

[0009] s2. The application container orchestration system obtains the optimized resource quota value from the Hestia module through the scheduling module, which is optimized from the perspective of improving resource efficiency, and replaces the resource value set by the developer.

[0010] s3. The scheduling module selects the most suitable machine from the cluster based on the optimized quota resource value;

[0011] s4. The application container orchestration system notifies the selected machine to download a copy of the application to be deployed and allocates the corresponding resources.

[0012] On the other hand, this application also provides a resource allocation network that adopts the resource allocation method described above and is based on dynamic programming, including a sequentially connected application container orchestration system, a scheduling module, a Hestia module, and a computer cluster.

[0013] The application container orchestration system accepts deployment requests from applications to be deployed;

[0014] The Hestia module obtains the optimized resource quota value from the perspective of improving resource efficiency, and replaces the resource value set by the developer.

[0015] The scheduling module selects the most suitable machine from the computer cluster based on the optimized quota resource value;

[0016] The application container orchestration system notifies the selected machine to download a copy of the application to be deployed and allocates the corresponding resources.

[0017] On the other hand, this application also provides a storage medium storing program files capable of implementing the above-described dynamic programming-based resource allocation method.

[0018] On the other hand, this application also provides a processor for running a program, wherein the program executes the above-described dynamic programming-based resource allocation method during runtime.

[0019] This application proposes a resource allocation method, network, storage medium, and processor based on dynamic programming. When allocating resources, a prior test dataset is recorded. This dataset is used to rationally adjust resource allocation and dynamically adjust resource allocation according to load changes, thereby improving resource utilization without causing resource shortages. This effectively avoids the shortcomings of existing resource allocation methods that cannot balance stability and efficiency. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the resource allocation method based on dynamic programming in this application;

[0021] Figure 2 This is a flowchart illustrating the specific processes for the prototype resources in this application;

[0022] Figure 3 This application presents a schematic diagram illustrating the main steps of a resource allocation method based on dynamic programming. Detailed Implementation

[0023] To make the purpose, technical solution, and advantages of this application clearer, the following description is provided in conjunction with the appendix. Figure 1-3 The present application will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

[0024] The specific implementation of this application will be described in detail below with reference to specific embodiments:

[0025] Example 1:

[0026] Figure 1-3 The implementation flow of the resource allocation method based on dynamic programming provided in Embodiment 1 of this application is illustrated. For ease of explanation, only the parts related to the embodiments of this application are shown, and are described in detail below:

[0027] like Figure 3 As shown, this application provides a resource allocation method based on dynamic programming, including the following steps:

[0028] s1. The application to be deployed requests deployment from the application container orchestration system;

[0029] s2. The application container orchestration system obtains the optimized resource quota value from the Hestia module through the scheduling module, which is optimized from the perspective of improving resource efficiency, and replaces the resource value set by the developer.

[0030] s3. The scheduling module selects the most suitable machine from the cluster based on the optimized quota resource value;

[0031] s4. The application container orchestration system notifies the selected machine to download a copy of the application to be deployed and allocates the corresponding resources.

[0032] Specifically, attached Figure 1 In this diagram, "application" refers to the application that needs to be deployed. Kubernetes (K8s) is an application container orchestration system on large-scale computing (server) clusters. Its main task is to automate the deployment, planning, operation, and updating of applications. Our application requests deployment from K8s, which then executes an automated process to deploy it to a specified machine. K8s has many modules; here, we mainly designed the scheduling module, also known as the Scheduler module in the diagram. This module selects the most suitable machine from the cluster for deployment based on the characteristics of the application to be deployed and the amount of resources requested. Once the machine is selected, K8s notifies it to download a copy of the application. Then, the machine allocates the pre-requested resources to the application and starts it. At this point, the application is considered successfully deployed.

[0033] The main operation of our algorithm lies in the allocation of resources on a single machine. The original process involved the machine allocating a resource quota from Kubernetes to the application. This quota was set by the application developer. Our algorithm further optimizes this quota, resetting its value from the perspective of improving resource efficiency to achieve the desired result. In other words... Figure 1 The Hestia module updates the quota resource values ​​in the scheduling module, replacing the values ​​(such as request and limit) set by the application developer in the application to be deployed.

[0034] As attached Figure 2 As shown, step s2 includes the following steps:

[0035] s21. The Hestia module determines the application to be deployed. If it is a new application, it performs advance testing to test the service quality of the application under different load levels and resource amounts; it also establishes a priori dataset and stores it in the database.

[0036] The main task of this step is to measure the service quality of a new type of application by varying its resource allocation under different load levels. Specifically, we will test each newly requested application before deployment, increasing its load and resource allocation accordingly to measure its service quality. We quantify service quality by the average access latency under load; the lower the latency, the higher the service quality.

[0037] If it is not a new application, then read the prior dataset corresponding to the application to be deployed from the database;

[0038] s22. Based on the prior dataset, execute a dynamic programming process to determine the specific value of the allocated resource amount.

[0039] Furthermore, the prior dataset is represented as follows:

[0040] f S (R1, R2, ..., L) = QoS S = T requests ;

[0041] T requests S represents the prior dataset, R represents the application, and L represents the resource.

[0042] This prior dataset T requests This allows us to obtain quantitative data on the quality of service that this application can provide under different load conditions and with different resource configurations.

[0043] Furthermore, the resources include CPU resources and memory resources.

[0044] Furthermore, the dynamic programming process in step s22 employs the following dynamic programming transition equation:

[0045] result(S n CPU, mem, L) = min[result(S n 1. CPU total -CPU,mem total -mem,L total -L) (n-1) / n+f S (CPU, mem, L) / n f S CPU total mem total ,L)];

[0046] result(S1, CPU, mem, L) = f S(CPU, mem, L) / f S CPU total mem total ,L);

[0047] Where n represents the nth position, S2 represents the second service, and total represents the maximum machine resources, including CPU. total This represents all CPU resources on the machine;

[0048] The meaning of the dynamic programming transition equation is that the result of the nth service needs to be obtained from the result of the (n-1)th service and the result of the nth service. s Only then can it be calculated. `result()` represents the calculation result of the formula, f s This represents the QoS value of service 's' under resource quotas of R1, R2, ..., L, which is the time taken to complete all requests.

[0049] The meaning of result is a relative value of service quality; CPU represents processor resources; mem represents memory resources.

[0050] Specifically, we define resources as CPU and memory (mem). Through these two formulas, we can obtain the optimal resource state for each application when the total resource limit is limited. This state can ensure that all services provide relatively optimal service quality while maximizing the utilization of machine resources.

[0051] Furthermore, it also includes the following steps:

[0052] s5. If step s1 is not triggered, repeat steps s2 to s4 every minute.

[0053] The system readjusts resource allocation every minute based on application load, effectively improving resource utilization efficiency.

[0054] Furthermore, when an application is to be deployed, the Hestia module will use dynamic programming transition equations to calculate the resource quotas of the applications already deployed on the machine downloading the application and the application to be deployed, and the application container orchestration system will reallocate resources.

[0055] To ensure service quality, calls will be made every minute. This is mainly to prevent the risk of resource shortage caused by a sudden increase in the load of certain applications. Alternatively, when a new application requests deployment, a priori test and quota calculation will be performed simultaneously. The results of the priori test will be stored in the database so that they can be used directly when the same application is deployed in the future.

[0056] Example 2:

[0057] On the other hand, this application also provides a dynamic programming-based resource allocation network that employs the semantic segmentation method described above, including a sequentially connected application container orchestration system, a scheduling module, a Hestia module, and a computer cluster.

[0058] The application container orchestration system accepts deployment requests from applications to be deployed;

[0059] The Hestia module obtains the optimized resource quota value from the perspective of improving resource efficiency, and replaces the resource value set by the developer.

[0060] The scheduling module selects the most suitable machine from the computer cluster based on the optimized quota resource value;

[0061] The application container orchestration system notifies the selected machine to download a copy of the application to be deployed and allocates the corresponding resources.

[0062] Specifically, the dynamic programming-based resource allocation algorithm can adjust the resource allocation of the entire machine in real time according to the load, thereby improving resource utilization. Compared with request-based resource allocation algorithms, it reduces the possibility of resource shortages, and compared with limit-based resource allocation algorithms, it improves the overall resource allocation efficiency of the machine.

[0063] Example 3:

[0064] On the other hand, this application also provides a storage medium storing program files capable of implementing the above-described dynamic programming-based resource allocation method.

[0065] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as ROM / RAM, disk, optical disk, etc.

[0066] Example 4:

[0067] On the other hand, this application also provides a processor for running a program, wherein the program executes the above-described dynamic programming-based resource allocation method during runtime.

[0068] In the embodiments of this application, the resource allocation method based on dynamic programming can be implemented by corresponding hardware or software units. Each unit can be an independent hardware or software unit, or it can be integrated into a single hardware or software unit, which is not intended to limit this application. The specific implementation methods of each unit can be referred to the description in Embodiment 1, and will not be repeated here.

[0069] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A resource allocation method based on dynamic programming, characterized in that, Includes the following steps: s1. The application to be deployed requests deployment from the application container orchestration system; s2. The application container orchestration system obtains the optimized resource quota value from the Hestia module through the scheduling module, which is optimized from the perspective of improving resource efficiency, and replaces the resource value set by the developer in the application to be deployed. s3. The scheduling module selects the most suitable machine from the cluster based on the optimized quota resource value; s4. The application container orchestration system notifies the selected machine to download a copy of the application to be deployed and allocates corresponding resources; Step s2 includes the following steps: s21. The Hestia module determines the application to be deployed. If it is a new application, it performs advance testing to test the service quality of the application under different load levels and resource amounts; it also establishes a priori dataset and stores it in the database. If it is not a new application, then read the prior dataset corresponding to the application to be deployed from the database; s22. Based on the prior dataset, perform a dynamic programming process to determine the optimized quota resource value; The prior dataset is represented as follows: f S (R1, R2, ..., L) = QoS S = T requests ; T requests S represents the prior dataset, R represents the application, and L represents the resource load. The dynamic programming transition equation used in step s22 is as follows: result(S n ,CPU,mem,L) = min[result(S n 1,CPU total -CPU,mem total -mem,L total -L) (n-1) / n+f S (CPU,mem,L) / n f S (CPU total ,mem total ,L)]; result(S1, CPU, mem, L) = f S (CPU, mem, L) / f S (CPU total , mem total ,L); Here, "result" represents the relative value of service quality; "CPU" represents processor resources; "mem" represents memory resources; "n" represents the nth position, S2 represents the second application; and "total" represents the upper limit of machine resources, CPU... total It represents all the CPU resources on the machine.

2. The resource allocation method as described in claim 1, characterized in that, The resources include CPU resources and memory resources.

3. The resource allocation method as described in claim 1, characterized in that, It also includes the following steps: s5. If step s1 is not triggered, repeat steps s2 to s4 every minute.

4. The resource allocation method as described in claim 3, characterized in that, When an application is to be deployed, the Hestia module will use dynamic programming transition equations to calculate the resource quotas of the applications already deployed on the machine that downloaded the application and the application to be deployed. The application container orchestration system will then reallocate the resources.

5. A resource allocation network based on dynamic programming employing the resource allocation method as described in any one of claims 1 to 4, characterized in that, This includes sequentially connected application container orchestration systems, scheduling modules, Hestia modules, and computer clusters; The application container orchestration system accepts deployment requests from applications to be deployed; The Hestia module obtains the optimized resource quota value from the perspective of improving resource efficiency, and replaces the resource value set by the developer. The scheduling module selects the most suitable machine from the computer cluster based on the optimized quota resource value; The application container orchestration system notifies the selected machine to download a copy of the application to be deployed and allocates the corresponding resources.

6. A storage medium, characterized in that, The storage medium stores a program file capable of implementing the dynamic programming-based resource allocation method as described in any one of claims 1 to 4.

7. A processor, characterized in that, The processor is used to run a program, wherein the program executes the resource allocation method based on dynamic programming as described in any one of claims 1 to 4 when it runs.

Citation Information

Patent Citations

  • Dynamic resource quota and scheduling component based on Kubernetes

    CN115297112A