Search

CN-122019131-A - Resource scheduling method, related device, equipment and storage medium

CN122019131ACN 122019131 ACN122019131 ACN 122019131ACN-122019131-A

Abstract

The application discloses a resource scheduling method, a related device, equipment and a storage medium, wherein the resource scheduling method comprises the steps of responding to a resource scheduling request of a target container set, carrying out preliminary screening based on a pre-selection strategy configured by a scheduler to obtain a node to be screened if intervention is carried out, determining first weights of the target container set based on resource parameters of application resources, determining second weights of corresponding pre-screening nodes based on the resource parameters of resources owned by all the pre-screening nodes respectively, determining resource matching degree between the target container set and the pre-screening nodes based on the first weights and the second weights, selecting at least one pre-screening node as a candidate node based on the resource matching degree, and selecting the candidate node as a scheduling node based on scheduling scores of the target container set at all the candidate nodes calculated according to the optimal strategy configured by the scheduler. According to the scheme, resource waste can be reduced as much as possible during resource scheduling, and the node resource utilization rate is improved.

Inventors

  • ZHOU QINGXIANG
  • PAN XIAOGANG
  • Fan Zetian
  • HAN CHAO
  • WU JIANYONG
  • XU SHASHA
  • ZHANG JIAYE
  • GAO WEI
  • ZHOU MINGWEI

Assignees

  • 浙江大华技术股份有限公司

Dates

Publication Date
20260512
Application Date
20251224

Claims (10)

  1. 1. A method for scheduling resources, comprising: Responding to a resource scheduling request of a target container set, and performing preliminary screening in a target cluster based on a pre-selected strategy configured by a scheduler to obtain a screening node if intervention; Determining a first weight of the target container set based on the resource parameters of the resources applied by the resource scheduling request, and determining a second weight corresponding to each pre-screening node based on the resource parameters of the resources owned by the pre-screening node; determining a resource matching degree between the target container set and the pre-screening node based on the first weight of the target container set and the second weight of the pre-screening node; selecting at least one pre-screening node as a candidate node respectively based on the resource matching degree between the target container set and each pre-screening node respectively; and selecting the candidate nodes as the scheduling nodes of the target container set based on the scheduling scores of the target container set at the candidate nodes calculated according to the preferred strategy configured by the scheduler.
  2. 2. The method of claim 1, wherein the resource parameter comprises a resource type, wherein the first weight of the set of target containers and the second weight of the pre-screening node are each obtained by performing a fusion operation on sub-weights of each type of resource, and wherein the sub-weights of each type of resource are positively correlated to resource scarcity.
  3. 3. The method of claim 2, wherein the resource parameter further comprises a number of resources for each type of resource, and the fusing operation comprises a weighting operation, the weighting coefficients for each type of resource being positively related to the number of resources.
  4. 4. The method of claim 3, wherein the resource parameters include a resource type and a number of resources of various types, wherein the determining the first weight of the set of target containers based on the resource parameters of the resources requested by the resource scheduling request comprises: Obtaining the sub-weight of each type of resource applied based on the resource scarcity of each type of resource applied by the resource scheduling request, and obtaining the weighting coefficient of each type of resource applied based on the resource quantity of each type of resource applied by the resource scheduling request; and carrying out weighting operation based on the sub-weights and the weighting coefficients of the applied various resources to obtain the first weight of the target container set.
  5. 5. A method according to claim 3, wherein the resource parameters include resource types and amounts of resources of various types, and wherein the determining the second weight corresponding to the pre-screening node based on the resource parameters of the resources owned by each of the pre-screening nodes, respectively, comprises: Obtaining sub-weights of all kinds of resources owned by the pre-screening node based on the resource scarcity of all kinds of resources owned by the pre-screening node, and obtaining weighting coefficients of all kinds of resources owned by the pre-screening node based on the resource quantity of all kinds of resources owned by the pre-screening node; And weighting based on the sub-weights and the weighting coefficients of all the owned resources to obtain the second weight of the pre-screening node.
  6. 6. The method of claim 1, wherein the determining a resource match between the set of target containers and the pre-screening node based on the first weight of the set of target containers and the second weight of the pre-screening node comprises: obtaining a resource matching degree between the target container set and the pre-screening node based on a weight ratio between the first weight and a second weight of the pre-screening node; The selecting at least one pre-screening node as a candidate node based on the resource matching degree between the target container set and each pre-screening node respectively includes: and sequencing all the pre-screening nodes based on the sequence from high to low of the resource matching degree, and selecting the pre-screening nodes before the preset sequence bit as the candidate nodes.
  7. 7. The method of claim 1, wherein said computing the scheduling score of the target container set at each of the candidate nodes based on the preference policy configured by the scheduler, after selecting the candidate node as the scheduling node of the target container set, comprises: The method comprises the steps of controlling a scheduler to pre-occupy resources owned by a scheduling node based on a resource scheduling request, setting permission conditions, checking whether the pre-occupied resources owned by the scheduling node meet the condition of entering a binding phase, approving the scheduling method to enter the binding phase in response to the pre-occupied resources owned by the scheduling node meeting the condition of entering the binding phase, and re-executing the scheduling method in response to the pre-occupied resources owned by the scheduling node not meeting the condition of entering the binding phase.
  8. 8. A resource scheduling apparatus, comprising: The preliminary screening module is used for responding to the resource scheduling request of the target container set, and performing preliminary screening in the target cluster based on a pre-selected strategy configured by a scheduler to obtain a screening node if intervention; The weight determining module is used for determining a first weight of the target container set based on the resource parameters of the resources applied by the resource scheduling request, and determining a second weight corresponding to the pre-screening node based on the resource parameters of the resources owned by each pre-screening node; A matching calculation module, configured to determine a resource matching degree between the target container set and the pre-screening node based on the first weight of the target container set and the second weight of the pre-screening node; The node selection module is used for selecting at least one pre-screening node as a candidate node respectively based on the resource matching degree between the target container set and each pre-screening node respectively; And the scheduling determining module is used for calculating the scheduling score of the target container set at each candidate node based on the preferred strategy configured by the scheduler, and selecting the candidate node as the scheduling node of the target container set.
  9. 9. An electronic device comprising at least a memory and a processor, wherein at least program instructions are stored in the memory, and the processor is configured to execute the program instructions to implement the resource scheduling method of any one of claims 1 to 7.
  10. 10. A computer readable storage medium, characterized in that program instructions executable by a processor for implementing the resource scheduling method of any one of claims 1 to 7 are stored.

