Cloud resource allocation method, device and storage medium

By building a resource allocation tree and optimizing cloud computing resource allocation, the problem of resource waste in the existing technology has been solved and resource utilization has been improved, especially in scenarios of resource tight or unbalanced.

CN115145713BActive Publication Date: 2024-12-06CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110336084.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-29
Publication Date
2024-12-06
Estimated Expiration
2041-03-29

AI Technical Summary

Technical Problem

When scheduling, the existing cloud computing resource allocation method causes some jobs to occupy too much resources, resulting in insufficient resources and other jobs being unable to be deployed, resulting in waste of resources.

Method used

By building a resource allocation tree, obtaining resource requirements and cloud resource status information of the computing job, determining a reasonable resource allocation plan, optimizing resource allocation, and ensuring the rational utilization of resources.

Benefits of technology

It effectively reduces the situation where computing jobs cannot be undertaken due to exhaustion of resources, and improves resource utilization, especially in situations where resource tight or unbalanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115145713B_ABST
    Figure CN115145713B_ABST
Patent Text Reader

Abstract

The present disclosure provides a cloud resource allocation method, device and storage medium, which relates to the field of cloud computing technology, wherein the method includes: when performing resource allocation, obtaining the resource demand corresponding to the computing job request and the cloud resource status information of the cloud resource pool; constructing a resource allocation tree according to the cloud resource status information, and determining the resource allocation scheme corresponding to the computing job request based on the resource demand and the resource allocation tree; the root node of the resource allocation tree represents the cloud resource status information and the computing job request, and the leaf node represents the remaining resource status information of the corresponding resource node after the computing job request is assigned to the corresponding resource node; and performing resource allocation for the computing job request according to the resource allocation scheme. The method, device and storage medium disclosed in the present disclosure can reasonably allocate computing resource nodes, reduce the situation where the remaining computing resources are wasted due to the exhaustion of some computing resources and the inability to undertake computing jobs, and improve resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of cloud computing, and in particular to a cloud resource allocation method, device and storage medium. Background Art

[0002] In cloud computing business scenarios, computing jobs are mainly compute-intensive and are executed on one or more computing nodes in a computing cluster through platform scheduling. In existing scheduling algorithms, the resource requirements of computing jobs are compared with the remaining resources in the computing nodes. When the remaining resources meet the computing job requirements, the scheduler deploys the job on the corresponding node. When multiple nodes meet the requirements, they are deployed on the node with the most remaining resources. When resources are not met, a queue is built to allow jobs to queue and wait for resources. In the existing resource allocation method, when scheduling jobs, some jobs will occupy too much of a certain resource, resulting in the inability to deploy new jobs due to lack of the resource, while other resources are idle, resulting in resource waste; therefore, a new cloud resource allocation solution is needed. Summary of the invention

[0003] In view of this, a technical problem to be solved by the present invention is to provide a cloud resource allocation method, device and storage medium.

[0004] According to a first aspect of the present disclosure, a cloud resource allocation method is provided, comprising: when allocating resources for a computing job request, obtaining resource requirements corresponding to the computing job request and cloud resource status information of a cloud resource pool; wherein the cloud resource status information comprises: resource node distribution information, resource information of resource nodes; constructing a resource allocation tree according to the cloud resource status information, and determining a resource allocation scheme corresponding to the computing job request based on the resource requirements and the resource allocation tree; wherein the root node of the resource allocation tree represents the cloud resource status information and the computing job request, and the leaf node represents the remaining resource status information of the corresponding resource node after the computing job request is allocated to the corresponding resource node; and allocating resources for the computing job request according to the resource allocation scheme.

[0005] Optionally, constructing a resource allocation tree according to the cloud resource status information, and determining a resource allocation scheme corresponding to the computing job request based on the resource demand and the resource allocation tree includes: if the resource allocation tree has not been constructed, constructing and initializing the resource allocation tree based on the cloud resource status information, and determining the resource allocation scheme based on the resource demand and the resource allocation tree; if the resource allocation tree has been constructed, determining the resource allocation scheme based on the resource demand and the constructed resource allocation tree.

[0006] Optionally, the resource allocation tree is constructed and initialized based on the cloud resource status information, and the resource allocation scheme is determined based on the resource demand and the resource allocation tree, including: establishing a root node; wherein the root node represents the current cloud resource status information and computing job request; establishing a corresponding leaf node for each resource node, and setting the corresponding resource node allocation times and stable score value for the leaf node; starting from the root node, selecting the first leaf node that can meet the resource demand; performing iterative resource allocation processing on each first leaf node based on the resource demand, and determining the allocation times and stable score value of each first leaf node; selecting the first leaf node with the highest stable score value as the first target leaf node, and using the first target leaf node to allocate resources to the computing job request.

