A method and device for allocating computing power resources

By setting up a variety of resource pools and queues in the public cloud environment and scheduling tasks according to user type and resource margin, the problem of dynamic scheduling of computing power resources in the public cloud is solved, and resource utilization and user management efficiency are improved.

CN112988390BActive Publication Date: 2024-11-01SHANGHAI SUPERCOMPUTING CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110303914.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-22
Publication Date
2024-11-01
Estimated Expiration
2041-03-22

AI Technical Summary

Technical Problem

Difficult to dynamically schedule computing resources in public cloud environments, resulting in low resource utilization, waste of resources and complex user data management.

Method used

By setting up a variety of resource pools and queues, receiving task requests with user type tags, initial allocation is made based on user type and resource margin, monitoring resource requirements, and scheduling is performed according to task priority and user scores to ensure effective resource utilization.

Benefits of technology

Automatic scheduling and management of computing power resources is realized, resource utilization is improved, user management difficulty is reduced, and resource waste is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112988390B_ABST
    Figure CN112988390B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for allocating computing power resources, including: receiving a task request with a user type mark; initially allocating the task request according to the user type; calculating the computing power resource surplus according to the user type and the computing power resource used by the user, if the computing power resource surplus of the user meets the computing power resource demand of the task request, then controlling the task request to enter the selected queue in the selected resource pool, otherwise, controlling the task request to enter the user's task request queue; when it is monitored that the computing power resource surplus of the user meets the computing power resource demand of the task request, scheduling the task request from the user's task request queue to enter the selected queue in the selected resource pool. The present invention can provide users with multiple choices and automatically schedule and manage the user's multiple computing power resource demands by setting multiple resource pools and queues, and further realize multiple scheduling through threshold setting, thereby improving the utilization rate of computing power resources and avoiding resource waste.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a computing resource allocation method and device. Background Art

[0002] Commonly used public cloud environments mainly provide GPU bare computing power rental or algorithm layer SaaS services. Taking the heterogeneous computing power services of cloud service providers as an example, they are usually divided into the following categories:

[0003] 1. GPU bare computing service, providing cloud servers equipped with CPU+GPU in the form of bare servers;

[0004] 2. AI labeling service: Combined with application scenarios such as product labeling and license plate recognition, it provides users with online labeling services;

[0005] 3. AI model development: Based on model annotation, the model is adjusted online using a small amount of data. This requires certain heterogeneous computing power such as GPU, but the demand is fragmented.

[0006] 4. AI model training: Based on labeling and model development, training is performed using a large amount of data. This stage requires a large amount of computing resources.

[0007] 5. AI inference service: Based on the massive computing nodes of the public cloud, it provides automatic load balancing, dynamic capacity expansion, and services for multiple industry fields such as image recognition and natural language processing.

[0008] The above service processes on the public cloud require different amounts of computing resources, and it is currently difficult to dynamically schedule computing resources. They are divided into several products and provided to users in the form of computing power plus services, which leads to complex user data management, slow resource scheduling, and low resource utilization. Therefore, it is necessary to propose further solutions to the above problems. Summary of the invention

[0009] The present invention aims to provide a computing resource allocation method and device to overcome the deficiencies in the prior art.

[0010] In order to solve the above technical problems, a technical solution of the present invention is:

[0011] A computing resource allocation method, comprising:

[0012] Receive a task request with a user type tag, wherein the task request includes task type, task duration, computing resource requirement, task priority, resource pool selection, and queue selection;

[0013] Initially allocating the task request according to the user type, and controlling the task request to enter the next step if a first condition is met, otherwise controlling the task request to enter the selected queue in the selected resource pool;

[0014] Calculate the remaining computing power resources of the user according to the user type and the computing power resources used by the user; if the remaining computing power resources of the user meet the computing power resource demand of the task request, control the task request to enter the selected queue in the selected resource pool; otherwise, control the task request to enter the task request queue of the user;

[0015] When it is monitored that the computing power resource surplus of the user meets the computing power resource demand of the task request, the task request is scheduled from the task request queue of the user to enter the selected queue in the selected resource pool.

[0016] In a preferred embodiment of the present invention, when the task request is located in the selected queue in the selected resource pool,

[0017] Determine computing resources according to the matching degree between the computing resource demand of the task request and the idle resources in the selected resource pool, and dispatch them to the task; or,

[0018] According to the queue sorting, the computing resources are determined according to the user score and the computing resource demand requested by the task, and are scheduled to the task.

