Virtual machine scheduling method and device, equipment, storage medium and product

By constructing a fitness balance selection strategy and virtual machine migration, the problem of unbalanced resource allocation of computing nodes in OpenStack is solved, load balancing and resource optimization are achieved, and the quality of cloud services is improved.

CN118796344APending Publication Date: 2024-10-18CHINA MOBILE FINANCIAL TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410251731.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-05
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

OpenStack's virtual machine scheduling strategy cannot perform dynamic migration in time according to node load, resulting in uneven distribution of computing node resources and affecting the quality of cloud services.

Method used

By obtaining computing power parameters and node lists, a fitness balancing selection strategy is constructed, the target fitness is determined, and the virtual machines to be migrated are migrated to load-balanced target computing nodes.

Benefits of technology

It improves the accuracy of resource allocation and load balancing of computing nodes, avoids resource waste and excessive occupation of high-performance nodes, and improves cloud service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796344A_ABST
    Figure CN118796344A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of virtual machine scheduling, and discloses a virtual machine scheduling method, device and equipment, a storage medium and a computer program product.The method comprises the steps that computing power parameters and a computing node list are obtained, and the computing node list is filtered and subjected to priority ranking according to the computing power parameters; obtaining an updated calculation node list; constructing an adaptation degree balance selection strategy, and determining a target adaptation degree based on the adaptation degree balance selection strategy; determining a target computing node based on the target adaptation degree and the updated computing node list; and obtaining a to-be-migrated virtual machine, and migrating the to-be-migrated virtual machine to the target computing node. According to the method and the device, the target adaptation degree is determined by constructing the adaptation degree balance selection strategy, so that the target computing node is determined, the virtual machine to be migrated is migrated to the target computing node, the problem of unbalanced resource allocation of the computing node is solved, the resource allocation accuracy is improved, and the load balance of the computing node is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field, and in particular to a virtual machine scheduling method, device, equipment, storage medium and computer program product. Background Art

[0002] Currently, OpenStack uses a memory-based weight calculation to determine the order of nodes by default, and then adopts a greedy strategy to select nodes with large remaining memory to place virtual machines. However, if nodes with large remaining memory are always selected first, low-specification virtual machines may occupy all high-performance nodes, resulting in the inability to create high-specification virtual machines. In addition, cloud computing-related resources are variable in actual environments. Although the computing nodes reach an ideal equilibrium state in the initial allocation, the state of virtual machines in different nodes will be inconsistent due to differences in user tasks, resulting in rapid changes in the load of some computing nodes after a period of time. Once the load of a computing node rises to the limit, it will seriously affect the normal operation of the virtual machines in the node. On the contrary, if the load of a node is reduced to a very small level and maintained for a considerable period of time, the platform resource utilization will be too low, resulting in waste. It can be seen that virtual machine allocation based on memory utilization is likely to lead to unbalanced resource allocation between computing nodes; OpenStack native scheduling strategies cannot dynamically migrate virtual machines according to node loads in a timely manner, and cannot ensure load balancing of computing nodes in actual cloud environments, which is likely to affect the quality of cloud services for users. Summary of the invention

[0003] The main purpose of the present invention is to provide a virtual machine scheduling method, device, equipment, storage medium and computer program product, aiming to solve the technical problem of unbalanced resource allocation of computing nodes in the prior art.

[0004] To achieve the above object, the present invention provides a virtual machine scheduling method, the method comprising the following steps:

[0005] Obtaining a computing capacity parameter and a computing node list, and filtering and prioritizing the computing node list according to the computing capacity parameter to obtain an updated computing node list;

[0006] Constructing a fitness balance selection strategy, and determining a target fitness based on the fitness balance selection strategy;

[0007] Determine a target computing node based on the target fitness and the updated computing node list;

[0008] Acquire the virtual machine to be migrated, and migrate the virtual machine to be migrated to the target computing node.

[0009] Optionally, the acquiring of the computing capacity parameter and the computing node list, and filtering and prioritizing the computing node list according to the computing capacity parameter to obtain an updated computing node list includes:

[0010] Obtaining virtual machine specifications required by the user, and determining computing capacity parameters that meet the user's requirements based on the virtual machine specifications;

[0011] Obtain a list of computing nodes, and filter the list of computing nodes based on the remaining memory, CPU, disk parameters, and computing capacity parameters of the computing nodes in the list of computing nodes to obtain a filtered list of computing nodes;

[0012] The computing nodes in the filtered computing node list are prioritized according to the remaining memory, CPU and disk parameters of the computing nodes in the computing node list to obtain an updated computing node list.