[0007] Optionally, after selecting the first target leaf node, a first simulation computing job is generated, and simulated resource allocation processing is performed on each leaf node based on the first simulation computing job until no leaf node meets the resource requirements of the first simulation computing job; all leaf nodes assigned with the first simulation computing job are determined, and the stable score value and the number of selections of this leaf node are updated.

[0008] Optionally, determining the resource allocation scheme based on the resource requirements and the constructed resource allocation tree includes: starting from the root node, selecting a second leaf node that can meet the resource requirements; performing iterative resource allocation processing on each second leaf node based on the resource requirements, and determining the number of allocations and a stable score value for each second leaf node; selecting the second leaf node with the highest stable score value as the second target leaf node, and using the second target leaf node to allocate resources to the computing job request.

[0009] Optionally, after selecting the second target leaf node, a second simulation computing job is generated, and simulated resource allocation processing is performed on each leaf node based on the second simulation computing job until no leaf node meets the resource requirements of the second simulation computing job; all leaf nodes assigned with the second simulation computing job are determined, and the stable score value and the number of selections of this leaf node are updated.

[0010] Optionally, allocating resources for the computing job request according to the resource allocation scheme includes: determining the cloud resource node corresponding to the first target leaf node or the second target leaf node; allocating resources of this cloud resource node to the computing job corresponding to the computing job request, and releasing the allocated resources after the computing job is completed.

[0011] Optionally, multiple computing job requests are placed in a queue in the order of arrival; and one computing job request is read from the queue in turn to allocate resources to the computing job request.

[0012] Optionally, the resource information of the resource node includes: the total amount and used amount of CPU, memory, and storage; and the demand information carried in the computing job request includes: demand information for CPU, memory, and storage.

[0013] According to a second aspect of the present disclosure, a cloud resource allocation device is provided, comprising: a resource information acquisition module, used to acquire the resource demand corresponding to the computing job request and the cloud resource status information of the cloud resource pool when allocating resources to the computing job request; wherein the cloud resource status information includes: resource node distribution information, resource information of the resource nodes; an allocation plan formulation module, used to construct a resource allocation tree according to the cloud resource status information, and determine the resource allocation plan corresponding to the computing job request based on the resource demand and the resource allocation tree; wherein the root node of the resource allocation tree represents the cloud resource status information and the computing job request, and the leaf node represents the remaining resource status information of the corresponding resource node after the computing job request is allocated to the corresponding resource node; a resource allocation module, used to allocate resources to the computing job request according to the resource allocation plan.

[0014] Optionally, the allocation plan formulation module is specifically used to, if the resource allocation tree has not been constructed, construct and initialize the resource allocation tree based on the cloud resource status information, and determine the resource allocation plan based on the resource demand and the resource allocation tree; if the resource allocation tree has been constructed, determine the resource allocation plan based on the resource demand and the constructed resource allocation tree.

[0015] Optionally, the allocation plan formulation module includes: a first allocation determination module, which is used to establish a root node; wherein the root node represents the current cloud resource status information and computing job requests; a corresponding leaf node is established for each resource node, and the corresponding resource node allocation times and stable score value are set for the leaf node; starting from the root node, a first leaf node that can meet the resource requirements is selected; based on the resource requirements, each first leaf node is iteratively allocated with resources, and the allocation times and stable score value of each first leaf node are determined; the first leaf node with the highest stable score value is selected as the first target leaf node, and the first target leaf node is used to allocate resources to the computing job request.

[0016] Optionally, the first allocation determination module is used to generate a first simulation computing job after selecting the first target leaf node, and perform simulated resource allocation processing on each leaf node based on the first simulation computing job until no leaf node meets the resource requirements of the first simulation computing job; determine all leaf nodes assigned with the first simulation computing job, and update the stable score value and number of selections of this leaf node.

[0017] Optionally, the allocation plan formulation module includes: a second allocation determination module, which is used to start from the root node and select a second leaf node that can meet the resource requirements; perform iterative resource allocation processing on each second leaf node based on the resource requirements, and determine the number of allocations and stable score value of each second leaf node; select the second leaf node with the highest stable score value as the second target leaf node, and use the second target leaf node to allocate resources to the computing job request.

[0018] Optionally, the second allocation determination module is also used to generate a second simulation computing job after selecting the second target leaf node, and perform simulated resource allocation processing on each leaf node based on the second simulation computing job until no leaf node meets the resource requirements of the second simulation computing job; determine all leaf nodes assigned the second simulation computing job, and update the stable score value and number of selections of this leaf node.

[0019] Optionally, the resource allocation module is used to determine the cloud resource node corresponding to the first target leaf node or the second target leaf node; allocate the resources of this cloud resource node to the computing job corresponding to the computing job request, and release the allocated resources after the computing job is completed.