[0019] In a preferred embodiment of the present invention, when the amount of computing power resources scheduled for the task is less than its computing power resource demand, the computing power resource occupancy rate of the task is detected according to a preset time period. If the computing power resource occupancy rate reaches the scheduling threshold, the computing power resources are determined again based on the user score and the computing power resource demand requested by the task until the cumulative amount of computing power resources scheduled for the task is equal to the computing power resource demand.

[0020] In a preferred embodiment of the present invention, the user score is evaluated based on the cooperation index of the current year, the number of paid years in the previous n years, and the user focus index.

[0021] In a preferred embodiment of the present invention, the user score F>20, then the maximum value of the scheduled computing resources ≤M, where:

[0022] F=5a+2b+5c, M is the number of GPU cards,

[0023] a is the cooperation index for this year. If the contract has been signed and payment has been made, the index is 2; if the contract has been signed but payment has not been made, the index is 1; b is the number of paid years in the previous five years; c is the user focus index. The index for long-term key users is 2, and the index for short-term key users is 1.

[0024] Another technical solution of the present invention is:

[0025] A computing resource allocation device, comprising:

[0026] A receiving module, used to receive a task request with a user type tag, wherein the task request includes a task type, a task duration, a computing resource requirement, a task priority, and a resource pool selection and a queue selection;

[0027] A primary allocation module, used for initially allocating task requests according to the user type, and controlling the task request to enter the secondary allocation module if a first condition is met, otherwise controlling the task request to enter the selected queue in the selected resource pool;

[0028] A secondary allocation module, used to calculate the remaining computing power resources of the user according to the user type and the computing power resources used by the user, and if the remaining computing power resources of the user meet the computing power resource demand of the task request, control the task request to enter the selected queue in the selected resource pool; otherwise, control the task request to enter the task request queue of the user;

[0029] A monitoring module is used to monitor the computing power resource surplus of the user. When it is monitored that the computing power resource surplus of the user meets the computing power resource demand of the task request, the task request is scheduled from the task request queue of the user to the selected queue in the selected resource pool.

[0030] In a preferred embodiment of the present invention, it also includes:

[0031] A scheduling module is used to determine the computing power resources according to the matching degree between the computing power resource demand of the task request and the free resources in the selected resource pool, and schedule them to the task when the task request is located in the selected queue in the selected resource pool; or, according to the queue sorting, determine the computing power resources according to the user score and the computing power resource demand of the task request, and schedule them to the task.

[0032] In a preferred embodiment of the present invention, it also includes:

[0033] The continuous scheduling module is used to detect the computing resource utilization rate of the task according to a preset time period when the computing resource utilization rate scheduled for the task is less than its computing resource demand. If the computing resource utilization rate reaches the scheduling threshold, the computing resource is determined again based on the user score and the computing resource demand requested by the task until the cumulative scheduled computing resource is equal to the computing resource demand.

[0034] Another technical solution of the present invention is:

[0035] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above methods when executing the computer program.

[0036] Another technical solution of the present invention is:

[0037] A computer-readable storage medium stores a computer program for executing any of the above methods.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] By setting up multiple resource pools and queues, the present invention can not only provide users with multiple choices, but also automatically schedule and manage users' various computing resource needs, thereby reducing the difficulty of user management. It can further achieve multiple scheduling through threshold setting, improve computing resource utilization, and avoid resource waste. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 is a flow chart of the present invention;

[0042] Figure 2 It is a schematic block diagram of the computing power resource allocation device of the present invention. DETAILED DESCRIPTION

[0043] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0044] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0045] like Figure 1 As shown, a computing resource allocation method includes:

[0046] Step S1: Receive a task request with a user type tag, where the task request includes task type, task duration, computing resource requirements, task priority, resource pool selection, and queue selection.

[0047] The user type is related to their resource pool selection. For example, user types include paid users and non-paid users, corresponding to shared resource pools and exclusive resource pools. This method divides computing power resources into shared resource pools and exclusive resource pools in a preset ratio. Generally speaking, it is divided into shared resource pools and exclusive resource pools in a ratio of 2:8. The shared resource pool is for all users, and the exclusive resource pool is only for paid users. It can be understood that the resource pool division ratio can also be other, and can also be adjusted according to actual conditions to avoid resource overload. The system user end or server end provides resource pool options for users to choose according to different user types. Similarly, it is not limited to the two user types of paid users and non-paid users, nor is it limited to the two resource pools of shared resource pools and exclusive resource pools.