[0013] Optionally, constructing a fitness balance selection strategy, and determining a target fitness based on the fitness balance selection strategy, includes:

[0014] Obtaining the fitness of the virtual machine at different times, and performing calculations based on the fitness of the virtual machine at different times to obtain longitudinal timing balance;

[0015] Obtaining the assigned task amount and task execution workload of the virtual machine, and performing calculations based on the assigned task amount and task execution workload of the virtual machine to obtain horizontal distribution balance;

[0016] Determine a fitness balance selection strategy based on the longitudinal timing balance and the transverse distribution balance;

[0017] The fitness degree within a preset time period is determined according to the fitness degree balance selection strategy to obtain a target fitness degree.

[0018] Optionally, determining the fitness within a preset time period according to the fitness balance selection strategy to obtain a target fitness includes:

[0019] determining a termination temperature based on the preset time period;

[0020] Obtaining a mapping relationship between virtual machines and computing nodes in the computing node list, and determining an initial population based on the mapping relationship;

[0021] Update the initial population according to the fitness balance selection strategy to obtain an updated population;

[0022] Calculating the fitness of the updated population and sorting them to obtain a fitness threshold;

[0023] A target fitness degree is determined according to the fitness degree threshold and the termination temperature.

[0024] Optionally, determining the target computing node based on the target fitness and the updated computing node list includes:

[0025] Obtain the historical assigned task volume and historical task execution workload of the constructed virtual machine;

[0026] Calculate the historical assigned task volume and the historical task execution workload to obtain the standard assigned task volume and the standard task execution workload;

[0027] Calculate the reference fitness degree based on the standard assigned task amount and the standard task execution workload;

[0028] Determining a target computing capability parameter combination according to the reference fitness and the target fitness;

[0029] The target computing node is determined according to the target computing capability parameter combination and the updated computing node list.

[0030] Optionally, obtaining the virtual machine to be migrated includes:

[0031] Obtaining the amount of assigned tasks, the amount of work performed by the tasks, and the available memory, CPU, and disk parameters of the target computing node of the virtual machine constructed in the target computing node;

[0032] Calculate the fitness of each constructed virtual machine according to the amount of assigned tasks of the constructed virtual machines in the target computing node, the amount of work performed by the tasks, and the available memory, CPU and disk parameters of the target computing node to obtain a fitness set;

[0033] Based on the fitness balance selection strategy, the fitness set is detected to obtain the fitness that does not satisfy the fitness balance selection strategy;

[0034] The virtual machine corresponding to the fitness that does not satisfy the fitness balance selection strategy is used as the virtual machine to be migrated.

[0035] In addition, to achieve the above-mentioned purpose, the present invention further proposes a virtual machine scheduling device, the virtual machine scheduling device comprising:

[0036] An acquisition module, used to acquire a computing capacity parameter and a computing node list, and filter and prioritize the computing node list according to the computing capacity parameter to obtain an updated computing node list;

[0037] A construction module is used to construct a fitness balance selection strategy and determine a target fitness based on the fitness balance selection strategy;

[0038] A determination module, configured to determine a target computing node based on the target fitness and the updated computing node list;

[0039] The migration module is used to obtain the virtual machine to be migrated and migrate the virtual machine to be migrated to the target computing node.

[0040] In addition, to achieve the above-mentioned purpose, the present invention also proposes a virtual machine scheduling device, which includes: a memory, a processor, and a virtual machine scheduler stored in the memory and executable on the processor, and the virtual machine scheduler is configured to implement the steps of the virtual machine scheduling method described above.

[0041] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a virtual machine scheduler is stored, and when the virtual machine scheduler is executed by a processor, the steps of the virtual machine scheduling method described above are implemented.

[0042] In addition, to achieve the above-mentioned purpose, the present invention further provides a computer program product, which includes a virtual machine scheduler, and when the virtual machine scheduler is executed by a processor, the steps of the virtual machine scheduling method as described above are implemented.

[0043] The present invention obtains computing capacity parameters and a computing node list, and filters and prioritizes the computing node list according to the computing capacity parameters to obtain an updated computing node list; constructs a fitness balance selection strategy, and determines the target fitness based on the fitness balance selection strategy; determines the target computing node based on the target fitness and the updated computing node list; obtains the virtual machine to be migrated, and migrates the virtual machine to be migrated to the target computing node. In the above manner, the target fitness is determined by constructing a fitness balance selection strategy, thereby determining the target computing node, and migrating the virtual machine to be migrated to the target computing node, which solves the problem of unbalanced resource allocation of computing nodes, improves the accuracy of resource allocation, and ensures the load balancing of computing nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a structural diagram of a virtual machine scheduling device in a hardware operating environment involved in an embodiment of the present invention;

