A resource scheduling method and device for cloud platform virtual machines

By calculating the boxing scheduling watermark and weight sorting, the resource scheduling of virtual machines on the cloud platform is optimized, which solves the problem of high host memory fragmentation rate, improves resource utilization, and supports the deployment of larger-sized virtual machines.

CN116048714BActive Publication Date: 2024-09-27CHINA TELECOM CLOUD TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202211457419.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-21
Publication Date
2024-09-27
Estimated Expiration
2042-11-21

AI Technical Summary

Technical Problem

Existing cloud platform resource scheduling methods lead to high host memory fragmentation rates, resulting in resource waste and the inability to open larger-sized virtual machines.

Method used

By calculating the resource pool's packing scheduling water level and the weight of the host, virtual machines are prioritized to be placed on hosts with less remaining memory resources, and sorted according to the memory allocation rate and preset health thresholds to optimize resource allocation.

Benefits of technology

It reduces host memory fragmentation resources, improves resource pool memory resource utilization, and enables more effective use of cloud platform resources, especially when running multiple virtual machines with larger specifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116048714B
    Figure CN116048714B
Patent Text Reader

Abstract

The present application discloses a resource scheduling method and device for cloud platform virtual machines, including first obtaining an initial host list, calculating the packing scheduling waterline of the resource pool corresponding to the initial host list, and calculating the weight of each candidate host in the initial host list. Then, the initial host list is weighted and sorted according to the memory requirements of each candidate host in the initial host list and the size of the packing scheduling waterline to obtain a first host list. Finally, the first host list is sorted according to the degree of matching between the memory allocation rate of each candidate host in the first host list and the preset health threshold, and a target host list is obtained. According to the order of the target host list, the resources of the virtual machines are allocated. In the present application, by preferentially placing virtual machines on hosts with less remaining memory resources, the host memory fragmentation resources are reduced and the memory resource utilization rate of the entire resource pool is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of resource scheduling, and in particular to a resource scheduling method and device for a cloud platform virtual machine. Background Art

[0002] Cloud computing is an Internet-based supercomputing model. In remote data centers, thousands of servers are connected to form a cloud. Its core is to use the Internet as the center, coordinate many computer resources together, and provide fast and secure cloud computing services and data storage services.

[0003] In the prior art, existing resource scheduling selects hosts with relatively idle resources, but the cloud will cause each host to have a lot of fragmented resources vacant. As the cluster scale expands, these fragmented resources are wasted more and more. When the cluster is used to a certain extent, there are more idle resource fragments, resulting in a higher fragmentation rate in the resource pool. Summary of the invention

[0004] In view of the existing problems, this application proposes a resource scheduling method and device for cloud platform virtual machines. The specific technical solution is as follows:

[0005] In a first aspect of the present application, a resource scheduling method for a cloud platform virtual machine is provided, the method comprising:

[0006] Obtain the initial host list and calculate the packing scheduling watermark of the resource pool corresponding to the initial host list;

[0007] Calculate the weight of each candidate host in the initial host list;

[0008] According to the memory requirement of each candidate host in the initial host list and the size of the packing scheduling watermark, the initial host list is weighted and sorted to obtain a first host list;

[0009] According to the matching degree between the memory allocation rate of each candidate host in the first host list and the preset health threshold, the first host list is sorted by matching degree to obtain a target host list;

[0010] The resources of the virtual machines are allocated according to the order of the target host list.

[0011] Optionally, the step of calculating the packing scheduling watermark of the resource pool corresponding to the initial host list includes:

[0012] Get the memory specifications in the resource pool and the number of virtual machines that match the memory specifications;

[0013] The packing scheduling watermark of the resource pool is calculated based on the memory specifications and the number of virtual machines that match the memory specifications.

[0014] Optionally, the step of calculating the weight of each candidate host in the initial host list includes:

[0015] Determine the remaining allocatable memory for each candidate host;

[0016] Determine the remaining maximum allocatable memory and the remaining minimum allocatable memory of all candidate hosts in the initial host list;