[0048] Task types include at least model development and model training. Model development tasks require fewer computing resources and generally involve online debugging of algorithms and parameters. Users can choose shared resource pools or exclusive resource pools. Model training tasks require more computing resources and generally limit users to only exclusive resource pools to avoid the computing resources in shared resource pools being quickly occupied. Task type options can be provided by the system user end or server end according to different user types, or the system user end or server end can determine whether the task type selection meets the requirements based on the user type.

[0049] Task duration refers to the time required to complete a task, so that the user or server can control the time the user occupies computing resources and improve the utilization rate of computing resources.

[0050] The computing power resource demand refers to the amount of computing power resources that the user expects to need for the task, which generally includes the number of CPU cores and GPU memory. The computing power resource demand also affects the queue selection.

[0051] This method provides two queues. The queued tasks in the first queue are managed in a first-in-first-out manner. Specifically, the tasks created first have priority in obtaining the resources required for operation, and the way in which the tasks obtain resources must be configured according to the order in the task queue. The application scenario of this queuing algorithm is suitable for non-urgent tasks; the queued tasks in the second queue are decided according to the principle of resource priority satisfaction, and the tasks that meet the high-priority resources are selected from the queuing queue first. The application scenario of this queuing algorithm is suitable for urgent tasks, which can better utilize resources to complete tasks and is relatively flexible.

[0052] The user end or the server end provides different queue options according to the computing power resource requirements. Preferably, for computing power tasks within 2 GPU cards, the first queue option and the second queue option are provided; for computing power tasks exceeding 2 GPU cards, only the first queue option is provided. By dividing the computing power resource requirements of the two GPU cards, it is ensured that the user's cross-card tasks can be executed smoothly.

[0053] Task priority is the user's rating of their own tasks, which is generally divided into highest, general, and lower. Ordinary users choose general and lower. The highest priority is specified by the user administrator. Task requests in the user's task request queue are sorted according to task priority, thereby increasing the freedom of user management.

[0054] Step S2: initially allocating the task request according to the user type, and controlling the task request to enter the next step if the first condition is met, otherwise controlling the task request to enter the selected queue in the selected resource pool.

[0055] The first condition can be set as a payment condition. A paying user can select a shared resource pool or an exclusive resource pool, while a non-paying user can only select a shared resource pool.

[0056] Step S3: Calculate the computing power resource surplus according to the user type and the computing power resources used by the user. If the user's computing power resource surplus meets the computing power resource demand of the task request, control the task request to enter the selected queue in the selected resource pool; otherwise, control the task request to enter the user's task request queue.

[0057] The upper limit of computing resources that a user can use is subject to restrictions such as payment conditions. Generally, restrictions are differentiated by user type, or relevant information is queried based on user type.

[0058] The task request is controlled to enter the user's task request queue and sorted according to the task priority. The user administrator can also modify the priority of each task under his authority.

[0059] When it is monitored that the user's computing power resource surplus meets the computing power resource demand of the task request, the task request is scheduled from the user's task request queue to enter the selected queue in the selected resource pool for subsequent computing power resource scheduling.

[0060] Among them, when the task request is located in the selected queue in the selected resource pool, the computing power resources are determined according to the matching degree between the computing power resource demand of the task request and the idle resources in the selected resource pool, and dispatched to the task, that is, corresponding to the second queue. Alternatively, according to the queue sorting, that is, corresponding to the first queue, the computing power resources are determined according to the user score and the computing power resource demand of the task request, and dispatched to the task.

[0061] Since the computing power resource demand of the first queue is generally large, multiple scheduling is generally adopted according to the user score and the computing power resource demand requested by the task.

[0062] Specifically, the user score is evaluated based on the current year's cooperation index, the number of paid years in the previous n years, and the user focus index.

[0063] When the user score F>20, the maximum value of the scheduled computing resources is ≤M, where:

[0064] F=5a+2b+5c, where M is the number of GPU cards, which is 4 in this embodiment.

[0065] a is the cooperation index for this year. If the contract has been signed and payment has been made, the index is 2; if the contract has been signed but payment has not been made, the index is 1; b is the number of paid years in the previous five years; c is the user focus index. The index for long-term key users is 2, and the index for short-term key users is 1.

[0066] When the amount of computing resources scheduled for the task is less than its computing resource demand, the computing resource utilization rate of the task is detected according to the preset time period. If the computing resource utilization rate reaches the scheduling threshold, the computing resources are determined again based on the user score and the computing resource demand requested by the task until the cumulative amount of computing resources scheduled for the task is equal to the computing resource demand.