[0045] Figure 2 This is a flow chart of a first embodiment of a virtual machine scheduling method according to the present invention;

[0046] Figure 3 This is a flow chart of a second embodiment of a virtual machine scheduling method according to the present invention;

[0047] Figure 4 It is a structural block diagram of the first embodiment of the virtual machine scheduling device of the present invention.

[0048] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0050] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the structure of a virtual machine scheduling device in a hardware operating environment involved in an embodiment of the present invention.

[0051] like Figure 1 As shown, the virtual machine scheduling 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), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

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

[0053] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a virtual machine scheduler.

[0054] exist Figure 1In the virtual machine scheduling 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 virtual machine scheduling device of the present invention can be set in the virtual machine scheduling device, and the virtual machine scheduling device calls the virtual machine scheduling program stored in the memory 1005 through the processor 1001, and executes the virtual machine scheduling method provided by the embodiment of the present invention.

[0055] The embodiment of the present invention provides a virtual machine scheduling method, referring to Figure 2 , Figure 2 FIG. 1 is a flow chart of a first embodiment of a virtual machine scheduling method according to the present invention.

[0056] In this embodiment, the virtual machine scheduling method includes the following steps:

[0057] Step S10: Obtain computing capacity parameters and a computing node list, and filter and prioritize the computing node list according to the computing capacity parameters to obtain an updated computing node list.

[0058] It should be noted that the execution subject in this embodiment is a virtual machine scheduling device, and it can also be other devices that implement the same or similar functions. This embodiment does not make specific restrictions on this. This embodiment takes the virtual machine scheduling device as an example for explanation.

[0059] It can be understood that the computing capacity parameter refers to the computing capacity parameter determined according to the required virtual machine specifications to meet the user's needs.

[0060] In a specific implementation, the computing node list is filtered according to the computing capacity parameter to obtain a filtered computing node list, and the computing nodes in the filtered computing node list are prioritized to obtain an updated computing node list.

[0061] Furthermore, in order to improve the information accuracy of the computing node list, the computing power parameters and the computing node list are obtained, and the computing node list is filtered and prioritized according to the computing power parameters to obtain an updated computing node list, including: obtaining virtual machine specifications required by the user, and determining computing power parameters that meet the user requirements according to the virtual machine specifications; obtaining a computing node list, filtering the computing node list based on the remaining memory, CPU, disk parameters and computing power parameters of the computing nodes in the computing node list to obtain a filtered computing node list; prioritizing the computing nodes in the filtered computing node list according to the remaining memory, CPU and disk parameters of the computing nodes in the computing node list to obtain an updated computing node list.

[0062] It should be noted that in the early stage of building a virtual machine, the user will enter the virtual machine specifications they want to build through the front-end visualization page of the cloud computing platform, where the virtual machine specifications include the computing power required by the virtual machine, such as memory capacity, CPU capacity and disk capacity. After the user configures the relevant specifications of the virtual machine through the front-end visualization page of the cloud computing platform, the computing power parameters that meet the user's needs can be directly obtained from the configuration data.

[0063] It can be understood that the computing node list is filtered, and whether the remaining memory, CPU and disk parameters of the computing node are greater than the computing power parameters required by the user is used as the filtering condition. The computing node information corresponding to the computing power parameters less than the user's requirements is deleted from the computing node list, thereby obtaining a filtered computing node list.

[0064] In the specific implementation, the computing nodes retained in the computing node list are prioritized according to the size of the computing power parameters they can provide. The computing node with the largest computing power parameter value has the highest allocation priority. Finally, a computing node list with allocation priority will be obtained, that is, the updated computing node list.

[0065] Step S20: constructing a fitness balance selection strategy, and determining a target fitness based on the fitness balance selection strategy.

[0066] It should be noted that before constructing the fitness balance selection strategy, it is necessary to set the relevant definition of fitness, that is, fitness can be expressed by the shortest time required for a virtual machine to complete its assigned task under the premise that the computing power that meets the needs of its users is available.