[0020] Optionally, the queue processing module is used to put multiple computing job requests into a queue in the order of arrival; read one computing job request from the queue in turn to allocate resources for the computing job request.

[0021] According to a third aspect of the present disclosure, there is provided a cloud resource allocation apparatus, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the method as described above based on instructions stored in the memory.

[0022] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the instructions are executed by a processor as described above.

[0023] The cloud resource allocation method, device and storage medium provided by the above-mentioned embodiments of the present disclosure construct a resource allocation tree according to cloud resource status information, determine the resource allocation plan corresponding to the computing job request based on the resource demand and the resource allocation tree, and can reasonably allocate computing resource nodes, reduce the waste of remaining computing resources due to the inability to undertake computing jobs due to the exhaustion of certain computing resources, and improve resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present disclosure 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 of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0025] Figure 1 A flowchart of an embodiment of a cloud resource allocation method according to the present disclosure;

[0026] Figures 2A to 2D A schematic diagram of resource allocation according to an embodiment of the cloud resource allocation method of the present disclosure;

[0027] Figures 3A to 3C A schematic diagram of resource allocation according to another embodiment of the cloud resource allocation method of the present disclosure;

[0028] Figure 4 It is a module diagram of an embodiment of a cloud resource allocation device according to the present disclosure;

[0029] Figure 5 A module schematic diagram of an allocation scheme formulation module in one embodiment of a cloud resource allocation device according to the present disclosure;

[0030] Figure 6 is a module diagram of another embodiment of the cloud resource allocation device according to the present disclosure;

[0031] Figure 7 This is a module diagram of another embodiment of the cloud resource allocation device according to the present disclosure. DETAILED DESCRIPTION

[0032] The present disclosure is described more fully below with reference to the accompanying drawings, in which exemplary embodiments of the present disclosure are described. The technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure. The technical solutions of the present disclosure are described in many aspects below in conjunction with various figures and embodiments.

[0033] The terms "first", "second", etc. in the following text are only used to distinguish between the two and have no other special meanings.

[0034] The most important indicators of computing resource requirements include the number of CPU cores and memory size. In heterogeneous resource computing jobs, the indicators also include GPU, storage, bandwidth, etc. Once each computing job is allocated the required resources and starts execution, it cannot be interrupted or migrated. If an interruption occurs, it needs to be re-executed. The main function of job scheduling is to allocate reasonable computing resources to computing jobs based on the computing job's demand for computing resources, and start the job. The present disclosure proposes a cloud resource allocation method that can automatically determine the resource allocation plan based on the resource pool status and resource demand, which can improve resource utilization.

[0035] Figure 1 FIG. 1 is a flow chart of an embodiment of a cloud resource allocation method according to the present disclosure, as shown in FIG. Figure 1 As shown:

[0036] Step 101, when allocating resources for a computing job request, obtain resource requirements corresponding to the computing job request and cloud resource status information of a cloud resource pool.

[0037] In one embodiment, the cloud resource status information includes resource node distribution information, resource information of resource nodes, etc. Resource nodes include servers deployed in the cloud, etc.

[0038] Step 102: construct a resource allocation tree according to the cloud resource status information, and determine a resource allocation scheme corresponding to the computing job request based on the resource demand and the resource allocation tree.

[0039] In one embodiment, the root node of the resource allocation tree represents the cloud resource status information and the computing job request, and the leaf node represents the remaining resource status information of the corresponding resource node after the computing job request is assigned to the resource node. The resource information of the resource node includes the total amount and used amount of CPU, memory, and storage, etc.; the demand information carried in the computing job request includes the demand information for CPU, memory, and storage, etc.

[0040] Step 103: Allocate resources to the computing job request according to the resource allocation plan.

[0041] Multiple computing job requests are placed in a queue in the order of arrival, and a computing job request is read from the queue in turn to allocate resources for the computing job request. For example, computing jobs (represented as computing resource requests in scheduling jobs) are placed in a queue in the order of arrival, and a computing job request is read from the queue in turn to determine the resource allocation plan, and the corresponding resources in the cloud resource pool are provided to the computing job according to the resource allocation plan, and the resources are released after the computing job is completed.

[0042] In one embodiment, if the resource allocation tree is not constructed, a resource allocation tree is constructed based on the cloud resource status information and initialized, and a resource allocation scheme is determined based on the resource demand and the resource allocation tree. If the resource allocation tree is already constructed, a resource allocation scheme is determined based on the resource demand and the constructed resource allocation tree.

[0043] When the resource allocation tree is not constructed, a root node is established, wherein the root node represents the current cloud resource status information and computing job requests. A corresponding leaf node is established for each resource node, and the allocation times and stable score values ​​of the corresponding resource node are set for the leaf node.