[0067] Furthermore, when the amount of computing resources scheduled for the task is less than its computing resource demand, the computing resource occupancy rate of the task is detected according to a preset time period. If the computing resource occupancy rate is lower than the usage threshold, computing resources will no longer be scheduled for the task.

[0068] For example, every 12 hours, the system administrator and the user administrator confirm the system resource usage. If the resource utilization rate exceeds 80% within 12 hours, computing resources will continue to be issued until the user's required resources are met, or the utilization rate of exclusive resources is less than 50%, then no more resources will be issued. Through the above preset time periods and scheduling thresholds and usage threshold settings, user task requirements are met and the utilization rate of computing resources is improved.

[0069] The above users can refer to both individual users and group users. Individual users in a group share their computing power resource quota, and user administrators can manage the tasks under their authority.

[0070] Referring to the computing power resource allocation method of the embodiment, Figure 2 As shown, the present invention also discloses a computing resource allocation device, including a receiving module 100, a primary allocation module 200, a secondary allocation module 300 and a monitoring module 400.

[0071] Specifically, the receiving module 100 is used to receive a task request with a user type tag, and the task request includes the task type, task duration, computing power resource requirement, task priority, resource pool selection, and queue selection.

[0072] The primary allocation module 200 is used to initially allocate task requests according to user types. If a first condition is met, the task request is controlled to enter the secondary allocation module 300, otherwise, the task request is controlled to enter the selected queue in the selected resource pool.

[0073] The secondary allocation module 300 is used to calculate the computing power resource surplus according to the user type and the computing power resources used by the user. If the user's computing power resource surplus meets the computing power resource demand of the task request, the task request is controlled to enter the selected queue in the selected resource pool; otherwise, the task request is controlled to enter the user's task request queue.

[0074] The task request is controlled to enter the user's task request queue and sorted according to the task priority. The user administrator can also modify the priority of each task under his authority.

[0075] The monitoring module 400 is used to monitor the user's computing power resource surplus. When it is monitored that the user's computing power resource surplus meets the computing power resource demand of the task request, the task request is scheduled from the user's task request queue to the selected queue in the selected resource pool.

[0076] The device also includes a scheduling module 500, which is used to determine the computing power resources according to the matching degree between the computing power resource demand of the task request and the free resources in the selected resource pool, and schedule them to the task when the task request is located in the selected queue in the selected resource pool; or, according to the queue sorting, determine the computing power resources according to the user score and the computing power resource demand of the task request, and schedule them to the task.

[0077] Specifically, the user score is evaluated based on the current year's cooperation index, the number of paid years in the previous n years, and the user focus index.

[0078] When the user score F>20, the maximum value of the scheduled computing resources is ≤M, where:

[0079] F=5a+2b+5c, where M is the number of GPU cards, which is 4 in this embodiment.

[0080] a is the cooperation index for this year. If the contract has been signed and payment has been made, the index is 2; if the contract has been signed but payment has not been made, the index is 1; b is the number of paid years in the previous five years; c is the user focus index. The index for long-term key users is 2, and the index for short-term key users is 1.

[0081] The device also includes a continuous scheduling module 600, which is used to detect the computing resource occupancy rate of the task according to a preset period when the amount of computing resources scheduled to the task is less than its computing resource demand. If the computing resource occupancy rate reaches the scheduling threshold, the computing resources are determined again according to the user score and the computing resource demand requested by the task until the cumulative amount of computing resources scheduled is equal to the computing resource demand. The continuous scheduling module 600 is also used to detect the computing resource occupancy rate of the task according to a preset period when the amount of computing resources scheduled to the task is less than its computing resource demand. If the computing resource occupancy rate is lower than the usage threshold, computing resources are no longer scheduled for the task.

[0082] For example, the continuous scheduling module 600 confirms the resource usage of the task every 12 hours. If the resource occupancy rate exceeds 80% within 12 hours, computing resources will be continuously issued until the user's required resources are met, or the exclusive resource usage rate is less than 50%, and then no more resources will be issued. Through the above preset time period and scheduling threshold and usage threshold settings, the user's task requirements are met and the utilization rate of computing resources is improved.

[0083] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above methods is implemented.

[0084] The present invention also discloses a computer-readable storage medium, which stores a computer program for executing any of the above methods.