[0067] It is understandable that the computing power available to the virtual machine includes memory, CPU and disk, which are the memory, CPU and disk parameters required by the user. On the premise that the virtual machine obtains computing power that meets the needs of its users, it can be interpreted that the computing node can provide virtual machine memory, CPU and disk parameter capabilities that meet the needs of the user. The length of time required for the virtual machine to complete the assigned task mainly depends on the amount of tasks assigned to the virtual machine and the workload performed by the task. Under the premise of equal computing power, the more tasks there are or the greater the workload required to perform each task, the longer it takes to complete the assigned task. In the early stages of building a virtual machine, it is impossible to directly obtain the amount of tasks assigned to the virtual machine and the workload performed by the task. At this time, the average value of the historical amount of assigned tasks and the workload performed by the tasks of the built virtual machines with the same user needs can be used as the basis for calculation.

[0068] It is worth explaining that fitness balance means that the virtual machines built on the computing nodes can maintain a balance in the shortest time required to complete their assigned tasks while obtaining computing power that meets the needs of their users. This includes vertical timing balance and horizontal distribution balance. Vertical timing balance refers to maintaining balance in the time dimension; horizontal distribution balance refers to maintaining a balance in the shortest time required for different virtual machines to complete their assigned unit tasks.

[0069] Step S30: determining a target computing node based on the target fitness and the updated computing node list.

[0070] It should be noted that the target computing node refers to a computing node selected from the updated computing node list and matching the optimal computing capability parameter combination.

[0071] Furthermore, in order to improve the accuracy of the target node, the target computing node is determined based on the target fitness and the updated computing node list, including: obtaining the historical allocated task volume and the historical task execution workload of the constructed virtual machine; calculating according to the historical allocated task volume and the historical task execution workload to obtain the standard allocated task volume and the standard task execution workload; calculating according to the standard allocated task volume and the standard task execution workload to obtain a reference fitness; determining a target computing capacity parameter combination according to the reference fitness and the target fitness; and determining the target computing node according to the target computing capacity parameter combination and the updated computing node list.

[0072] It should be noted that the shortest time T required for each virtual machine i to execute all tasks assigned to it is calculated i , that is, the reference fitness, as shown in Formula 3:

[0073]

[0074] In formula 1, T i The shortest time required for each virtual machine i to execute all the tasks assigned to it, that is, the reference fitness, time Si is the time for task scheduling and waiting, and the memory, CPU and disk capacity of the virtual machine i required by the user is U Mi , U Ci , U Di , that is U Mi , U Ci , U Di They represent the memory capacity, CPU capacity, and disk capacity required by the user, respectively. Si , Tsak Ri They represent the amount of tasks assigned to virtual machine i and the amount of work performed by the tasks respectively.

[0075] It is understandable that when the virtual machine is first built, it has no assigned task data. Therefore, the average value of the historical assigned task volume and the task execution workload of the virtual machines that have been built for the same user needs can be used as the basis for calculation, or the task assigned task volume and the task execution workload of the cloud service of the same business of the user can be used as the basis for calculation.

[0076] It is worth noting that after the virtual machine is built, the virtual machine migration scheduling will be carried out in real time according to the amount of tasks assigned to the built virtual machine and the workload of the tasks. Therefore, when the virtual machine is built, even if the allocated computing node is not the current optimal one, it will not affect the normal operation of the virtual machine and the provision of high-quality cloud services. Therefore, when there is no assigned task data, the virtual machine can be built according to the assigned task situation of virtual machines with the same user needs, the same business, and the same virtual machine type.

[0077] In the specific implementation, based on the determined shortest time, that is, the target adaptation degree T i ' and reference fitness T i , determine the optimal computing capacity parameter combination that can maintain the fitness balance and satisfy the virtual machine to execute all the tasks assigned to itself, specifically: according to the shortest time T i ' and T i The difference between i Task scheduling and waiting time Si 、min(U Mi ,U Ci ,U Di ) and Tsak Si , Tsak Ri , we can get T i 'The corresponding min(U Mi ,U Ci ,U Di ), which is the optimal computing power parameter combination for the virtual machine to execute all the tasks assigned to it.

[0078] It is worth noting that, according to the determined optimal computing capacity parameter combination, a computing node with matching parameters is selected from the updated computing node list, which is the target computing node, and the virtual machine is built on the target computing node.

[0079] Step S40: Acquire the virtual machine to be migrated, and migrate the virtual machine to be migrated to the target computing node.

[0080] It should be noted that the virtual machine to be migrated is migrated to a target node newly selected according to the fitness balancing strategy to achieve dynamic load balancing of the computing nodes.