[0017] The weight of each candidate host in the initial host list is calculated according to the remaining allocatable memory, the remaining maximum allocatable memory, and the remaining minimum allocatable memory of each candidate host.

[0018] Optionally, the step of weighting the initial host list according to the memory requirement of each candidate host in the initial host list and the size of the packing scheduling watermark includes:

[0019] If the memory requirement of the candidate host is greater than the packing scheduling watermark, the candidate hosts in the initial host list are sorted in ascending order of weight;

[0020] If the memory requirement of the candidate host is less than or equal to the packing scheduling watermark, the candidate hosts in the initial host list are sorted in descending order of weight.

[0021] Optionally, the health threshold is obtained by:

[0022] Obtain the upper and lower limits of resource utilization;

[0023] A health threshold is calculated according to an upper limit value of resource utilization and its corresponding first weight, a lower limit value of resource utilization and its corresponding second weight.

[0024] Optionally, the memory allocation ratio is obtained by:

[0025] Get the allocated memory and total memory of the candidate host, as well as the requested memory of the virtual machine;

[0026] The health threshold is calculated based on the allocated memory and total memory of the candidate host and the requested memory of the virtual machine.

[0027] Optionally, according to the matching degree between the memory allocation rate of each candidate host in the first host list and a preset health threshold, the step of sorting the first host list by matching degree includes:

[0028] Determine the evaluation score of each candidate host machine according to the matching degree between the memory allocation rate of each candidate host machine and the preset health threshold;

[0029] The first host list is sorted in descending order according to the evaluation score of each candidate host.

[0030] In a second aspect of the present application, a resource scheduling device for a cloud platform virtual machine is provided, the device comprising:

[0031] An acquisition module is used to obtain an initial host list and calculate a packing scheduling watermark of a resource pool corresponding to the initial host list;

[0032] A weight calculation module is used to calculate the weight of each candidate host in the initial host list;

[0033] A first sorting module is used to weight the initial host list according to the memory requirement of each candidate host in the initial host list and the size of the packing scheduling watermark to obtain a first host list;

[0034] A second sorting module is used to sort the first host list according to the matching degree between the memory allocation rate of each candidate host in the first host list and the preset health threshold, so as to obtain a target host list;

[0035] The resource scheduling module is used to allocate resources of the virtual machines according to the order of the target host list.

[0036] Optionally, obtain a module, including:

[0037] The parameter acquisition submodule is used to obtain the memory specifications in the resource pool and the number of virtual machines matching the memory specifications;

[0038] The packing scheduling watermark calculation submodule is used to calculate the packing scheduling watermark of the resource pool according to the memory specification and the number of virtual machines matching the memory specification.

[0039] Optionally, the weight calculation module includes:

[0040] The allocated memory determination submodule is used to determine the remaining allocatable memory of each candidate host;

[0041] A memory parameter determination submodule is used to determine the remaining maximum allocatable memory and the remaining minimum allocatable memory of all candidate hosts in the initial host list;

[0042] The weight calculation submodule is used to calculate the weight of each candidate host in the initial host list according to the remaining allocatable memory, the remaining maximum allocatable memory and the remaining minimum allocatable memory of each candidate host.

[0043] Optionally, the first sorting module includes:

[0044] The ascending sorting submodule is used to sort the candidate hosts in the initial host list in ascending order of weight if the memory requirement of the candidate host is greater than the packing scheduling watermark;

[0045] The descending sorting submodule is used to sort the candidate hosts in the initial host list in descending order of weight if the memory requirement of the candidate host is less than or equal to the packing scheduling watermark.

[0046] Optionally, the second sorting module includes:

[0047] An evaluation score calculation submodule is used to determine the evaluation score of each candidate host machine according to the matching degree between the memory allocation rate of each candidate host machine and the preset health threshold;

[0048] The sorting submodule is used to sort the first host list in descending order according to the evaluation score of each candidate host.

[0049] In a third aspect of the present application, an electronic device is provided. The device includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the method of the first aspect.

[0050] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and a processor executes the computer program to implement the method of the first aspect.