[0085] To sum up, the present invention can provide users with multiple choices by setting up multiple resource pools and queues, and can automatically schedule and manage users' various computing resource needs, thereby reducing the difficulty of user management. It can further achieve multiple scheduling through threshold setting, improve computing resource utilization, and avoid resource waste.

[0086] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0087] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0088] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0089] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A computing resource allocation method, characterized in that: include: Receive a task request with a user type tag, wherein the task request includes task type, task duration, computing resource requirement, task priority, resource pool selection, and queue selection; Initially allocating the task request according to the user type, and controlling the task request to enter the next step if a first condition is met, otherwise controlling the task request to enter the selected queue in the selected resource pool; Calculate the remaining computing power resources of the user according to the user type and the computing power resources used by the user; if the remaining computing power resources of the user meet the computing power resource demand of the task request, control the task request to enter the selected queue in the selected resource pool; otherwise, control the task request to enter the task request queue of the user; When it is monitored that the computing power resource surplus of the user meets the computing power resource demand of the task request, the task request is scheduled from the task request queue of the user to enter the selected queue in the selected resource pool; When the task request is in the selected queue in the selected resource pool, Determine computing resources according to the matching degree between the computing resource demand of the task request and the idle resources in the selected resource pool, and dispatch them to the task; or, According to the queue sorting, the computing resources are determined according to the user score and the computing resource demand requested by the task, and are scheduled to the task in a multiple scheduling manner; When the computing power resources scheduled for the task are less than its computing power resource demand, the computing power resource occupancy rate of the task is detected according to the preset time period. If the computing power resource occupancy rate reaches the scheduling threshold, the computing power resources are determined again according to the user score and the computing power resource demand requested by the task until the cumulative computing power resources scheduled for the task are equal to the computing power resource demand; The user score is evaluated based on the cooperation index of the current year, the number of paid years in the previous n years, and the user focus index; If the user score F>20, the maximum value of the scheduled computing resources is ≤M, where: F=5a+2b+5c, M is the number of GPU cards, a is the cooperation index for this year. If the contract has been signed and payment has been made, the index is 2; if the contract has been signed but payment has not been made, the index is 1; b is the number of paid years in the previous five years; c is the user focus index. The index for long-term key users is 2, and the index for short-term key users is 1.

2. A computing resource allocation device, characterized in that: include: A receiving module, used to receive a task request with a user type tag, wherein the task request includes a task type, a task duration, a computing resource requirement, a task priority, and a resource pool selection and a queue selection; A primary allocation module, used for initially allocating task requests according to the user type, and controlling the task request to enter the secondary allocation module if a first condition is met, otherwise controlling the task request to enter the selected queue in the selected resource pool; A secondary allocation module, used to calculate the remaining computing power resources of the user according to the user type and the computing power resources used by the user, and if the remaining computing power resources of the user meet the computing power resource demand of the task request, control the task request to enter the selected queue in the selected resource pool; otherwise, control the task request to enter the task request queue of the user; A monitoring module, configured to monitor the computing power resource surplus of the user, and when it is monitored that the computing power resource surplus of the user meets the computing power resource demand of the task request, dispatch the task request from the task request queue of the user into the selected queue in the selected resource pool; A scheduling module is used to determine the computing power resources according to the matching degree between the computing power resource demand of the task request and the idle resources in the selected resource pool, and schedule them to the task when the task request is in the selected queue in the selected resource pool; or, according to the queue sorting, determine the computing power resources according to the user score and the computing power resource demand of the task request, and schedule them to the task in a multiple scheduling manner; The continuous scheduling module is used to detect the computing resource occupancy rate of the task according to a preset time period when the computing resource amount scheduled to the task is less than its computing resource demand. If the computing resource occupancy rate reaches the scheduling threshold, the computing resource is determined again according to the user score and the computing resource demand requested by the task until the cumulative scheduled computing resource amount is equal to the computing resource demand; wherein, The user score is evaluated based on the cooperation index of the current year, the number of paid years in the previous n years, and the user focus index; If the user score F>20, the maximum value of the scheduled computing resources is ≤M, where: F=5a+2b+5c, M is the number of GPU cards, a is the cooperation index for this year. If the contract has been signed and payment has been made, the index is 2; if the contract has been signed but payment has not been made, the index is 1; b is the number of paid years in the previous five years; c is the user focus index. The index for long-term key users is 2, and the index for short-term key users is 1.

3. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method of claim 1 is implemented.

4. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method of claim 1.