[0081] It is understandable that by adjusting the computing node selection strategy when building a virtual machine, the node selection strategy with the largest remaining memory is optimized to a selection strategy with balanced fitness, so as to avoid the situation where the node selected each time is the node with the largest remaining memory, resulting in low-specification virtual machines occupying all high-performance nodes. At the same time, the dynamic migration strategy of the virtual machine is improved. Here, the fitness of the virtual machine construction stage is combined. By dynamically maintaining the fitness between the computing node and the virtual machine allocated thereto, the virtual machine to be migrated is selected according to the fitness, and finally the target node is selected and determined according to the computing node selection strategy, so that the virtual machine to be migrated is migrated to the target node, thereby avoiding the situation where the resource allocation of the computing node is unbalanced and the load balancing of the computing node cannot be dynamically achieved, ensuring the load balancing of the computing node and improving the quality of cloud services.

[0082] Furthermore, in order to ensure the load balance of computing nodes, the method of obtaining the virtual machines to be migrated includes: obtaining the amount of assigned tasks, the workload performed by the tasks, and the available memory, CPU, and disk parameters of the virtual machines already constructed in the target computing node; calculating the fitness of each constructed virtual machine according to the amount of assigned tasks, the workload performed by the tasks, and the available memory, CPU, and disk parameters of the virtual machines already constructed in the target computing node, and obtaining a fitness set; detecting the fitness set based on the fitness balancing selection strategy, and obtaining the fitness that does not satisfy the fitness balancing selection strategy; and using the virtual machine corresponding to the fitness that does not satisfy the fitness balancing selection strategy as the virtual machine to be migrated.

[0083] It should be noted that the amount of tasks Tsak allocated to the virtual machines built in the computing nodes is obtained regularly. Si , the workload performed by the task Tsak Ri and the available memory, CPU, and disk of the computing node where the virtual machine is located; based on the task volume Tsak Si , the workload performed by the task Tsak Ri The available memory, CPU, and disk of the computing node where the virtual machine is located calculate the fitness of the target computing node, that is, the shortest time T required for all virtual machines to execute all their assigned tasks i ", and obtain the time set T, i.e., the fitness set; based on the fitness balance selection strategy, detect whether the shortest time in the set T corresponding to all virtual machines in the computing node meets the fitness balance strategy; and take the virtual machine corresponding to the shortest time that does not meet the fitness balance strategy as the virtual machine to be migrated.

[0084] This embodiment obtains computing capacity parameters and a computing node list, and filters and prioritizes the computing node list according to the computing capacity parameters to obtain an updated computing node list; constructs a fitness balance selection strategy, and determines the target fitness based on the fitness balance selection strategy; determines the target computing node based on the target fitness and the updated computing node list; obtains the virtual machine to be migrated, and migrates the virtual machine to be migrated to the target computing node. In the above manner, by constructing a fitness balance selection strategy to determine the target fitness, thereby determining the target computing node, and migrating the virtual machine to be migrated to the target computing node, the problem of unbalanced resource allocation of computing nodes is solved, the accuracy of resource allocation is improved, and the load balancing of computing nodes is ensured.

[0085] refer to Figure 3 , Figure 3 FIG. 4 is a flow chart of a second embodiment of a virtual machine scheduling method according to the present invention.

[0086] Based on the first embodiment, step S20 in the virtual machine scheduling method of this embodiment includes:

[0087] Step S201: Obtain the fitness of the virtual machine at different times, and perform calculations based on the fitness of the virtual machine at different times to obtain longitudinal timing balance.

[0088] It should be noted that the longitudinal time series balance is expressed as time t n+1 The corresponding T i,tn+1 ,t n Time corresponding to T i,tn , time t n-1 The corresponding T i,tn-1 Maintain balance, as shown in equation 2:

[0089]

[0090] In formula 2, T i,tn+1 、T i,tn 、T i,tn-1 They represent virtual machine i at time t n+1 ,t n ,t n-1 The corresponding fitness, that is, virtual machine i at time t n+1 ,t n ,t n-1 The shortest time required to execute all tasks assigned to it, u i Indicates longitudinal timing balance.

[0091] Step S202: Obtain the assigned task amount and task execution workload of the virtual machine, and perform calculations based on the assigned task amount and task execution workload of the virtual machine to obtain horizontal distribution balance.

[0092] It should be noted that horizontal distribution balance means that the shortest time required for any virtual machine p and any virtual machine q to complete their assigned unit tasks is balanced, and the unit task refers to the minimum task unit, as shown in the following formula 3:

[0093]

[0094] In formula 3, T p 、T q They represent the fitness of virtual machine p and virtual machine q, that is, the shortest time required for virtual machine p and virtual machine q to complete their respective assigned unit tasks, Tsak Sp , Tsak Rp They represent the amount of tasks assigned to virtual machine p and the amount of work performed by the tasks, Tsak Sq , Tsak Rq They represent the amount of tasks assigned to virtual machine q and the amount of work performed by the tasks, respectively. i Indicates balanced horizontal distribution.

