Resource scheduling method and device, electronic equipment, storage medium and program product
By determining the resource node matching the resource scheduling request and calculating the scheduling parameter values, and selecting the appropriate resource node for resource scheduling, the problems of resource fragmentation and low utilization in the existing technology are solved, and more efficient resource allocation and utilization are achieved.
Patent Information
- Application Number
- CN202410962737.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-12-17
AI Technical Summary
The existing resource scheduling methods have problems of resource fragmentation and low utilization, especially when multiple categories of physical machines are divided into resource pools, resulting in unreasonable resource allocation and idle CPU, memory or GPU resources.
By determining the first resource node that the resource scheduling request matches and calculating the scheduling parameter value based on its available resources and demand, a suitable second resource node is selected for resource scheduling, ensuring resource matching and efficiency.
It improves the accuracy and efficiency of resource scheduling, reduces resource fragmentation, improves overall resource utilization, and avoids the problem of low overall utilization of resource pools.
Smart Images

Figure CN119149183A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a resource scheduling method, device, electronic device, storage medium and program product. Background Art
[0002] Computing resource scheduling is an important field in computer science, which involves how to efficiently allocate and utilize computing resources to meet changing scheduling requirements. With the rapid development of information technology, computing tasks have become more and more complex, and computing resources have also increased. Computing resource scheduling is a key mechanism to ensure that computing resources effectively support business processes. It directly affects the performance, cost and user experience of computing tasks. Therefore, how to schedule resources that are suitable for resource scheduling requirements has become a hot research issue. Summary of the invention
[0003] Embodiments of the present application provide a resource scheduling method, device, electronic device, computer-readable storage medium, and computer program product, which can improve resource scheduling effects.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application provides a resource scheduling method, including:
[0006] Determine a first resource node that matches the resource scheduling request, wherein the category of resources of the first resource node and the category of resources of the resource scheduling request are the first category;
[0007] For each first resource node, determining a scheduling parameter value of the first resource node based on the resource demand of the resource scheduling request and the available resources of the first resource node;
[0008] Determining a second resource node from among the first resource nodes based on the scheduling parameter value of the first resource node;
[0009] Resources are scheduled for the resource scheduling request from resources of the second resource node.
[0010] The embodiment of the present application also provides a resource scheduling device, including:
[0011] A first determination module, configured to determine a first resource node that matches the resource scheduling request, wherein the category of resources of the first resource node and the category of resources of the resource scheduling request are the first category;
[0012] A second determination module is used to determine, for each first resource node, a scheduling parameter value of the first resource node based on the resource demand of the resource scheduling request and the available resources of the first resource node;
[0013] A third determination module, configured to determine a second resource node from the first resource nodes based on the scheduling parameter value of the first resource node;
[0014] A resource scheduling module is used to schedule resources for the resource scheduling request from the resources of the second resource node.
[0015] The present application also provides an electronic device, including:
[0016] A memory for storing computer executable instructions;
[0017] The processor is used to implement the resource scheduling method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0018] An embodiment of the present application also provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the resource scheduling method provided in the embodiment of the present application is implemented.
[0019] An embodiment of the present application also provides a computer program product, including computer executable instructions or a computer program, which, when executed by a processor, implements the resource scheduling method provided in the embodiment of the present application.
[0020] The embodiments of the present application have the following beneficial effects:
[0021] Applying the above-mentioned embodiments of the present application, first determine the first resource node that matches the resource scheduling request, the category of the resources of the first resource node and the category of the resources of the resource scheduling request are the first category, and then determine the scheduling parameter value of the first resource node based on the resource demand of the resource scheduling request and the available resources of the first resource node, so as to determine the second resource node from the first resource node based on the scheduling parameter value of the first resource node, so as to schedule resources for the resource scheduling request from the resources of the second resource node.
[0022] Here, firstly, based on the category of resource nodes, the resource scheduling request is matched with the first resource node to speed up the resource scheduling efficiency; then, based on the scheduling parameter value, the resource scheduling request is matched with the second resource node from the first resource node to schedule resources for the resource scheduling request from the second resource node, and the scheduling parameter value is determined based on the resource demand and the available resource amount of the first resource node, which can ensure that the resource node (i.e., the second resource node) used for scheduling resources satisfies the resource scheduling request, thereby ensuring the rationality of resource scheduling and improving the accuracy of resource scheduling. In this way, based on the embodiment of the present application, the resource scheduling effect is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of the architecture of the resource scheduling system provided in the embodiment of the present application;
[0024] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0025] Figure 3A It is a schematic diagram of a first process of the resource scheduling method provided in an embodiment of the present application;
[0026] Figure 3B It is a second flow diagram of the resource scheduling method provided in an embodiment of the present application;
[0027] Figure 3C It is a third flow chart of the resource scheduling method provided in the embodiment of the present application;
[0028] Figure 3D It is a fourth flow chart of the resource scheduling method provided in an embodiment of the present application;
[0029] Figure 3E It is a fifth flow chart of the resource scheduling method provided in an embodiment of the present application;
[0030] Figure 4A It is a schematic diagram of the first component of the resource scheduling solution provided in the related art;
[0031] Figure 4B It is a second component schematic diagram of the resource scheduling solution provided in the related art;
[0032] Figure 5 It is a schematic diagram of the composition of the resource scheduling method provided in the embodiment of the present application;
[0033] Figure 6 This is the sixth flow chart of the resource scheduling method provided in the embodiment of the present application.
[0034] It should be noted that the above-mentioned “first” and “second” are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0036] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0037] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0038] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the functions of the module or unit.
[0039] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0040] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.
[0041] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0042] 1) Client: An application running in an electronic device to provide various services, such as a client that supports resource scheduling.
[0043] 2) In response to: used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.
[0044] Resource scheduling solutions in related technologies include: Solution 1) Figure 4A As shown in Figure 1, physical machines with the same attributes are usually divided into a resource pool, such as Figure 4A As shown in the resource pool 1-3, a category is marked for the physical machines in a resource pool, and the same category is also marked for the resource scheduling request. When a virtual machine is created through a resource scheduling request, it will be scheduled to a physical machine of the same category according to the category matching rule of the resource scheduling request. Solution 2) Figure 4B As shown in Figure 1, physical machines with different attributes are divided into one resource pool by marking one or more categories according to the capabilities they can provide. Figure 4B The hybrid resource pool shown in the figure; when a virtual machine is created through a resource scheduling request, it will be scheduled to a physical machine of the same category according to the category matching rule of the resource scheduling request.
[0045] However, Solution 1 has the following problems: 1) Fragmented resources: Physical machines with the same attributes are divided into a resource pool, and resources are relatively isolated. This may result in unallocated idle resources remaining after the memory of resource 1 is allocated. This may result in fragmented resources where the local disk resources of resource 2 have been allocated, but the CPU and memory are still idle. 2) Low overall resource pool utilization: The allocation rate of the entire resource pool for resources allocated to a certain category may be low due to the small number of tasks applying for resources of that category. Solution 2 has the following problems: 1) Fragmented resources: Physical machines with multiple categories may not select the lowest-cost physical machine to start resources due to the successful matching of a single category, which will exhaust the CPU and memory resources and cause the local disk or GPU resources to remain idle.
[0046] The embodiments of the present application provide a resource scheduling method, device, electronic device, computer-readable storage medium and computer program product, which can improve the resource scheduling effect. Next, based on the above description of the nouns and terms involved in the embodiments of the present application, the embodiments of the present application are described in detail.
[0047] The resource scheduling system provided by the embodiment of the present application is described below. Figure 1 , Figure 1 1 is a schematic diagram of the architecture of the resource scheduling system provided in the embodiment of the present application. To support an exemplary application, the resource scheduling system 100 includes: a server 200, a network 300, and a terminal 400. The terminal 400 is connected to the server 200 via the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two, using a wireless or wired link to achieve data transmission.
[0048] Here, the terminal 400 (for example, running a client supporting resource scheduling) responds to the resource scheduling instruction and sends a resource scheduling request to the server 200; the server 200 receives the resource scheduling request; in response to the resource scheduling request, determines a first resource node that matches the resource scheduling request, and the category of the resources of the first resource node and the category of the resources of the resource scheduling request are the first category; for each first resource node, based on the resource demand of the resource scheduling request and the available resources of the first resource node, determines the scheduling parameter value of the first resource node; based on the scheduling parameter value of the first resource node, determines a second resource node from the first resource node; and schedules resources for the resource scheduling request from the resources of the second resource node.
[0049] In some embodiments, the resource scheduling method provided in the embodiment of the present application is implemented by an electronic device, for example, it can be implemented by a terminal alone, it can also be implemented by a server alone, or it can be implemented by a terminal and a server in collaboration. The electronic device implementing the resource scheduling method provided in the embodiment of the present application can be various types of terminals or servers. Among them, the server (such as server 200) can be an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers. The terminal (such as terminal 400) can be a laptop, a tablet computer, a desktop computer, a smart phone, an intelligent voice interaction device (such as a smart speaker), a smart home appliance (such as a smart TV), a smart watch, a vehicle-mounted terminal, a wearable device, a virtual reality (Virtual Reality, VR) device, an aircraft, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected by wired or wireless communication, and the embodiment of the present application does not limit this.
[0050] In some embodiments, the resource scheduling method provided in the embodiment of the present application can be implemented with the aid of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing, and sharing of data. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model application, which can form a resource pool, which is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing resources and storage resources. As an example, a server (such as server 200) can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0051] In some embodiments, the terminal or server can implement the resource scheduling method provided in the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. The computer program can be a native program or software module in the operating system; it can be a local (Native) application (Application, APP), that is, a program that needs to be installed in the operating system to run, such as a client that supports resource scheduling; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.
[0052] The following describes an electronic device for implementing a resource scheduling method provided in an embodiment of the present application. Figure 2 , Figure 2 Schematic diagram of the structure of the electronic device provided in the embodiment of the present application. The electronic device 500 provided in the embodiment of the present application can be a terminal or a server. Figure 2 As shown, the electronic device 500 includes: at least one processor 510, a memory 550, at least one network interface 520 and a user interface 530. The various components in the electronic device 500 are coupled together through a bus system 540. It can be understood that the bus system 540 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 540 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 540 is not used in the following examples. Figure 2 Various buses are labeled as bus system 540 .
[0053] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0054] The user interface 530 includes one or more output devices 531 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0055] The memory 550 may be removable, non-removable, or a combination thereof. The memory 550 may include one or more storage devices physically located away from the processor 510. The memory 550 includes a volatile memory or a non-volatile memory, and may also include both a volatile memory and a non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory.
[0056] In some embodiments, the memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0057] Operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0058] A network communication module 552, used to reach other electronic devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0059] a presentation module 553 for enabling presentation of information via one or more output devices 531 (e.g., display screen, speaker, etc.) associated with the user interface 530 (e.g., a user interface for operating peripherals and displaying content and information);
[0060] The input processing module 554 is used to detect one or more user inputs or interactions from one of the one or more input devices 532 and translate the detected inputs or interactions.
[0061] In some embodiments, the resource scheduling device provided in the embodiments of the present application can be implemented in software. Figure 2 A resource scheduling device 555 stored in a memory 550 is shown, which may be software in the form of a program or plug-in, including the following software modules: a first determination module 5551, a second determination module 5552, a third determination module 5553 and a resource scheduling module 5554. These modules are logical and therefore may be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0062] The resource scheduling method provided by the embodiment of the present application is described below. As mentioned above, the resource scheduling method provided by the embodiment of the present application is implemented by an electronic device, for example, it can be implemented by a server or a terminal alone, or by a server and a terminal in collaboration. Therefore, the execution subject of each step will not be repeatedly described below. Figure 3A , Figure 3A : is a flow chart of a resource scheduling method provided in an embodiment of the present application. The resource scheduling method provided in an embodiment of the present application includes:
[0063] Step 101: Determine a first resource node that matches a resource scheduling request.
[0064] The category of the resources of the first resource node and the category of the resources of the resource scheduling request are the first category.
[0065] It should be noted that the resources in the embodiments of the present application are computing resources, and resource nodes can be node devices such as physical machines and virtual machines that provide computing resources. The resources in a resource node are the resources that the resource node can provide. Here, when computing resources need to be scheduled, a corresponding resource scheduling request is generated, and the resource scheduling request can carry the first category of resources required for the resource scheduling request, and the resource demand for the first category of resources. Then, in response to the resource scheduling request, m first resource nodes that match the resource scheduling request are determined from the M resource nodes to be scheduled, and the first resource nodes have the first category of resources required for the resource scheduling request. The number of the first category can be one or more. Among them, 1 <m≤M。
[0066] Here, the category (also called resource label) is used to indicate the resource type of the corresponding computing resource. For example, the resource type of the computing resource may include CPU type, local disk type, GPU type, etc., then the corresponding category may include CPU type category, local disk type category, GPU type category, etc. In actual applications, the resource node has a corresponding category, and the category indicates the resource type of the computing resource that the resource node can provide. For example, the category may include CPU type category, local disk type category, GPU type category, etc. Correspondingly, the resource scheduling request will also carry the first category of the resource required by the resource scheduling request. The first category is the resource type of the resource required by the resource scheduling request. For example, the first category may also include CPU type category, local disk type category, GPU type category, etc.
[0067] It should be noted that in the embodiment of the present application, resource nodes with different categories of resources are included in one resource pool, and the resource nodes are not divided according to the categories of resources in the resource nodes, thereby breaking resource isolation, thereby reducing the generation of fragmented resources caused by resource isolation and improving resource utilization.
[0068] In some embodiments, the total number of resource nodes is M, where M is an integer greater than 1. Figure 3B , step 101 can be implemented by executing steps 1011-1013: step 1011, determine the resource demand of the resource scheduling request; step 1012, determine the resource category of each resource node, and determine the available resources of each resource node; step 1013, set the resource node whose resource category is the first category and whose available resources are greater than or equal to the resource demand as the first resource node.
[0069] For step 1011, the resource scheduling request is first parsed to obtain a parsing result, thereby extracting the first category of resources required for the resource scheduling request from the parsing result, and then determining the resource demand for the first category of resources, which represents the demand size of the first category of resources.
[0070] For step 1012, the following processing is performed for each resource node: first, the resource category of the resource node is obtained, and the number of the resource category can be one or more. In practical applications, each resource node is provided with the category of the resource that the resource node can provide. At the same time, the available resource amount of the resource (specifically, the resource of the first category) in the resource node is also determined, and the available resource amount represents the resource amount size of the available resource in the resource node.
[0071] For step 1013, a resource node whose resource category is the first category and whose available resource amount is greater than or equal to the resource demand amount is taken as the first resource node.
[0072] In this way, based on step 1011 to step 1013, the selection of the first resource node is realized, so that the first resource node to be scheduled subsequently can adapt to the resource scheduling demand, thereby improving the resource scheduling efficiency.
[0073] In some embodiments, "determining the resource requirement of the resource scheduling request" in step 1011 can be achieved by executing the following steps: determining the required resource quantity of the resource of the resource scheduling request, and obtaining a first mapping relationship between the resource requirement quantity and the resource requirement; determining the resource requirement based on the resource requirement quantity and the first mapping relationship.
[0074] Here, the resource scheduling request is first parsed to obtain the parsing result, and then the resource demand quantity of the first category of resources is extracted from the parsing result. For example, if the first category of resources is memory resources, the corresponding resource demand quantity may be 4G, and if the first category of resources is CPU resources, the corresponding resource demand quantity may be 1 core. Then, a first mapping relationship between the resource demand quantity and the resource demand amount is obtained. The first mapping relationship may be pre-set, for example, resource demand amount = V*resource demand amount (V is greater than 0, and is the unit resource demand amount corresponding to each unit resource demand amount (such as 1G, 1 core)). For example, if the first category of resources is memory resources, the corresponding resource demand quantity may be 4G, and then the resource demand amount = V*4. Then, based on the resource demand quantity of the first category of resources and the first mapping relationship, the resource demand amount of the first category of resources is determined.
[0075] In some embodiments, see Figure 3C , "determining the amount of available resources for each resource node" in step 1012 can be implemented by executing the following steps 201-203: Step 201, obtaining the maximum amount of available resources of the resource node, and obtaining a second mapping relationship between the maximum amount of available resources and the maximum amount of available resources; Step 202, determining the maximum amount of available resources of the resource node based on the maximum amount of available resources and the second mapping relationship; Step 203, obtaining the amount of used resources of the resource node, and determining the amount of available resources based on the maximum amount of available resources and the amount of used resources.
[0076] For step 201, first obtain the maximum available resource quantity of the resources in the resource node (specifically, the resources of the first category), which is set based on the actual situation of the resource node itself (such as the hardware situation), and is the maximum available resource quantity of the resources in the resource node. Then obtain a second mapping relationship between the maximum available resource quantity and the maximum available resource quantity, which can be pre-set, such as the maximum available resource quantity = S * maximum available resource quantity (S is greater than 0, and is the unit available resource quantity corresponding to each unit available resource quantity (such as 1G, 1 core)). For example, if the resources in the resource node are memory resources, the corresponding maximum available resource quantity can be 128G, then the maximum available resource quantity = S * 128.
[0077] For step 202, the maximum available resource amount of the resource node is determined based on the maximum available resource quantity and the second mapping relationship.
[0078] For step 203, the used resource amount of the resource node will be counted and recorded. Here, the used resource amount of the resources in the resource node (specifically, it can be the first category of resources) is obtained, and the used resource amount is subtracted from the maximum available resource amount to obtain the available resource amount of the resources in the resource node.
[0079] Step 102: For each first resource node, based on the resource demand of the resource scheduling request and the available resources of the first resource node, determine a scheduling parameter value of the first resource node.
[0080] For step 102, for each determined first resource node, the following processing is performed respectively: first, the resource demand in the resource scheduling request is obtained, and the available resource amount of the first category of resources of the first resource node is obtained, and then the scheduling parameter value of the first resource node is determined based on the resource demand and the available resource amount of the first category of resources of the first resource node. Here, the scheduling parameter value of the first resource node is used to characterize the possibility of the corresponding first resource node as the second resource node to be scheduled in the resource scheduling request. The higher the possibility represented by the scheduling parameter value of the first resource node, the higher the possibility of the first resource node as the second resource node to be scheduled in the resource scheduling request.
[0081] In some embodiments, when the first category is one, based on the resource demand of the resource scheduling request and the available resources of the first resource node, the scheduling parameter value of the first resource node can be determined by executing the following steps: determining the degree of difference between the available resources and the resource demand of the first resource node; and determining the degree of difference as the scheduling parameter value of the first resource node.
[0082] Here, the difference between the available resource amount and the resource demand amount of the first category of resources in the first resource node is determined. For example, the resource amount difference (or difference) between the available resource amount and the resource demand amount can be determined, and the difference between the available resource amount and the resource demand amount is characterized by the resource amount difference, that is, there is a positive proportional relationship between the resource amount difference and the difference degree; for another example, the resource amount ratio between the resource demand amount and the available resource amount can be determined, and the difference between the available resource amount and the resource demand amount is characterized by the resource amount ratio, that is, the closer the resource amount ratio is to 1, the lower the difference degree. Thus, the difference degree corresponding to the first resource node is determined as the scheduling parameter value of the first resource node.
[0083] In some embodiments, see Figure 3D, when the number of the first category is N (N is an integer greater than 1), based on the resource demand of the first category of resources in the resource scheduling request and the available resource amount of the first category of resources in the first resource node, the scheduling parameter value of the first resource node can be determined by executing the following steps 1021-1024: Step 1021, determine a first ratio between the resource demand amounts of the N first category resources in the resource scheduling request; Step 1022, determine a second ratio between the available resource amounts of the N first category resources of the first resource node; Step 1023, determine the degree of difference between the second ratio and the first ratio; Step 1024, determine the degree of difference as the scheduling parameter value of the first resource node.
[0084] For step 1021, since the number of first categories is N, the first ratio between the resource requirements of the N first categories of resources can be determined first. For example, the first categories are categories V1, V2 and V3, and the resource requirements are 40, 80 and 30 respectively, then the first ratio is V1:V2:V3=40:80:30.
[0085] For step 1022, determine the second ratio between the available resource amounts of N first category resources in the first resource node. For example, the first categories are categories V1, V2 and V3, and the available resource amounts are 80, 160 and 60 respectively. Then the second ratio is 80:160:60.
[0086] For step 1023, the degree of difference between the second ratio and the first ratio of the first resource node is determined. For example, the ratio difference (or difference) between the first ratio and the second ratio can be determined, and the degree of difference between the second ratio and the first ratio is characterized by the ratio difference, that is, there is a positive proportional relationship between the ratio difference and the degree of difference; for another example, a third ratio of the first ratio to the second ratio can be determined, and the degree of difference between the second ratio and the first ratio is characterized by the third ratio, that is, the closer the third ratio is to 1, the lower the degree of difference.
[0087] For step 1024, the difference degree corresponding to the first resource node is determined as the scheduling parameter value of the first resource node.
[0088] Step 103: Determine a second resource node from the first resource nodes based on the scheduling parameter value of the first resource node.
[0089] Step 104: Scheduling resources for the resource scheduling request from the resources of the second resource node.
[0090] For step 103, after determining the scheduling parameter value of each first resource node, the second resource node to be scheduled for the resource scheduling request can be determined from the first resource nodes according to the scheduling parameter value of the first resource node. For example, the scheduling parameter value is used to characterize the possibility of the first resource node as the second resource node. Then, when the number of first resource nodes is m (m is an integer greater than 1), the first resource node corresponding to the scheduling parameter value that characterizes the possibility degree higher than the degree threshold can be selected from the m first resource nodes as the second resource node; or, the m first resource nodes are sorted in descending order according to the size of the possibility degree represented by the scheduling parameter value, and then the first resource nodes with a target number of first resource nodes ranked high are selected from the m first resource nodes as the second resource nodes. The target number can be set as needed, for example, it can be 1.
[0091] In some embodiments, based on the scheduling parameter value of the first resource node, the second resource node can be determined from the first resource nodes by executing the following steps: determining the first resource node among the first resource nodes whose scheduling parameter value is lower than the scheduling parameter threshold as the second resource node; or, according to the size of the scheduling parameter value, selecting a target number of first resource nodes from the first resource nodes as the second resource nodes; wherein the scheduling parameter values of the second resource nodes are all smaller than the scheduling parameter values of the first resource nodes that are not selected among the first resource nodes.
[0092] Here, it should be noted that when the scheduling parameter value is the degree of difference corresponding to the first resource node, the lower the degree of difference, the higher the degree of possibility represented by the scheduling parameter value. Therefore, if the scheduling parameter value is the degree of difference corresponding to the first resource node, in order to improve the resource allocation rate and resource utilization, when selecting the second resource node, 1) select the first resource node whose scheduling parameter value is lower than the scheduling parameter threshold from the first resource node, and use the selected first resource node as the second resource node; 2) select the target number of first resource nodes from the first resource node according to the size of the scheduling parameter value, and use the selected first resource node as the second resource node. Here, the scheduling parameter values of the target number of first resource nodes are all less than the scheduling parameter values of other first resource nodes in the first resource node, and the other first resource nodes are different from the target number of first resource nodes. For example, when the number of first resource nodes is m (m is an integer greater than 1), the m first resource nodes can be first sorted in ascending order according to the size of the scheduling parameter value to obtain the sorting result, and the target number of first resource nodes ranked higher in the sorting result are selected from the m first resource nodes, and the selected first resource nodes are used as the second resource nodes. Based on this, it can be ensured that the ratio between the available resource amounts of the first category of resources in the selected second resource node and the ratio between the resource demand amounts of the first category of resources in the resource scheduling request are closer, so that the second resource node and the resource scheduling request are more matched, thereby improving the overall resource allocation rate and resource utilization rate and reducing the generation of fragmented resources.
[0093] In some embodiments, a scheduling parameter mapping relationship may be obtained, the scheduling parameter mapping relationship including a correspondence between resource demand, available resource, and scheduling parameter value; based on the resource demand of the resource scheduling request, the available resource of the first resource node, and the scheduling parameter mapping relationship, the scheduling parameter value of the first resource node is determined. For example, the scheduling parameter mapping relationship may be shown in the following formula:
[0094] H=|S1 / S1-V1 / V1|+|S2 / S1-V2 / V1|+|S3 / S1-V3 / V1|+…|Sn / S1-Vn / V1|;
[0095] Among them, H is the scheduling parameter value, Sn is the available resource amount of the nth first category resource, and Vn is the resource demand amount of the nth first category resource.
[0096] It should be noted that, in this embodiment, the lower the scheduling parameter value, the higher the degree of possibility represented by the scheduling parameter value. Therefore, when determining the second resource node from the first resource node based on the scheduling parameter value of the first resource node, 1) select the first resource node whose scheduling parameter value is lower than the scheduling parameter threshold from the first resource node, and use the selected first resource node as the second resource node; 2) select the target number of first resource nodes from the first resource node according to the size of the scheduling parameter value, and use the selected first resource node as the second resource node. Here, the scheduling parameter values of the target number of first resource nodes are all less than the scheduling parameter values of other first resource nodes in the first resource node, and the other first resource nodes are different from the target number of first resource nodes. For example, when the number of first resource nodes is m (m is an integer greater than 1), the m first resource nodes can be first sorted in ascending order according to the size of the scheduling parameter value to obtain a sorting result, and the target number of first resource nodes ranked higher in the sorting result are selected from the m first resource nodes, and the selected first resource nodes are used as the second resource nodes. Based on this, it can be ensured that the ratio between the available resource amounts of the first category of resources in the selected second resource node and the ratio between the resource demand amounts of the first category of resources in the resource scheduling request are closer, so that the second resource node and the resource scheduling request are more matched, thereby improving the overall resource allocation rate and resource utilization rate and reducing the generation of fragmented resources.
[0097] In some embodiments, see Figure 3E Based on the scheduling parameter value of the first resource node, the second resource node can be determined from the first resource node by executing the following steps 1031-1034: Step 1031, based on the scheduling parameter value of the first resource node, select the first resource node whose scheduling parameter value meets the scheduling conditions from the first resource node as the candidate resource node; Step 1032, when the scheduling parameter values of the candidate resource nodes are the same, for each candidate resource node, determine the target available resource amount of the second category of resources of the candidate resource node, and the first category of resources includes the second category of resources; Step 1033, based on the target available resource amount of the candidate resource node, determine the target scheduling parameter value of the candidate resource node; Step 1034, based on the target scheduling parameter value of the candidate resource node, determine the second resource node from the candidate resource nodes.
[0098] Here, the number of first resource nodes may be m, and the number of candidate resource nodes may be P, where m and P are both integers greater than 1.
[0099] For step 1031, the scheduling conditions can be set as needed. For example, the scheduling parameter value is used to characterize the possibility of the first resource node as the second resource node. Then, when selecting P candidate resource nodes whose scheduling parameter values meet the scheduling conditions, the first resource nodes corresponding to the scheduling parameter values that characterize the possibility higher than the degree threshold can be selected from the m first resource nodes as candidate resource nodes; or, the m first resource nodes are sorted in descending order according to the size of the possibility represented by the scheduling parameter value, and then a target number of first resource nodes with the highest ranking are selected from the m first resource nodes as candidate resource nodes. The target number can be set as needed.
[0100] For step 1032, since P is greater than 1, and if the scheduling parameter values of the P candidate resource nodes are the same, the P candidate resource nodes can be further selected to obtain a second resource node. That is, the target available resource amount of the resource indicated by the second category provided by each candidate resource node is continued to be determined, and the second category is one or more of the first categories. For example, if the first category is A, B, and C, then the second category can be A and B.
[0101] For step 1033, based on the target available resource amount of each candidate resource node, the target scheduling parameter value of each third resource node is determined. For example, a mapping relationship between the target available resource amount and the target scheduling parameter value can be preset, so that based on the mapping relationship, the target scheduling parameter value of each candidate resource node is determined according to the target available resource amount of each candidate resource node, and the target scheduling parameter value is used to characterize the possibility of the candidate resource node as a second resource node. For example, if the second category is a memory category and a CPU category, then the target scheduling parameter value can be proportional to the target available resource amount of the candidate resource node, that is, the higher the target available resource amount of the candidate resource node, the greater the possibility represented by the target scheduling parameter value.
[0102] For step 1034, based on the target scheduling parameter values of the P candidate resource nodes, the second resource node is determined from the P candidate resource nodes. For example, the target scheduling parameter value is used to characterize the possibility of the candidate resource node as the second resource node, then the candidate resource node corresponding to the scheduling parameter value that characterizes the possibility degree higher than the degree threshold can be selected from the P candidate resource nodes as the second resource node; or, the P candidate resource nodes are sorted in descending order according to the size of the possibility degree represented by the scheduling parameter value, and then the target number of candidate resource nodes ranked at the top of the P candidate resource nodes are selected as the second resource nodes, and the target number can be set as needed, for example, it can be 1.
[0103] Applying the above-mentioned embodiments of the present application, first determine the first resource node that matches the resource scheduling request, the category of the resources of the first resource node and the category of the resources of the resource scheduling request are the first category, and then determine the scheduling parameter value of the first resource node based on the resource demand of the resource scheduling request and the available resources of the first resource node, so as to determine the second resource node from the first resource node based on the scheduling parameter value of the first resource node, so as to schedule resources for the resource scheduling request from the resources of the second resource node.
[0104] Here, firstly, based on the category of resource nodes, the resource scheduling request is matched with the first resource node to speed up the resource scheduling efficiency; then, based on the scheduling parameter value, the resource scheduling request is matched with the second resource node from the first resource node to schedule resources for the resource scheduling request from the second resource node, and the scheduling parameter value is determined based on the resource demand and the available resource amount of the first resource node, which can ensure that the resource node (i.e., the second resource node) used for scheduling resources satisfies the resource scheduling request, thereby ensuring the rationality of resource scheduling and improving the accuracy of resource scheduling. In this way, based on the embodiment of the present application, the resource scheduling effect is improved.
[0105] The following describes an exemplary application of the embodiment of the present application in an actual application scenario. First, the terms involved are described, including: 1) Resource labels (i.e., categories, where the resource categories are used as resource labels), which are used to mark the matching of specifications and resource nodes (such as physical machines and virtual machines). In openstack, resource nodes with the same labels can be scheduled by matching the specification labels. 2) Flavors, which are used to define the specifications of resources such as CPU, memory, and disk of resource nodes.
[0106] Resource scheduling solutions in related technologies include: Solution 1) Figure 4A As shown in Figure 1, physical machines with the same attributes are usually divided into a resource pool, such as Figure 4A As shown in the resource pool 1-3, a resource tag is added to the physical machine in a resource pool, and the same resource tag is also added to the specification that needs to apply for the corresponding resource tag. When a virtual machine is created through a specification application, it will be scheduled to a physical machine with the same tag according to the tag matching rules of the specification. Solution 2) Figure 4B As shown in Figure 1, one or more resource tags are added according to the capabilities that the physical machines can provide, and physical machines with different attributes are divided into a resource pool, such as Figure 4B The hybrid resource pool shown in the figure. When a virtual machine is created through a specification application, it will be scheduled to a physical machine with the same resource tag based on the tag matching rules of the specification.
[0107] However, Solution 1 has the following problems: 1) Fragmented resources: Physical machines with the same attributes are divided into a resource pool, and resources are relatively isolated. Due to different configuration specifications, after the memory of resource 1 is allocated, there may still be idle CPU resources that have not been allocated. It may also cause the local disk resources of resource 2 to be allocated, but the CPU and memory are still idle fragmented resources. 2) Low overall utilization of the resource pool: The allocation rate of the entire resource pool for resources allocated to a task may be low due to the small size of the task applying for resources with a certain label specification. Solution 2 has the following problems: 1) Fragmented resources: Physical machines with multiple labels will not select the lowest-cost physical machine to start resources due to the successful matching of a single label, which will exhaust the CPU and memory resources and cause the local disk or GPU resources to remain idle.
[0108] Based on this, an embodiment of the present application provides a resource scheduling method, which is described in detail below using a resource node as a physical machine as an example.
[0109] 1. Define the resource tag type. Figure 5 As shown in the figure, the computing resource pool (including M physical machines) is not divided, but the computing resource pool is taken as a whole, and the different types of resources provided by the computing resource pool are abstracted into several resource label types, such as CPU type, GPU type (which can be further subdivided according to the specific GPU model), and local disk type (which can be subdivided into SSD / HDD according to different storage media). For example, the CPU type includes CPU label and memory label; the local disk type includes CPU label, memory label and local disk label, and so on.
[0110] 2. Define the conversion rules for integrals (i.e. the above resource values).
[0111] For example, the conversion rule of CPU label points and resource quantity = Xc points / core; the conversion rule of memory label points and resource quantity = Xm points / G; the conversion rule of local disk label points and resource quantity = Xd points / G; the conversion rule of GPU label points and resource quantity = Xg points / table. For example, one CPU core is converted to one point, and the Xc variable here is equal to 1 point.
[0112] 3. Define the maximum available resource credits for each resource tag based on the CPU, memory, GPU, disk size, etc. of the physical machine.
[0113] For example, if a physical machine is configured as follows: CPU 40 cores, memory 80G, disk 1000G, then two resource tag types can be defined for it. Given the integral definition rule in the second step, Xc, Xd, Xg, and Xm are all equal to 1, then:
[0114] Resource tag type 1: CPU type (CPU maximum available resource points (corresponding to the CPU tag): memory maximum available resource points (corresponding to the memory tag)) = CPU type (maximum allocatable number of CPU cores * Xc: maximum allocatable memory size * Xm);
[0115] Resource tag type 2: Local disk type (CPU maximum available resource points (corresponding to the CPU tag): memory maximum available resource points (corresponding to the memory tag): local disk maximum available resource points (corresponding to the local disk tag)) = local disk type (maximum allocatable number of CPU cores * Xc: maximum allocatable memory size * Xm: maximum allocatable local disk size * Xd).
[0116] The maximum allocatable number of CPU cores 1+the maximum allocatable number of CPU cores 2<=the maximum allocatable number of physical CPUs or virtual CPU cores of the current physical machine.
[0117] See also Figure 6 , the optimal physical machine weight scheduling matching rules (taking CPU type specifications as an example, other label type rules are the same), including:
[0118] 1. Label each physical machine and label the resource scheduling requirements.
[0119] 2. According to the different configurations of each physical machine, allocate the maximum available resource points to each label.
[0120] 3. From the computing resource pool, filter out the physical machines that do not have the same label as the resource scheduling requirement and whose available resource points are insufficient to meet the resource scheduling requirement to obtain the target physical machine.
[0121] 4. Obtain the label resource score ratio of the target physical machine.
[0122] The label resource credit ratio of the target physical machine = CPU available resource credits: memory available resource credits: local disk available resource credits) = (CPU maximum available resource credits - consumed credits): (memory maximum available resource credits - consumed credits): (local disk maximum available resource credits - consumed credits) = Sc:Sy:Sd.
[0123] 5. Calculate the label resource integral ratio of resource scheduling requirements.
[0124] The label resource credit ratio of the resource scheduling requirement = the number of CPU cores requested*Xc: the amount of memory requested*Xm: the disk size requested*Xd=Vc:Vy:Vd.
[0125] 6. Calculate the scheduling weight of the physical machine (i.e. the above scheduling parameter value), and select the physical machine with the smallest H value as the best host for scheduling.
[0126] Wherein, H=|Sc / Sc-Vc / Vc|+|Sy / Sc-Vy / Vc|+|Sd / Sc-Vd / Vc|;
[0127] Example: Resource credit ratio of physical machine A label 2 local disk type = Sc:Sy:Sd = (20:40:1000)
[0128] Resource credit ratio of physical machine B label 2 local disk type = Sc:Sy:Sd = (20:80:1000)
[0129] Resource credit ratio of the local disk type of the applied specification label = Vc:Vy:Vd = (1:4:50)
[0130] Weight of physical machine A:
[0131] H=|Sc / Sc-Vc / Vc|+|Sy / Sc-Vy / Vc|+|Sd / Sc-Vd / Vc|=|20 / 20-1 / 1|+|40 / 20-4 / 1|+|1000 / 20-50 / 1|=0+2+0=2;
[0132] The weight of physical machine B:
[0133] H=|Sc / Sc-Vc / Vc|+|Sy / Sc-Vy / Vc|+|Sd / Sc-Vd / Vc|=|20 / 20-1 / 1|+|80 / 20-4 / 1|+|1000 / 20-50 / 1|=0+0+0=0.
[0134] 7. If there are multiple identical minimum H values, the larger the S value (CPU available resource points + memory available resource points) in the label, the higher the selection weight.
[0135] 8. Each time a physical machine is selected for selection and starts to consume resources, the available resource points of the physical machine are updated.
[0136] Here, each time a virtual machine is migrated or destroyed, the available resource points of the physical machine are also updated.
[0137] Applying the above embodiments of the present application, 1) reducing the generation of fragmented resources: selecting the scheduling rules of the best host through the resource ratio of the resource configuration and resource scheduling requirements in the label, effectively reducing the fragmentation of some resources caused by different resource ratios. 2) Avoiding the idleness of physical machine resources in a single resource pool: by incorporating physical machines with different attributes into a resource pool, breaking the resource isolation, thereby avoiding idle resources due to small application requirements for a single resource pool. 3) Solving the problem of physical hosts with local disk or GPU resources in hybrid resource pool scenarios will not be idle because the CPU and memory resources are allocated, but the local disk resources or GPU resources cannot be allocated. The maximum resource points that can be activated through the resources defined in the label, the physical machine resources are divided according to the different label types, and the maximum number of resources that can be allocated for each label type is pre-limited, thereby ensuring the allocation rate of local disk and GPU resources.
[0138] The following is a description of an exemplary structure of the resource scheduling device 555 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the resource scheduling device 555 of the memory 550 may include: a first determination module 5551, used to determine a first resource node that matches a resource scheduling request, wherein the category of resources of the first resource node and the category of resources of the resource scheduling request are the first category; a second determination module 5552, used to determine, for each first resource node, a scheduling parameter value of the first resource node based on the resource demand of the resource scheduling request and the available resources of the first resource node; a third determination module 5553, used to determine a second resource node from the first resource node based on the scheduling parameter value of the first resource node; and a resource adjustment module 5554, used to schedule resources for the resource scheduling request from the resources of the second resource node.
[0139] In some embodiments, there are at least two resource nodes, and the first determination module 5551 is also used to determine the resource requirement of the resource scheduling request; determine the resource category of each resource node, and determine the available resources of each resource node; and determine the resource node whose resource category is the first category and whose available resources are greater than or equal to the resource requirement as the first resource node.
[0140] In some embodiments, the first determination module 5551 is further used to determine the resource requirement quantity of the resource scheduling request, and obtain a first mapping relationship between the resource requirement quantity and the resource requirement amount; and determine the resource requirement amount based on the resource requirement quantity and the first mapping relationship.
[0141] In some embodiments, the first determination module 5551 is also used to obtain the maximum number of available resources of the resource node, and obtain a second mapping relationship between the maximum number of available resources and the maximum available resource amount; determine the maximum available resource amount of the resource node based on the maximum number of available resources and the second mapping relationship; obtain the used resource amount of the resource node, and determine the available resource amount based on the maximum available resource amount and the used resource amount.
[0142] In some embodiments, when the first category is one, the second determination module 5552 is further used to determine the difference between the available resource amount of the first resource node and the resource demand amount; and determine the difference as the scheduling parameter value of the first resource node.
[0143] In some embodiments, when the number of the first categories is N, N is an integer greater than 1, and the second determination module 5552 is further used to determine a first ratio between the resource requirements of the N first categories of resources requested by the resource scheduling; determine a second ratio between the available resource amounts of the N first categories of resources of the first resource node; determine the degree of difference between the second ratio and the first ratio; and determine the degree of difference as the scheduling parameter value of the first resource node.
[0144] In some embodiments, the third determination module 5553 is also used to determine a first resource node among the first resource nodes whose scheduling parameter value is lower than a scheduling parameter threshold as a second resource node; or, according to the size of the scheduling parameter value, select a target number of first resource nodes from the first resource nodes as the second resource nodes; wherein the scheduling parameter values of the second resource nodes are all smaller than the scheduling parameter values of the first resource nodes that are not selected among the first resource nodes.
[0145] In some embodiments, the second determination module 5552 is also used to obtain a scheduling parameter mapping relationship, wherein the scheduling parameter mapping relationship includes a correspondence between resource demand, available resource and scheduling parameter value; based on the resource demand of the resource scheduling request, the available resource of the first resource node and the scheduling parameter mapping relationship, the scheduling parameter value of the first resource node is determined.
[0146] In some embodiments, the third determination module 5553 is also used to select, from the first resource nodes, a first resource node whose scheduling parameter value meets the scheduling conditions as a candidate resource node based on the scheduling parameter value of the first resource node; when the scheduling parameter values of the candidate resource nodes are the same, for each candidate resource node, determine the target available resource quantity of the second category of resources of the candidate resource node, the first category of resources including the second category of resources; and, based on the target available resource quantity of the candidate resource node, determine the target scheduling parameter value of the candidate resource node; based on the target scheduling parameter value of the candidate resource node, determine the second resource node from the candidate resource nodes.
[0147] It should be noted that the description of the device embodiment in this application is similar to the description of the method embodiment above, and has similar beneficial effects as the method embodiment, which will not be described in detail here. The unfinished technical details in the resource scheduling device provided in the embodiment of this application can be understood based on the description of the technical details in the method embodiment above.
[0148] The embodiment of the present application also provides a computer program product, which includes computer executable instructions or computer programs, and the computer executable instructions or computer programs are stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instructions or computer program from the computer-readable storage medium, and the processor executes the computer executable instructions or computer program, so that the electronic device executes the resource scheduling method provided in the embodiment of the present application.
[0149] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions or a computer program are stored. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the resource scheduling method provided in the embodiment of the present application.
[0150] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
[0151] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0152] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0153] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0154] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A resource scheduling method, characterized in that: The method comprises: Determine a first resource node that matches the resource scheduling request, wherein the category of resources of the first resource node and the category of resources of the resource scheduling request are the first category; For each first resource node, determining a scheduling parameter value of the first resource node based on the resource demand of the resource scheduling request and the available resources of the first resource node; Determining a second resource node from among the first resource nodes based on the scheduling parameter value of the first resource node; Resources are scheduled for the resource scheduling request from resources of the second resource node.
2. The method according to claim 1, characterized in that There are at least two resource nodes, and determining the first resource node that matches the resource scheduling request includes: Determining the resource requirement of the resource scheduling request; Determine the resource category of each resource node and determine the available resource amount of each resource node; A resource node whose resource category is the first category and whose available resource amount is greater than or equal to the resource demand amount is determined as a first resource node.
3. The method according to claim 2, characterized in that The determining of the resource requirement of the resource scheduling request includes: Determine the resource requirement quantity of the resource scheduling request, and obtain a first mapping relationship between the resource requirement quantity and the resource requirement amount; The resource requirement is determined based on the resource requirement quantity and the first mapping relationship.
4. The method according to claim 2, characterized in that The determining of the available resource amount of each resource node includes: Acquire the maximum available resource quantity of the resource node, and acquire a second mapping relationship between the maximum available resource quantity and the maximum available resource amount; Determine the maximum available resource amount of the resource node based on the maximum available resource quantity and the second mapping relationship; The used resource amount of the resource node is obtained, and the available resource amount is determined based on the maximum available resource amount and the used resource amount.
5. The method according to claim 1, characterized in that In a case where the first category is one, determining the scheduling parameter value of the first resource node based on the resource demand of the resource scheduling request and the available resource amount of the first resource node includes: Determining the difference between the available resource amount of the first resource node and the resource demand amount; The degree of difference is determined as a scheduling parameter value of the first resource node.
6. The method according to claim 1, characterized in that In the case where there are N first categories, N is an integer greater than 1; determining the scheduling parameter value of the first resource node based on the resource demand of the resource scheduling request and the available resource amount of the first resource node includes: Determine a first ratio between resource requirements of N first category resources of the resource scheduling request; Determining a second ratio between available resource amounts of N resources of the first category of the first resource node; determining a degree of difference between the second ratio and the first ratio; The degree of difference is determined as a scheduling parameter value of the first resource node.
7. The method according to claim 5 or 6, characterized in that The determining the second resource node from the first resource node based on the scheduling parameter value of the first resource node includes: Determine a first resource node among the first resource nodes whose scheduling parameter value is lower than a scheduling parameter threshold as a second resource node; Alternatively, according to the value of the scheduling parameter, a target number of first resource nodes are selected from the first resource nodes as the second resource nodes; Among them, the scheduling parameter values of the second resource nodes are all smaller than the scheduling parameter values of the first resource nodes that are not selected among the first resource nodes.
8. The method according to claim 1, characterized in that The determining, based on the resource demand of the resource scheduling request and the available resource amount of the first resource node, a scheduling parameter value of the first resource node includes: Obtaining a scheduling parameter mapping relationship, wherein the scheduling parameter mapping relationship includes a correspondence between resource demand, available resource, and scheduling parameter value; Based on the resource demand of the resource scheduling request, the available resource amount of the first resource node and the scheduling parameter mapping relationship, a scheduling parameter value of the first resource node is determined.
9. The method according to claim 1, characterized in that The determining the second resource node from the first resource node based on the scheduling parameter value of the first resource node includes: Based on the scheduling parameter value of the first resource node, selecting a first resource node whose scheduling parameter value meets the scheduling condition from the first resource nodes as a candidate resource node; In the case where the scheduling parameter values of the candidate resource nodes are all the same, determining, for each candidate resource node, a target available resource amount of the second category of resources of the candidate resource node, wherein the first category of resources includes the second category of resources; and Determining a target scheduling parameter value of the candidate resource node based on a target available resource amount of the candidate resource node; Based on the target scheduling parameter value of the candidate resource node, a second resource node is determined from the candidate resource nodes.
10. A resource scheduling device, characterized in that: The device comprises: A first determination module, configured to determine a first resource node that matches the resource scheduling request, wherein the category of resources of the first resource node and the category of resources of the resource scheduling request are the first category; A second determination module is used to determine, for each first resource node, a scheduling parameter value of the first resource node based on the resource demand of the resource scheduling request and the available resources of the first resource node; A third determination module, configured to determine a second resource node from the first resource nodes based on the scheduling parameter value of the first resource node; A resource scheduling module is used to schedule resources for the resource scheduling request from the resources of the second resource node.
11. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; A processor, configured to implement the resource scheduling method according to any one of claims 1 to 9 when executing the computer executable instructions stored in the memory.
12. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer programs are executed by a processor, the resource scheduling method described in any one of claims 1 to 9 is implemented.
13. A computer program product comprising computer executable instructions or a computer program, characterized in that: When the computer executable instructions or computer programs are executed by a processor, the resource scheduling method described in any one of claims 1 to 9 is implemented.