Description

Resource scheduling method, related device, equipment and storage medium Technical Field The present application relates to the field of internet technologies, and in particular, to a resource scheduling method, and related devices, apparatuses, and storage media. Background In a resource management system of a cloud computing platform, a resource scheduler is generally required to select a scheduling node among nodes satisfying preset screening conditions. At present, the existing scheduling scheme mainly selects nodes meeting filtering conditions as scheduling nodes according to a resource idle priority principle. However, in the prior art, resource scheduling is performed according to a resource idle priority principle, so that the problem of resource waste occurs with high probability. Therefore, how to reduce resource waste as much as possible and improve node resource utilization rate during resource scheduling becomes a problem to be solved. Disclosure of Invention The application mainly solves the technical problem of providing a resource scheduling method, a related device, equipment and a storage medium, which can reduce resource waste as much as possible during resource scheduling and improve the node resource utilization rate. In order to solve the technical problems, the first aspect of the application provides a resource scheduling method, which comprises the steps of responding to a resource scheduling request of a target container set, carrying out preliminary screening in a target cluster based on a pre-selected strategy configured by a scheduler to obtain candidate nodes if the candidate nodes are screened, determining first weights of the target container set based on resource parameters of resources applied by the resource scheduling request, determining second weights of corresponding pre-selected nodes based on the resource parameters of resources owned by each pre-selected node, determining resource matching degree between the target container set and the pre-selected nodes based on the first weights of the target container set and the second weights of the pre-selected nodes, selecting at least one pre-selected node as a candidate node based on the resource matching degree between the target container set and each pre-selected node, and selecting the candidate node as a scheduling node of the target container set based on the scheduling score of the target container set at each candidate node calculated according to the pre-selected strategy configured by the scheduler. In order to solve the technical problems, the second aspect of the application provides a resource scheduling device which comprises a preliminary screening module, a weight determining module, a matching calculation module, a node selecting module and a scheduling determining module, wherein the preliminary screening module is used for responding to a resource scheduling request of a target container set, performing preliminary screening in the target cluster based on a pre-selected strategy configured by a scheduler to obtain a candidate node if the node is screened, the weight determining module is used for determining a first weight of the target container set based on a resource parameter of resources applied by the resource scheduling request and respectively determining a second weight corresponding to the pre-selected node based on the resource parameter of resources owned by each pre-selected node, the matching calculation module is used for determining the resource matching degree between the target container set and the pre-selected node based on the first weight of the target container set and the second weight of the pre-selected node, the node selecting module is used for selecting at least one pre-selected node as a candidate node based on the resource matching degree between the target container set and each pre-selected node, and the scheduling determining module is used for calculating the scheduling score of the target container set at each candidate node based on the resource parameter configured by the scheduler and the pre-selected strategy. In order to solve the above-mentioned technical problem, a third aspect of the present application provides an electronic device, at least including a memory and a processor coupled to each other, where at least program instructions are stored in the memory, and the processor is configured to execute the program instructions to implement the resource scheduling method in the first aspect. In order to solve the above technical problem, a fourth aspect of the present application provides a computer readable storage medium storing program instructions executable by a processor for implementing the resource scheduling method of the first aspect. In the scheme, in response to a resource scheduling request of a target container set, preliminary screening is carried out in a target cluster based on a pre-selected strategy configured by a scheduler to obtain a plural