[0095] Step S203: Determine a fitness balance selection strategy based on the longitudinal timing balance and the transverse distribution balance.

[0096] It should be noted that the adaptation balance selection strategy is constructed based on the vertical timing balance and the horizontal distribution balance.

[0097] Step S204: determining the fitness within a preset time period according to the fitness balance selection strategy to obtain a target fitness.

[0098] It should be noted that the preset time period can be set in advance, and the corresponding time window size within the preset time period can be determined according to user needs. If the user sets a short-term equilibrium target, the time window size corresponding to the set time period will be smaller. If the user sets a long-term equilibrium target, the time window size corresponding to the set time period will be larger.

[0099] It can be understood that, for determining the shortest time that satisfies the adaptive balancing selection strategy within a set time period, that is, the target adaptation degree T i ', can be through a meta-heuristic algorithm, including a particle swarm algorithm, an ant colony algorithm, a genetic algorithm, an immune algorithm, a simulated annealing algorithm, etc., this embodiment does not make a specific limitation on this, this embodiment takes the simulated annealing algorithm as an example for explanation.

[0100] Furthermore, in order to improve the accuracy of the target fitness, the fitness within a preset time period is determined according to the fitness balance selection strategy to obtain the target fitness, including: determining a termination temperature based on the preset time period; obtaining a mapping relationship between virtual machines and computing nodes in the computing node list, and determining an initial population based on the mapping relationship; updating the initial population according to the fitness balance selection strategy to obtain an updated population; calculating the fitness of the updated population and sorting them to obtain a fitness threshold; determining the target fitness according to the fitness threshold and the termination temperature.

[0101] It should be noted that the initial temperature W in the annealing table is initialized according to the preset time period. b , termination temperature W e , obtain the maximum number of iterations L, the cooling parameter α of the temperature update function, the number of initial antibody groups N, that is, the number of initial populations; establish a mapping relationship between the virtual machine and the computing nodes in the computing node list, regard each feasible mapping scheme as an antibody S, and initialize the antibody group, that is, obtain the initial population; retain the antibodies corresponding to the solution that satisfies the fitness function, and delete the antibodies that do not satisfy it from the antibody group, so as to obtain an updated antibody group; calculate the fitness of the new antibody group T i And arrange them from large to small; determine whether the termination temperature is reached. If so, end the algorithm to obtain the optimal solution, and use the optimal solution as the target fitness; if the termination temperature is not reached, determine whether the maximum number of iterations L is reached. If so, terminate the algorithm and output the optimal solution as the target fitness, otherwise update according to the current temperature and number of iterations, and update the antibody group.

[0102] It can be understood that in a cloud environment, the feasible allocation scheme of each virtual machine to the computing nodes in the computing node list is regarded as an antibody, multiple antibodies constitute an antibody group, and the fitness function is regarded as an antigen, where the fitness function is composed of a combination of vertical timing balance and horizontal distribution balance.

[0103] This embodiment obtains the vertical timing balance by obtaining the fitness corresponding to the virtual machine at different times, and calculates according to the fitness corresponding to the virtual machine at different times; obtains the assigned task volume and task execution workload of the virtual machine, and calculates according to the assigned task volume and task execution workload of the virtual machine to obtain the horizontal distribution balance; determines the fitness balance selection strategy based on the vertical timing balance and the horizontal distribution balance; determines the fitness within a preset time period according to the fitness balance selection strategy to obtain the target fitness. In the above manner, the fitness balance selection strategy is determined by calculating the vertical timing balance to the distribution balance, thereby determining the target fitness within the preset time period, thereby improving the efficiency and accuracy of determining the target fitness.

[0104] Reference Figure 4 , Figure 4 It is a structural block diagram of the first embodiment of the virtual machine scheduling device of the present invention.

[0105] like Figure 4 As shown, the virtual machine scheduling device proposed in the embodiment of the present invention includes:

[0106] The acquisition module 10 is used to acquire computing capacity parameters and a computing node list, and filter and prioritize the computing node list according to the computing capacity parameters to obtain an updated computing node list.

[0107] The construction module 20 is used to construct a fitness balance selection strategy and determine a target fitness based on the fitness balance selection strategy.

[0108] The determination module 30 is configured to determine a target computing node based on the target fitness and the updated computing node list.