[0044] Starting from the root node, select the first leaf node that can meet the resource requirements. Perform iterative resource allocation processing on each first leaf node based on the resource requirements, and determine the number of allocations and the stable score value of each first leaf node. Select the first leaf node with the highest stable score as the first target leaf node, and use the first target leaf node to allocate resources to the computing job request.

[0045] After selecting the first target leaf node, a first simulation computing job is generated, and simulated resource allocation processing is performed on each leaf node based on the first simulation computing job until no leaf node meets the resource requirements of the first simulation computing job. All leaf nodes to which the first simulation computing job is assigned are determined, and the stable score value and the number of times selected of this leaf node are updated.

[0046] In one embodiment, the resource allocation tree of the present invention is a tree structure that defines a solution space of feasible solutions. Each path from a leaf node to a root node corresponds to a final resource allocation plan, and the final resource allocation plan is represented by the remaining resource space being unable to satisfy newly arrived computing jobs.

[0047] The root node represents the current cloud resource state information and computing jobs. The cloud resource state information includes the resource node distribution in the cloud resource pool and the resource information of the resource nodes. The resource information includes the total amount and used amount of CPU, memory, and storage, etc. The leaf node represents the resource state state_end of the final resource allocation method (the total amount of remaining computing resources, because a certain computing resource cannot bear the newly arrived computing business).

[0048] If the resource allocation tree is not constructed, there are four main steps to construct the resource allocation tree and determine the resource allocation scheme (initialization state): 1.1, build the tree; 1.2, select (initialization state); 1.3, simulate / execute; 1.4, return. The above steps 1.2 to 1.4 are repeated k times to complete the construction of the resource allocation tree and determine the resource allocation. If the resource allocation tree has been constructed, there are three steps to determine the resource allocation scheme (allocation phase): 2.1, select (allocation state); 2.2, execute; 2.3, return.

[0049] 1.1. Building a tree: based on each root node s new , create child nodes representing all resource nodes* for leaf nodes, initialize and record two values: Stable score value: V(s new ,*)=0, the allocation scheme is selected times N(s new ,*)=0.

[0050] 1.2. Selection: Starting from the root node, first filter out the resource nodes that can meet the resource requirements of the computing job (the first leaf node), and then search for leaf nodes according to different strategies based on whether the resource allocation tree is in the initialization state or the allocation state.

[0051] The selection formula for leaf nodes is:

[0052]

[0053] When the stable score value and the number of times selected of all leaf nodes are 0, the following formula is used:

[0054] a=max(P(s,a))a∈(resource nodes that meet the computing job requirements) (1-2);

[0055] Among them, a represents the leaf node a representing resource node a; V(s,a) represents the stable score value of the node selected in this state of the allocation tree; P(s,a) represents the score of this allocation tree, and the calculation formula is:

[0056]

[0057] Among them, x jIndicates the demand for the jth resource of a computing job, which contains i resources in total; X j Represents the remaining amount of the jth resource in the resource node; α j Represents the weight coefficient of the jth resource; N(s,a) represents the total number of times the resource in node a is selected and allocated to this computing job in state s (resource state); It is represented as the total number of possible solutions other than allocating resources in node a to this computing job in state s; c is represented as the strategy. When in the initialization state, c is the search coefficient; when in the allocation state, c = 0. When there is no (s, a) root node, random allocation is sufficient.

[0058] 1.3. Simulation / Execution: Simulation: Use a random method for the child nodes (i.e. randomly allocate computing resources to any resource node that can meet the requirements) to simulate several experiments. When the simulation reaches the final state, the score of the current simulation can be obtained.

[0059] Execution: Allocate resources according to the resource allocation tree until the final state, and you can get the score of the current execution. The formula for calculating the score is:

[0060]

[0061] Among them, X j总 represents the total amount of the jth resource of all nodes in the cloud resource pool; X j剩余 It indicates the total amount of the jth resource remaining when all nodes in the cloud resource pool cannot load new computing jobs.

[0062] 1.4. Feedback: Update the simulation times and score of the current child node according to the scores of several simulations of the child node. At the same time, feed the simulation times and score back to all its ancestor nodes and update the ancestor nodes. For example,

[0063] V(s,a)=(V+V(s,a)×N(s,a)) / (N(s,a)+1) (1-5);

[0064] N(s,a)=N(s,a)+1 (1-6).

[0065] In one embodiment, the present disclosure provides a cloud resource allocation method, comprising:

[0066] 3.1. Initialize the resource allocation tree;

[0067] 3.2. The resource allocation tree enters the allocation state;

[0068] 3.3. Read new computing job requests (resource requests) from the queue;

[0069] 3.4. Update cloud resource information state;