[0051] This application has the following beneficial effects:

[0052] In an embodiment of the present application, the initial host list is first obtained, and the packing scheduling waterline of the resource pool corresponding to the initial host list is calculated, and the weight of each candidate host in the initial host list is calculated. Then, according to the memory requirements of each candidate host in the initial host list and the size of the packing scheduling waterline, the initial host list is weighted and sorted to obtain a first host list. Finally, according to the degree of match between the memory allocation rate of each candidate host in the first host list and the preset health threshold, the first host list is sorted for matching, a target host list is obtained, and virtual machine resources are allocated according to the order of the target host list. In the present application, virtual machines are preferentially placed on hosts with less remaining memory resources, thereby reducing host memory fragmentation resources and improving the memory resource utilization of the entire resource pool.

[0053] In other embodiments of the present application, in order to avoid overheating of host resource allocation caused by packaging, rebalancing is performed based on resource health thresholds. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0055] Figure 1 A schematic diagram of the structure of an electronic device of a hardware operating environment involved in an embodiment of the present application;

[0056] Figure 2 The present invention is a flowchart of a resource scheduling method for a cloud platform virtual machine according to an exemplary embodiment;

[0057] Figure 3 A comparison chart of the memory fragmentation rate of each resource pool before and after the implementation of the application method;

[0058] Figure 4 The present invention is a block diagram of a resource scheduling device for a cloud platform virtual machine according to an exemplary embodiment. DETAILED DESCRIPTION

[0059] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0060] In the related technology, the resource scheduling of the cloud platform is to schedule the virtual machine to run on the optimal host machine, and good resource scheduling can maximize the utilization of the host machine's resources. The core of scheduling is the scheduling algorithm, such as selecting a host machine with less memory usage, less CPU usage, and less disk usage for scheduling. These algorithms all select host machines with relatively idle resources, but the cloud system will bring some problems during the actual operation, that is, each host machine will have a lot of fragmented resources free. As the cluster scale expands, these fragmented resources are wasted more and more. When the cluster is used to a certain extent, there are many idle resource fragments and no complete large blocks of idle resources, which will result in the inability to start a larger virtual machine or a virtual machine of the currently applied specification. In fact, these fragments added together can accommodate a larger virtual machine or a virtual machine of the currently applied specification. Therefore, the existing resource scheduling method cannot fully utilize the resources of the cloud platform.

[0061] In response to the above problems, the specific concept provided by the embodiment of the present application is: when creating a virtual machine in the cloud platform, the resource usage of the current host machine is utilized to give priority to a host machine with fewer remaining resources, so that the issued virtual machine occupies the resources of the host machine, and the host machine with fewer resources is fully utilized first. This method aims to maximize the utilization of fragmented resources on the host machine, especially memory fragmentation resources, so that the memory resources of each host machine in the cloud platform are fully utilized, and more virtual machines can be opened, especially larger virtual machines.

[0062] Reference Figure 1 , Figure 1 A schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiment of the present application.

[0063] like Figure 1 As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0064] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0065] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and an electronic program.

[0066] exist Figure 1In the electronic device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the electronic device, and the electronic device calls the resource scheduling device for the cloud platform virtual machine stored in the memory 1005 through the processor 1001, and executes the resource scheduling method for the cloud platform virtual machine provided in the embodiment of the present application.

[0067] Reference Figure 2 Based on the aforementioned hardware operating environment, an embodiment of the present application provides a resource scheduling method for a cloud platform virtual machine, comprising the following steps:

[0068] S201: Obtain an initial host list, and calculate a packing scheduling watermark of a resource pool corresponding to the initial host list.

[0069] In this embodiment, the host machines in the initial host machine list can be all the host machines for building the cloud platform. The hardware resources of the host machines, that is, the memory and computing power of the host machines, together constitute a resource pool. In order to avoid centralizing the large-scale virtual machines in the resource pool, it is necessary to set a watermark for packing scheduling. When the resources requested by the virtual machine are less than or equal to the watermark, the packing strategy is started. The steps for calculating the packing scheduling watermark can be:

[0070] S201-1: Obtain memory specifications in a resource pool and the number of virtual machines matching the memory specifications.

[0071] In this embodiment, the memory specification refers to the memory size requested by the virtual machine when it is created. The memory size requested by different virtual machines may be different, so there will be multiple specifications. The respective memory specifications in the resource pool and the number of virtual machines matching the specifications are counted.

[0072] S201 - 2: Calculate the packing scheduling watermark of the resource pool according to the memory specification and the number of virtual machines matching the memory specification.

[0073] In this implementation, after determining the memory specification in the resource pool and the number of virtual machines matching the memory specification, the packing scheduling waterline of the resource pool is calculated according to the formula shown in Formula 1.

[0074]

[0075] Where M i and C i They respectively represent the memory specification of the virtual machine in the current resource pool and the total number of virtual machines with this memory specification.

[0076] S202: Calculate the weight of each candidate host in the initial host list.

[0077] In this embodiment, the smaller the remaining memory of the candidate host machine, the higher the corresponding resource score, and the higher the resource score, the higher the weight of the candidate host machine. The step of calculating the weight of each candidate host machine in the initial host machine list can be:

[0078] S202-1: Determine the remaining allocatable memory of each candidate host machine;

[0079] S202-2: Determine the remaining maximum allocatable memory and the remaining minimum allocatable memory of all candidate hosts in the initial host list;

[0080] S202 - 3 : Calculate the weight of each candidate host in the initial host list according to the remaining allocatable memory, the remaining maximum allocatable memory, and the remaining minimum allocatable memory of each candidate host.

[0081] In the implementation of S202-1 to S202-3, the remaining allocatable memory of each candidate host is obtained, and then the maximum allocatable memory and the remaining minimum allocatable memory of the candidate host in the initial host list are determined, and then the weight of each candidate host is calculated according to the formula shown in Formula 2.

[0082]

[0083] Among them, M max 、M min and M i They represent the maximum value of the remaining allocatable memory among all candidate hosts, the minimum value of the remaining allocatable memory, and the remaining allocatable memory of a specific host node.

[0084] S203: According to the memory requirement of each candidate host in the initial host list and the size of the packing scheduling watermark, the initial host list is weighted and sorted to obtain a first host list.

[0085] In this embodiment, after obtaining the packing scheduling waterline, each candidate host machine can be evaluated according to the packing scheduling waterline, and then the host machine with less remaining memory can be preferentially selected. The specific steps can be:

[0086] S203-1: If the memory requirement of the candidate host is greater than the packing scheduling watermark, sort the candidate host in the initial host list in ascending order of weight;

[0087] S203-2: If the memory requirement of the candidate host machine is less than or equal to the packing scheduling watermark, the candidate host machines in the initial host machine list are sorted in descending order of weight.

[0088] In the implementation of S203-1 to S203-2, for any candidate host machine, the candidate host machine is sorted by the memory requirement set in the candidate host machine, and if the memory requirement of the candidate host machine is greater than the packing scheduling watermark, the candidate host machines in the initial host machine list are sorted in ascending order of weight, and if the memory requirement of the candidate host machine is less than or equal to the packing scheduling watermark, the candidate host machines in the initial host machine list are sorted in descending order of weight. After the sorting is completed, the candidate hosts are combined in the sorting order from high to low, thereby generating a first host machine list.

[0089] S204: According to the matching degree between the memory allocation rate of each candidate host in the first host list and the preset health threshold, the first host list is sorted by matching degree to obtain a target host list.

[0090] In this embodiment, since the packing strategy will cause a surge in the number of virtual machines on the physical machine, affecting the performance of the virtual machines, it is necessary to rebalance the virtual machines on the host machines. Therefore, after obtaining the first host list, first obtain the first part of the host machines in the queue to be selected according to a certain ratio, change the ratio parameter, and then further screen them according to the host load rate. The specific steps can be:

[0091] S204-1: Determine an evaluation score for each candidate host machine according to the degree of matching between the memory allocation rate of each candidate host machine and a preset health threshold.

[0092] In this embodiment, the memory allocation rate refers to the load status of the host machine, and the working status of the host machine can be determined according to the memory allocation rate. The working status of the host machine is generally divided into three states: overload, normal and underload.

[0093] In a feasible implementation manner, the memory allocation ratio is obtained by the following steps:

[0094] Get the allocated memory and total memory of the candidate host, as well as the requested memory of the virtual machine;

[0095] The health threshold is calculated based on the allocated memory and total memory of the candidate host and the requested memory of the virtual machine.

[0096] In this embodiment, first, the allocated memory and total memory of each candidate host machine and the requested memory of the virtual machine are obtained, and then the memory allocation rate of each candidate host machine is calculated according to the formula shown in Formula 3.

[0097]

[0098] Among them, Mu, Mi, and Ms represent the memory allocated by the host, the memory requested by the current virtual machine, and the total memory of the host, respectively.

[0099] In a feasible implementation, the health threshold is obtained by the following steps:

[0100] Obtain the upper and lower limits of resource utilization;

[0101] A health threshold is calculated according to an upper limit value of resource utilization and its corresponding first weight, a lower limit value of resource utilization and its corresponding second weight.

[0102] In this implementation, first, the upper limit value and the lower limit value of the resource utilization of the system are obtained, and then the health threshold is calculated according to the formula shown in Formula 4.

[0103] HT=u*LT+(1-u)*UT 0 <u<1 (4)

[0104] Among them, u is the second weight, UT is the upper limit of resource utilization, 1-u is the first weight, and LT is the lower limit of resource utilization.

[0105] For any candidate host machine, the closer its memory allocation rate is to the health threshold, the higher its corresponding evaluation score is. Based on this evaluation criterion, the evaluation score of each candidate host machine is determined.

[0106] S204 - 2 : Sort the first host list in descending order according to the evaluation score of each candidate host.

[0107] In this embodiment, after obtaining the evaluation score of each candidate host in the first host list, the first host list is sorted in descending order of the score, thereby obtaining a target host list.

[0108] S205: Allocate resources of the virtual machines according to the order of the target host list.

[0109] In this embodiment, after obtaining the target host list, the virtual machines are deployed by preferentially selecting the hosts in the target host list in order.

[0110] In the implementation of S201 to S205 of the present application, the packing scheduling waterline is calculated according to the existing virtual machine status of the resource pool, and the host machines are sorted according to the memory weighing algorithm, and the host machines with less remaining memory are preferentially selected. In order to avoid overheating of the virtual machines on the host machine, the resource saturation of the host machine is evaluated to select a host machine with healthy saturation.

[0111] The following is an example of a complete virtual machine creation to illustrate the solution of this application. The process is as follows:

[0112] S1: After obtaining the list of available hosts to be allocated, the packing water level threshold of the resource pool is calculated according to the packing water level calculation formula.

[0113] S2: Calculate the weight Wi of each host machine according to the weighing algorithm, and determine whether the memory requested by the virtual machine is greater than the watermark threshold. If so, sort the list in ascending order, otherwise sort it in descending order.

[0114] S3: Obtain the first part of the host machines in the queue to be selected according to a certain ratio, and change the ratio parameter percentThreshold. Set the value according to the actual situation.

[0115] S4: Arrange the host list according to the degree to which the host memory allocation rate Ti is close to HT. The closer the host memory allocation rate Ti is, the higher the score.

[0116] S5: Return the sorted host list.

[0117] In this implementation, the memory fragmentation rate refers to the ratio of the remaining memory resources on some hosts in a resource pool to the total memory of these hosts, which cannot meet the 128GB memory specification. Figure 3 As shown, Figure 3 The diagram is a comparison of the memory fragmentation rate of each resource pool before and after the method of the present application is implemented. It can be seen that the memory fragmentation rate in the resource pool will be reduced by adopting the method of the present application.