[0109] The migration module 40 is used to obtain the virtual machine to be migrated and migrate the virtual machine to be migrated to the target computing node.

[0110] This embodiment obtains computing capacity parameters and a computing node list, and filters and prioritizes the computing node list according to the computing capacity parameters to obtain an updated computing node list; constructs a fitness balance selection strategy, and determines the target fitness based on the fitness balance selection strategy; determines the target computing node based on the target fitness and the updated computing node list; obtains the virtual machine to be migrated, and migrates the virtual machine to be migrated to the target computing node. In the above manner, by constructing a fitness balance selection strategy to determine the target fitness, thereby determining the target computing node, and migrating the virtual machine to be migrated to the target computing node, the problem of unbalanced resource allocation of computing nodes is solved, the accuracy of resource allocation is improved, and the load balancing of computing nodes is ensured.

[0111] In one embodiment, the acquisition module 10 is also used to obtain the virtual machine specifications required by the user, and determine the computing power parameters that meet the user requirements based on the virtual machine specifications; obtain a computing node list, and filter the computing node list based on the remaining memory, CPU, disk parameters and computing power parameters of the computing nodes in the computing node list to obtain a filtered computing node list; prioritize the computing nodes in the filtered computing node list based on the remaining memory, CPU and disk parameters of the computing nodes in the computing node list to obtain an updated computing node list.

[0112] In one embodiment, the construction module 20 is also used to obtain the fitness corresponding to the virtual machine at different times, and calculate according to the fitness corresponding to the virtual machine at different times to obtain vertical timing balance; obtain the assigned task volume and task execution workload of the virtual machine, and calculate according to the assigned task volume and task execution workload of the virtual machine to obtain horizontal distribution balance; determine the fitness balance selection strategy based on the vertical timing balance and the horizontal distribution balance; determine the fitness within a preset time period according to the fitness balance selection strategy to obtain the target fitness.

[0113] In one embodiment, the construction module 20 is also used to determine the termination temperature based on the preset time period; obtain the mapping relationship between the virtual machine and the computing node in the computing node list, and determine the initial population based on the mapping relationship; update the initial population according to the fitness balance selection strategy to obtain an updated population; calculate the fitness of the updated population and sort it to obtain a fitness threshold; determine the target fitness based on the fitness threshold and the termination temperature.

[0114] In one embodiment, the determination module 30 is also used to obtain the historical allocated task volume and the historical task execution workload of the constructed virtual machine; calculate based on the historical allocated task volume and the historical task execution workload to obtain the standard allocated task volume and the standard task execution workload; calculate based on the standard allocated task volume and the standard task execution workload to obtain a reference fitness; determine the target computing capacity parameter combination based on the reference fitness and the target fitness; determine the target computing node based on the target computing capacity parameter combination and the updated computing node list.

[0115] In one embodiment, the migration module 40 is also used to obtain the assigned task amount, the workload performed by the task, and the available memory, CPU and disk parameters of the virtual machine constructed in the target computing node; calculate the fitness of each constructed virtual machine according to the assigned task amount, the workload performed by the task, and the available memory, CPU and disk parameters of the virtual machine constructed in the target computing node to obtain a fitness set; detect the fitness set based on the fitness balance selection strategy to obtain the fitness that does not satisfy the fitness balance selection strategy; and use the virtual machine corresponding to the fitness that does not satisfy the fitness balance selection strategy as the virtual machine to be migrated.

[0116] In addition, to achieve the above-mentioned purpose, the present invention also proposes a virtual machine scheduling device, which includes: a memory, a processor, and a virtual machine scheduler stored in the memory and executable on the processor, and the virtual machine scheduler is configured to implement the steps of the virtual machine scheduling method described above.

[0117] Since the virtual machine scheduling device adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.

[0118] In addition, an embodiment of the present invention further provides a storage medium, on which a virtual machine scheduler is stored. When the virtual machine scheduler is executed by a processor, the steps of the virtual machine scheduling method described above are implemented.

[0119] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.

[0120] In addition, an embodiment of the present invention further provides a computer program product, including a virtual machine scheduler, and when the virtual machine scheduler is executed by a processor, the steps of the virtual machine scheduling method described above are implemented.

[0121] Since the computer program product of the present invention adopts all the technical solutions of all the above embodiments, it at least has all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.

[0122] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0123] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0124] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the virtual machine scheduling method provided in any embodiment of the present invention, and will not be repeated here.