[0070] 3.5. Search the resource allocation tree to obtain the resource allocation plan based on the state and computing job;

[0071] 3.6. According to the resource allocation plan, allocate resources in the resource pool to meet the resource request;

[0072] 3.7. Clear the computing job request in the queue;

[0073] 3.8. Repeat 3.1-3.7 to complete resource allocation for computing job requests.

[0074] In one embodiment, if the resource allocation tree has been constructed, starting from the root node, a second leaf node that can meet the resource requirements is selected. Based on the resource requirements, iterative resource allocation processing is performed on each second leaf node to determine the number of allocations and the stability score value of each second leaf node; the second leaf node with the highest stability score value is selected as the second target leaf node, and the second target leaf node is used to allocate resources to the computing job request.

[0075] After selecting the second target leaf node, a second simulation computing job is generated, and simulated resource allocation processing is performed on each leaf node based on the second simulation computing job until no leaf node meets the resource requirements of the second simulation computing job. All leaf nodes to which the second simulation computing job is assigned are determined, and the stable score value and the number of times selected of this leaf node are updated.

[0076] There are many methods for allocating resources to computing job requests. For example, a cloud resource node corresponding to the first target leaf node or the second target leaf node is determined, resources of the cloud resource node are allocated to the computing job corresponding to the computing job request, and the allocated resources are released after the computing job is completed.

[0077] In one embodiment, assuming that the cloud resource pool is composed of three resource nodes, each tree node of the resource allocation tree has three leaf nodes, and the resource information of the resource node includes three resource attributes: vcpu, memory, and storage, that is, i=3, the weight coefficients of the three attributes are all 1, and the search coefficient c is set to 1.

[0078] The current state is: Node A has 100 vcpus, 100G memory, and 10T storage remaining; Node B has 10 vcpus, 1000G memory, and 10T storage remaining; Node C has 50 vcpus, 100G memory, and 100T storage remaining. The computing resources for the currently incoming computing job are: 30 vcpus, 10G memory, and 1T storage. The second-layer leaf nodes from left to right represent the resource requirements for selecting resource nodes A / B / C to undertake computing jobs. The numbers in the nodes are represented by V(s,a) / N(s,a).

[0079] The resource allocation method (initialization state) when the resource allocation tree is not constructed is:

[0080] 4.1. Building a tree: based on each root node s new , create child nodes representing all resource nodes* for leaf nodes, initialize and record two values: Stable score value: V(s new ,*)=0; the number of times the allocation scheme is selected: N(s new ,*)=0, such as Figure 2A shown.

[0081] 4.2. Selection: Assume that after multiple rounds of iterations, the stable score value and the number of times the allocation scheme is selected are as follows: Figure 2B As shown. According to formula (1-1):

[0082]

[0083] The calculation score of node A is 0.65+1*0.7*0.08=0.71; node B is not selected because it cannot meet the computing job resource requirements; the calculation score of node C is 0.3+1*0.65*0.78=0.81. Therefore, node C (the first target leaf node) is selected to undertake this computing job in this round.

[0084] 4.3. Simulation: After selecting the C node, a computing job is randomly generated, and then the selection algorithm is continued to be executed to select a node to undertake the computing job. This step is repeated until there is no node that can undertake the newly randomly generated computing job.

[0085] like Figure 2C As shown, assuming that at this time node A has 1 vcpu, 1G memory and 0.5T storage left; node B has 2 vcpu, 0.5G memory and 0.1T storage left; node C has 1 vcpu, 0G memory and 0.02T storage left; the final score V = 0.98.

[0086] 4.4. Backtracking: After the simulation is finished, all selected nodes update their stable scores and the number of times they have been selected. Figure 2DAs shown, taking node C as an example, the stability score value is updated to (0.98+0.3*6) / 7=0.40, and the number of selections is updated to 7.

[0087] The resource allocation method (allocation status) when the resource allocation tree has been constructed is:

[0088] 5.1. Selection: Same as the initialization state assumption, such as Figure 3A As shown in the figure, according to the formula a=max(V(s,a)), the score of node A is 0.65; node B cannot meet the computing job resource requirements and will not be selected; node C scores 0.3. Therefore, node A (the second target leaf node) is selected to undertake this computing job in this round.

[0089] 5.2. Execution: After selecting node A, perform resource allocation, such as Figure 3B shown.

[0090] 5.3. Backtracking: When no node can take over new computing jobs, assume that node A has 1 vcpu, 1G memory and 0.5T storage left; node B has 2 vcpu, 0.5G memory and 0.1T storage left; node C has 1 vcpu, 0G memory and 0.02T storage left; the final score V = 0.98. All selected nodes update their stable score values ​​and the number of times they have been selected. For example, node A: the stable score value is updated to (0.98+0.65*30) / 31=0.66, and the number of times it has been selected is updated to 31. Figure 3C shown.