[0118] Reference Figure 4 , Figure 4 is a block diagram of a resource scheduling device 400 for a cloud platform virtual machine according to an exemplary embodiment. Figure 4 As shown, the device 400 includes:

[0119] The acquisition module 410 is used to acquire an initial host list and calculate a packing scheduling watermark of a resource pool corresponding to the initial host list;

[0120] A weight calculation module 420 is used to calculate the weight of each candidate host in the initial host list;

[0121] A first sorting module 430 is used to weight the initial host list according to the memory requirement of each candidate host in the initial host list and the size of the packing scheduling watermark to obtain a first host list;

[0122] The second sorting module 440 is used to sort the first host list according to the matching degree between the memory allocation rate of each candidate host in the first host list and the preset health threshold, so as to obtain a target host list;

[0123] The resource scheduling module 450 is used to allocate resources of the virtual machines according to the order of the target host list.

[0124] In a feasible implementation, the acquisition module 410 includes:

[0125] The parameter acquisition submodule is used to obtain the memory specifications in the resource pool and the number of virtual machines matching the memory specifications;

[0126] The packing scheduling watermark calculation submodule is used to calculate the packing scheduling watermark of the resource pool according to the memory specification and the number of virtual machines matching the memory specification.

[0127] In a feasible implementation, the weight calculation module 420 includes:

[0128] The allocated memory determination submodule is used to determine the remaining allocatable memory of each candidate host;

[0129] A memory parameter determination submodule is used to determine the remaining maximum allocatable memory and the remaining minimum allocatable memory of all candidate hosts in the initial host list;

[0130] The weight calculation submodule is used to calculate the weight of each candidate host in the initial host list according to the remaining allocatable memory, the remaining maximum allocatable memory and the remaining minimum allocatable memory of each candidate host.

[0131] In a feasible implementation manner, the first sorting module 430 includes:

[0132] The ascending sorting submodule is used to sort the candidate hosts in the initial host list in ascending order of weight if the memory requirement of the candidate host is greater than the packing scheduling watermark;

[0133] The descending sorting submodule is used to sort the candidate hosts in the initial host list in descending order of weight if the memory requirement of the candidate host is less than or equal to the packing scheduling watermark.

[0134] In a feasible implementation manner, the second sorting module 440 includes:

[0135] An evaluation score calculation submodule is used to determine the evaluation score of each candidate host machine according to the matching degree between the memory allocation rate of each candidate host machine and the preset health threshold;

[0136] The sorting submodule is used to sort the first host list in descending order according to the evaluation score of each candidate host.

[0137] It should be noted that each module in the resource scheduling device for cloud platform virtual machines in this embodiment corresponds one-to-one to each step in the resource scheduling method for cloud platform virtual machines in the aforementioned embodiment. Therefore, the specific implementation method of this embodiment can refer to the implementation method of the aforementioned resource scheduling method for cloud platform virtual machines, which will not be repeated here.

[0138] Based on the same inventive concept, an embodiment of the present application further provides an electronic device, the electronic device comprising:

[0139] at least one processor; and,

[0140] a memory communicatively connected to at least one processor; wherein,

[0141] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can perform an image semantic segmentation and annotation method based on deep learning.

[0142] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a circuit board image semantic segmentation and labeling method based on deep learning.

[0143] Based on the same inventive concept, an embodiment of the present application also provides a computer program product, which, when processed, implements an image semantic segmentation and labeling method based on deep learning.

[0144] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.

[0145] In some embodiments, 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.

[0146] As an example, 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).

[0147] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0148] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that an article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such article or device. In the absence of more restrictions, the elements defined by the sentence "includes..." do not exclude the existence of other identical elements in the article or device including the elements.