[0125] In addition, 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 a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0126] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0127] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0129] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A virtual machine scheduling method, characterized in that: The method comprises: Obtaining a computing capacity parameter and a computing node list, and filtering and prioritizing the computing node list according to the computing capacity parameter to obtain an updated computing node list; Constructing a fitness balance selection strategy, and determining a target fitness based on the fitness balance selection strategy; Determine a target computing node based on the target fitness and the updated computing node list; Acquire the virtual machine to be migrated, and migrate the virtual machine to be migrated to the target computing node.

2. The method according to claim 1, characterized in that The obtaining of the computing capacity parameter and the computing node list, and filtering and prioritizing the computing node list according to the computing capacity parameter to obtain an updated computing node list includes: Obtaining virtual machine specifications required by the user, and determining computing capacity parameters that meet the user's requirements based on the virtual machine specifications; Obtain a computing node list, and filter the computing node list based on the remaining memory, CPU, disk parameters, and computing capacity parameters of the computing nodes in the computing node list to obtain a filtered computing node list; The computing nodes in the filtered computing node list are prioritized according to the remaining memory, CPU and disk parameters of the computing nodes in the computing node list to obtain an updated computing node list.

3. The method according to claim 1, characterized in that The step of constructing a fitness balance selection strategy and determining a target fitness based on the fitness balance selection strategy includes: Obtaining the fitness of the virtual machine at different times, and performing calculations based on the fitness of the virtual machine at different times to obtain longitudinal timing balance; Obtaining the assigned task amount and task execution workload of the virtual machine, and performing calculations based on the assigned task amount and task execution workload of the virtual machine to obtain horizontal distribution balance; Determine a fitness balance selection strategy based on the longitudinal timing balance and the transverse distribution balance; The fitness degree within a preset time period is determined according to the fitness degree balance selection strategy to obtain a target fitness degree.

4. The method according to claim 3, characterized in that The step of determining the fitness within a preset time period according to the fitness balance selection strategy to obtain a target fitness includes: determining a termination temperature based on the preset time period; Obtaining a mapping relationship between virtual machines and computing nodes in the computing node list, and determining an initial population based on the mapping relationship; Update the initial population according to the fitness balance selection strategy to obtain an updated population; Calculating the fitness of the updated population and sorting them to obtain a fitness threshold; A target fitness degree is determined according to the fitness degree threshold and the termination temperature.

5. The method according to claim 1, characterized in that The determining the target computing node based on the target fitness and the updated computing node list includes: Obtain the historical assigned task volume and historical task execution workload of the constructed virtual machine; Calculate the historical assigned task volume and the historical task execution workload to obtain the standard assigned task volume and the standard task execution workload; Calculate the reference fitness degree according to the standard assigned task amount and the standard task execution workload; Determining a target computing capability parameter combination according to the reference fitness and the target fitness; The target computing node is determined according to the target computing capability parameter combination and the updated computing node list.

6. The method according to claim 1, characterized in that The step of obtaining the virtual machine to be migrated includes: Obtaining the amount of assigned tasks, the amount of work performed by the tasks, and the available memory, CPU, and disk parameters of the target computing node of the virtual machine constructed in the target computing node; Calculate the fitness of each constructed virtual machine according to the amount of assigned tasks of the constructed virtual machines in the target computing node, the amount of work performed by the tasks, and the available memory, CPU and disk parameters of the target computing node to obtain a fitness set; Based on the fitness balance selection strategy, the fitness set is detected to obtain the fitness that does not satisfy the fitness balance selection strategy; The virtual machine corresponding to the fitness that does not satisfy the fitness balance selection strategy is used as the virtual machine to be migrated.

7. A virtual machine scheduling device, characterized in that: The virtual machine scheduling device comprises: An acquisition module, used to acquire a computing capacity parameter and a computing node list, and filter and prioritize the computing node list according to the computing capacity parameter to obtain an updated computing node list; A construction module is used to construct a fitness balance selection strategy and determine a target fitness based on the fitness balance selection strategy; A determination module, configured to determine a target computing node based on the target fitness and the updated computing node list; The migration module is used to obtain the virtual machine to be migrated and migrate the virtual machine to be migrated to the target computing node.

8. A virtual machine scheduling device, characterized in that: The virtual machine scheduling device comprises: a memory, a processor, and a virtual machine scheduler stored in the memory and executable on the processor, wherein the virtual machine scheduler is configured to implement the virtual machine scheduling method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a virtual machine scheduler, and when the virtual machine scheduler is executed by the processor, the virtual machine scheduling method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product comprises a virtual machine scheduler, and when the virtual machine scheduler is executed by a processor, the steps of the virtual machine scheduling method according to any one of claims 1 to 6 are implemented.