[0091] In one embodiment, Figure 4 As shown, the present disclosure provides a cloud resource allocation device 40, including: a resource information acquisition module 41, an allocation plan formulation module 42 and a resource allocation module. When allocating resources to a computing job request, the resource information acquisition module 41 acquires the resource demand corresponding to the computing job request and the cloud resource status information of the cloud resource pool, and the cloud resource status information includes: resource node distribution information and resource information of the resource node.

[0092] The allocation scheme formulation module 42 constructs a resource allocation tree according to the cloud resource status information, and determines the resource allocation scheme corresponding to the computing job request based on the resource demand and the resource allocation tree. The root node of the resource allocation tree represents the cloud resource status information and the computing job request, and the leaf node represents the remaining resource status information of the corresponding resource node after the computing job request is assigned to the corresponding resource node. The resource allocation module 43 allocates resources to the computing job request according to the resource allocation scheme.

[0093] In one embodiment, if the resource allocation tree is not constructed, the allocation scheme formulation module 42 constructs and initializes the resource allocation tree based on the cloud resource status information, and determines the resource allocation scheme based on the resource demand and the resource allocation tree. If the resource allocation tree is already constructed, the allocation scheme formulation module 42 determines the resource allocation scheme based on the resource demand and the constructed resource allocation tree.

[0094] like Figure 5 As shown, the allocation plan formulation module 42 includes: a first allocation determination module 421 and a second allocation determination module 422. The first allocation determination module 421 establishes a root node, which represents the current cloud resource status information and computing job requests. The first allocation determination module 421 establishes a corresponding leaf node for each resource node, and sets the allocation times and stable score value of the corresponding resource node for the leaf node.

[0095] The first allocation determination module 421 starts from the root node and selects the first leaf node that can meet the resource demand. The first allocation determination module 421 performs iterative resource allocation processing on each first leaf node based on the resource demand, determines the number of allocations and the stable score value of each first leaf node, and selects the first leaf node with the highest stable score value as the first target leaf node, so as to use the first target leaf node to allocate resources to the computing job request.

[0096] After selecting the first target leaf node, the first allocation determination module 421 generates a first simulation computing job, and performs simulation resource allocation processing on each leaf node based on the first simulation computing job until no leaf node meets the resource requirements of the first simulation computing job. The first allocation determination module 421 determines all leaf nodes to which the first simulation computing job is assigned, and updates the stable score value and the number of times selected for the leaf node.

[0097] The second allocation determination module 422 starts from the root node and selects a second leaf node that can meet the resource requirements. The second allocation determination module 422 performs iterative resource allocation processing on each second leaf node based on the resource requirements, and determines the number of allocations and the stability score value of each second leaf node. The second allocation determination module 422 selects the second leaf node with the highest stability score value as the second target leaf node, and uses the second target leaf node to allocate resources to the computing job request.

[0098] After selecting the second target leaf node, the second allocation determination module 422 generates a second simulation computing job, and performs simulation resource allocation processing on each leaf node based on the second simulation computing job until no leaf node meets the resource requirements of the second simulation computing job. The second allocation determination module 422 determines all leaf nodes to which the second simulation computing job is assigned, and updates the stable score value and the number of times selected for the leaf node.

[0099] The resource allocation module 43 determines the cloud resource node corresponding to the first target leaf node or the second target leaf node, allocates the resources of this cloud resource node to the computing job corresponding to the computing job request, and releases the allocated resources after the computing job is completed.

[0100] In one embodiment, Figure 6 As shown, the cloud resource allocation device 40 also includes a queue processing module 44, which puts multiple computing job requests into a queue in the order of arrival, and reads one computing job request from the queue in turn to allocate resources for the computing job request.

[0101] In one embodiment, Figure 7 FIG. 1 is a module diagram of another embodiment of the cloud resource allocation device according to the present disclosure. Figure 7 As shown, the apparatus may include a memory 71, a processor 72, a communication interface 73 and a bus 74. The memory 71 is used to store instructions, the processor 72 is coupled to the memory 71, and the processor 72 is configured to execute the above-mentioned cloud resource allocation method based on the instructions stored in the memory 71.

[0102] The memory 71 may be a high-speed RAM memory, a non-volatile memory, etc., or a memory array. The memory 71 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules. The processor 72 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the cloud resource allocation method disclosed in the present invention.

[0103] In one embodiment, the present disclosure provides a computer-readable storage medium storing computer instructions, which implement the cloud resource allocation method in any of the above embodiments when executed by a processor.