[0149] The above is a detailed introduction to a resource scheduling method for cloud platform virtual machines. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A resource scheduling method for a cloud platform virtual machine, characterized in that: The method comprises: Obtain an initial host list, and calculate a packing scheduling watermark of a resource pool corresponding to the initial host list; Obtaining memory specifications in the resource pool and the number of virtual machines matching the memory specifications; Calculate the packing scheduling waterline of the resource pool according to the memory specification and the number of virtual machines matching the memory specification; Calculate the weight of each candidate host in the initial host list; sort the initial host list by weight according to the memory requirement of each candidate host in the initial host list and the size of the packing scheduling watermark to obtain a first host list; Determining the remaining allocatable memory of each of the candidate host machines; Determine the remaining maximum allocatable memory and the remaining minimum allocatable memory of all candidate hosts in the initial host list; Calculate the weight of each candidate host in the initial host list according to the remaining allocatable memory of each candidate host, the remaining maximum allocatable memory, and the remaining minimum allocatable memory; According to the matching degree between the memory allocation rate of each candidate host in the first host list and the preset health threshold, the first host list is sorted by matching degree to obtain a target host list, wherein the closer the memory allocation rate is to the preset health threshold, the higher the corresponding matching degree is; The preset health threshold is obtained by the following steps: Obtain the upper and lower limits of resource utilization; The health threshold is calculated according to the resource utilization upper limit and its corresponding first weight, the resource utilization lower limit and its corresponding second weight; and the resources of the virtual machines are allocated according to the order of the target host list.

2. The resource scheduling method for cloud platform virtual machines according to claim 1, characterized in that: The memory allocation ratio is obtained by the following steps: Obtaining the allocated memory and total memory of the candidate host machine and the requested memory of the virtual machine; The health threshold is calculated according to the memory and total memory allocated to the candidate host machine and the requested memory of the virtual machine.

3. The resource scheduling method for cloud platform virtual machines according to claim 1, characterized in that: According to the matching degree between the memory allocation rate of each candidate host in the first host list and the preset health threshold, the step of sorting the first host list by matching degree includes: Determine an evaluation score for each candidate host machine based on the degree of matching between the memory allocation rate of each candidate host machine and a preset health threshold; The first host machine list is sorted in descending order according to the evaluation score of each candidate host machine.

4. A resource scheduling device for a cloud platform virtual machine, characterized in that: The device is used to execute the resource scheduling method of a cloud platform virtual machine according to claim 1, the device comprising: An acquisition module, used to acquire an initial host list and calculate a packing scheduling waterline of a resource pool corresponding to the initial host list; A weight calculation module, used to calculate the weight of each candidate host in the initial host list; A first sorting module is used to weight the initial host list according to the memory requirement of each candidate host in the initial host list and the size of the packing scheduling watermark to obtain a first host list; A second sorting module is used to sort the first host list according to the matching degree between the memory allocation rate of each candidate host in the first host list and the preset health threshold, so as to obtain a target host list; The resource scheduling module is used to allocate resources of the virtual machines according to the order of the target host list.

5. The resource scheduling device for cloud platform virtual machines according to claim 4, characterized in that: The acquisition module comprises: A parameter acquisition submodule, used to obtain the memory specification in the resource pool and the number of virtual machines matching the memory specification; The packing scheduling waterline calculation submodule is used to calculate the packing scheduling waterline of the resource pool according to the memory specification and the number of virtual machines matching the memory specification.

6. The resource scheduling device for cloud platform virtual machines according to claim 5, characterized in that: Weight calculation module, including: An allocated memory determination submodule, used to determine the remaining allocatable memory of each candidate host machine; A memory parameter determination submodule is used to determine the remaining maximum allocatable memory and the remaining minimum allocatable memory of all candidate host machines in the initial host machine list; a weight calculation submodule is used to calculate the weight of each candidate host machine in the initial host machine list based on the remaining allocatable memory of each candidate host machine, the remaining maximum allocatable memory and the remaining minimum allocatable memory.

Citation Information

Patent Citations

  • Method and device for dispatching cluster resource based on packing model

    CN104881322A

  • Method, device and system for creating virtual machine

    CN106020937A

  • Physical mainframe selecting method, apparatus and device and readable storage medium

    CN108572868A

  • Cloud platform resource scheduling method and device

    CN110399200A

  • CPU resource allocation method, device, and equipment and computer readable storage medium

    CN111143035A