[0104] The cloud resource allocation method, device and storage medium provided in the above embodiments construct a resource allocation tree according to cloud resource status information, and determine the resource allocation plan corresponding to the computing job request based on the resource demand and the resource allocation tree, so as to reasonably allocate computing resource nodes, reduce the waste of remaining computing resources due to the inability to undertake computing jobs due to the exhaustion of certain computing resources, and significantly improve resource utilization, especially in scenarios with tight computing resources or scenarios with certain computing resource imbalances, and have obvious advantages over traditional methods.

[0105] The method and system of the present disclosure may be implemented in many ways. For example, the method and system of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0106] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A cloud resource allocation method, comprising: When allocating resources for a computing job request, obtaining resource requirements corresponding to the computing job request and cloud resource status information of a cloud resource pool; wherein the cloud resource status information includes resource node distribution information and resource information of resource nodes; Constructing a resource allocation tree according to the cloud resource state information, and determining a resource allocation scheme corresponding to the computing job request based on the resource demand and the resource allocation tree; The root node of the resource allocation tree represents the cloud resource status information and the computing job request, and the leaf node represents the remaining resource status information of the corresponding resource node after the computing job request is assigned to the corresponding resource node; if the resource allocation tree is not constructed, the resource allocation tree is constructed and initialized based on the cloud resource status information, and the resource allocation scheme is determined based on the resource demand and the resource allocation tree, including: Establish a root node, the root node represents the current cloud resource status information and computing job request; establish a corresponding leaf node for each resource node, and set the corresponding resource node allocation times and stable score value for the leaf node; starting from the root node, select a first leaf node that can meet the resource demand; perform iterative resource allocation processing on each first leaf node based on the resource demand, and determine the allocation times and stable score value of each first leaf node; select the first leaf node with the highest stable score value as the first target leaf node, and use the first target leaf node to perform resource allocation for the computing job request; The leaf node selection formula is: a It is represented as selecting the leaf node a representing the resource node a; V(s,a) is represented as the stable score value of selecting the node in this state of the allocation tree; P(s,a) It is represented as the score of this allocation tree, and the calculation formula is: Among them, x j Characterizes the demand for the jth resource of a computing job; X j Represents the remaining amount of the jth resource in the resource node; α j The weight coefficient representing the jth resource; i is the number of resource types; N(s,a) represents the total number of times the resources in node a are allocated to this computing job in state s; Indicates the total number of possible solutions other than allocating resources in node a to this computing job in state s; c represents the strategy. When in the initialization state, c is the search coefficient; allocate resources according to the resource allocation tree until the final state, and get the score of the current execution; the formula for calculating the score is: X j总 represents the total amount of the jth resource of all nodes in the cloud resource pool; X j剩余 Represents the total amount of the jth resource remaining when all nodes in the cloud resource pool cannot load new computing jobs; Update the ancestor node, V(s,a) = (V+V(s,a)×N(s,a)) / (N(s,a)+1); According to the resource allocation scheme, resources are allocated to the computing job request.

2. The method of claim 1, further comprising: If the resource allocation tree has been constructed, the resource allocation solution is determined based on the resource requirements and the constructed resource allocation tree.

3. The method of claim 2, further comprising: After selecting the first target leaf node, generating a first simulation computing job, and performing simulation resource allocation processing on each leaf node based on the first simulation computing job until no leaf node meets the resource requirements of the first simulation computing job; All leaf nodes assigned with the first simulation computing job are determined, and the stable score values ​​and the number of times selected of the leaf nodes are updated.

4. The method according to claim 2, wherein determining the resource allocation scheme based on the resource demand and the constructed resource allocation tree comprises: Starting from the root node, selecting a second leaf node that can meet the resource demand; Performing iterative resource allocation processing on each second leaf node based on the resource demand, and determining the number of allocations and a stable score value of each second leaf node; A second leaf node with the highest stability score is selected as a second target leaf node, and resources are allocated to the computing job request using the second target leaf node.

5. The method of claim 4, further comprising: After selecting the second target leaf node, generating a second simulation computing job, and performing simulation resource allocation processing on each leaf node based on the second simulation computing job until no leaf node meets the resource requirements of the second simulation computing job; All leaf nodes assigned with the second simulation computing job are determined, and the stable score values ​​and the number of times selected of the leaf nodes are updated.

6. The method according to claim 4, wherein allocating resources to the computing job request according to the resource allocation scheme comprises: Determine a cloud resource node corresponding to the first target leaf node or the second target leaf node; The resources of the cloud resource node are allocated to the computing job corresponding to the computing job request, and the allocated resources are released after the computing job is completed.

7. The method of claim 1, further comprising: Put multiple computing job requests into a queue in the order they arrive; A computing job request is read from the queue in sequence to allocate resources to the computing job request.

8. The method according to any one of claims 1 to 7, wherein: The resource information of the resource node includes: the total amount and used amount of CPU, memory, and storage; The demand information carried in the computing job request includes: demand information for CPU, memory and storage.

9. A cloud resource allocation device, comprising: A resource information acquisition module, used to acquire resource requirements corresponding to the computing job request and cloud resource status information of the cloud resource pool when allocating resources to the computing job request; wherein the cloud resource status information includes resource node distribution information and resource information of the resource node; an allocation scheme formulation module, configured to construct a resource allocation tree according to the cloud resource state information, and determine a resource allocation scheme corresponding to the computing job request based on the resource demand and the resource allocation tree; The root node of the resource allocation tree represents the cloud resource status information and the computing job request, and the leaf node represents the remaining resource status information of the corresponding resource node after the computing job request is assigned to the corresponding resource node; the allocation plan formulation module is specifically used to construct and initialize the resource allocation tree based on the cloud resource status information if the resource allocation tree is not constructed, and determine the resource allocation plan based on the resource demand and the resource allocation tree; The allocation scheme formulation module includes: a first allocation determination module, which is used to establish a root node; the root node represents the current cloud resource status information and computing job requests; a corresponding leaf node is established for each resource node, and the allocation times and stable score values ​​of the corresponding resource nodes are set for the leaf nodes; starting from the root node, a first leaf node that can meet the resource demand is selected; based on the resource demand, each first leaf node is iterated for resource allocation processing, and the allocation times and stable score values ​​of each first leaf node are determined; the first leaf node with the highest stable score value is selected as the first target leaf node, so as to use the first target leaf node to perform resource allocation for the computing job request; The leaf node selection formula is: a represents the leaf node a representing resource node a; V(s,a) represents the stable score value of the node selected in this state of the allocation tree; P(s,a) represents the score of this allocation tree, and the calculation formula is: Among them, x j Characterizes the demand for the jth resource of a computing job; X j Represents the remaining amount of the jth resource in the resource node; α j Characterizes the weight coefficient of the j-th resource, i is the number of resource types; N(s,a) represents the total number of times the resources in node a are allocated to this computing job in state s; Indicates the total number of possible solutions other than allocating resources in node a to this computing job in state s; c represents the strategy. When in the initialization state, c is the search coefficient; allocate resources according to the resource allocation tree until the final state, and get the score of the current execution; the formula for calculating the score is: X j总 represents the total amount of the jth resource of all nodes in the cloud resource pool; X j剩余 Represents the total amount of the jth resource remaining when all nodes in the cloud resource pool cannot load new computing jobs; Update the ancestor node, V(s,a) = (V+V(s,a)×N(s,a)) / (N(s,a)+1); A resource allocation module is used to allocate resources to the computing job request according to the resource allocation scheme.

10. The device of claim 9, wherein: The allocation scheme formulation module is specifically used to determine the resource allocation scheme based on the resource demand and the constructed resource allocation tree if the resource allocation tree has been constructed.

11. The device of claim 10, wherein: The first allocation determination module is used to generate a first simulation computing job after selecting the first target leaf node, and perform simulated resource allocation processing on each leaf node based on the first simulation computing job until no leaf node meets the resource requirements of the first simulation computing job; determine all leaf nodes assigned with the first simulation computing job, and update the stable score value and the number of selections of this leaf node.

12. The device of claim 10, wherein: The allocation plan formulation module includes: The second allocation determination module is used to start from the root node and select a second leaf node that can meet the resource demand; perform iterative resource allocation processing on each second leaf node based on the resource demand, and determine the number of allocations and the stable score value of each second leaf node; select the second leaf node with the highest stable score value as the second target leaf node, and use the second target leaf node to allocate resources to the computing job request.

13. The device of claim 12, wherein: The second allocation determination module is also used to generate a second simulation computing job after selecting the second target leaf node, and perform simulated resource allocation processing on each leaf node based on the second simulation computing job until no leaf node meets the resource requirements of the second simulation computing job; determine all leaf nodes assigned with the second simulation computing job, and update the stable score value and the number of selections of this leaf node.

14. The device of claim 12, wherein: The resource allocation module is used to determine the cloud resource node corresponding to the first target leaf node or the second target leaf node; allocate the resources of this cloud resource node to the computing job corresponding to the computing job request, and release the allocated resources after the computing job is completed.

15. The apparatus of claim 9, further comprising: A queue processing module is used to place multiple computing job requests into a queue in the order of arrival; A computing job request is read from the queue in sequence to allocate resources to the computing job request.

16. A cloud resource allocation device, comprising: Memory; and a processor coupled to the memory, wherein the processor is configured to execute the method according to any one of claims 1 to 8 based on instructions stored in the memory. 17 . A computer-readable storage medium, wherein the computer-readable storage medium non-transitorily stores computer instructions, wherein the instructions are executed by a processor to perform the method according to claim 1 .