Virtual Machine Scheduling Method, Device, Computer Equipment and Storage Medium

By building a scheduling analysis model of load balancing and migration loss objective functions, calculating virtual machine similarity and clustering, selecting target clusters for migration, the problem of difficult to take into account both load balancing and migration costs in the existing technology is solved, and the resource utilization rate and service stability are improved.

CN119917225BActive Publication Date: 2025-07-29CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510415786.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-29
Estimated Expiration
2045-04-03

AI Technical Summary

Technical Problem

The existing virtual machine scheduling methods cannot effectively reduce migration costs on the basis of meeting load balancing, resulting in low resource utilization and unstable service performance.

Method used

By constructing a scheduling analysis model of the load balancing objective function and the migration loss objective function, the similarity of the virtual machine is calculated and clustered, multiple alternative clusters are obtained, and the target cluster is selected according to the average eigenvalue for migration, realizing the comprehensive optimization of load balancing and migration costs.

Benefits of technology

Reduce virtual machine migration costs while meeting load balancing conditions, improve resource utilization and service reliability, reduce resource pressure on a single host, and improve overall performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917225B_ABST
    Figure CN119917225B_ABST
Patent Text Reader

Abstract

The present application relates to the field of cloud computing technology, and provides a virtual machine scheduling method, apparatus, computer device, computer-readable storage medium, and computer program product. The method includes: obtaining first load data of a target host and second load data of a plurality of alternative virtual machines; processing the first load data and the second load data through a scheduling analysis model, calculating similarity values between every two alternative virtual machines, and clustering the plurality of alternative virtual machines according to the similarity values to obtain a plurality of alternative clusters; wherein the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function; obtaining an average eigenvalue corresponding to each alternative cluster according to the second load data; selecting a target cluster according to the average eigenvalue, and using the alternative virtual machines corresponding to the target cluster as target migration virtual machines to be scheduled to the target host. By adopting this method, the virtual machine migration cost can be reduced on the basis of meeting the load balancing condition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and particularly to a virtual machine scheduling method, apparatus, computer device, storage medium, and computer program product. Background Art

[0002] In the increasingly developing field of cloud computing, virtualization technology has become an important tool for realizing resource sharing and flexible deployment. Virtual machine scheduling refers to allocating virtual machine instances to host machines, and virtual machine selection needs to consider user requirements, application characteristics, and cost-effectiveness to select the most suitable instance from numerous candidate virtual machines to meet different business needs.

[0003] Through precise virtual machine scheduling and wise virtual machine selection, the cloud computing platform can achieve the maximum utilization of resources and provide more stable and efficient services. When performing virtual machine scheduling, it is necessary to fully consider resource balance and migration costs. Currently, common virtual machine scheduling methods generally have the following problems: on the one hand, due to the imbalance of resources such as memory in the host machine, the host machine cannot load more virtual machines, resulting in low resource utilization. On the other hand, the migration costs of virtual machines, such as migration time and migration times, may affect the performance and reliability of services.

[0004] Currently, related solutions only consider one aspect. When only considering the migration cost and selecting a virtual machine to migrate to a host machine, resource imbalance may occur. For example, after the virtual machine migrates, the overload of the CPU (Central Processing Unit) or memory is alleviated, but the CPU utilization rate is significantly higher than the memory utilization rate or the memory utilization rate is significantly higher than the CPU utilization rate, which will still cause the host machine to be unable to load more virtual machines and require secondary scheduling. When only considering resource balance and selecting a virtual machine to migrate to a host machine, it may affect the SLA (Service Level Agreement), and it is difficult to guarantee the performance and reliability of services. Therefore, related solutions cannot reduce the migration cost on the basis of meeting the load balancing condition. Summary of the Invention

[0005] Based on this, in view of the above technical problems, it is necessary to provide a virtual machine scheduling method, apparatus, computer device, computer-readable storage medium, and computer program product that can reduce the virtual machine migration cost on the basis of meeting the load balancing condition.

[0006] In a first aspect, this application provides a virtual machine scheduling method, including:

[0007] Obtain the first load data of the target host machine and the second load data of multiple alternative virtual machines;

[0008] Process the first load data and the second load data through a scheduling analysis model, calculate the similarity values between every two of the alternative virtual machines, and cluster the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters; wherein, the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function;

[0009] Obtain the average eigenvalue corresponding to each of the alternative clusters according to the second load data;

[0010] Select a target cluster from the multiple alternative clusters according to the average eigenvalue, and use the alternative virtual machines corresponding to the target cluster as target migration virtual machines to schedule the target migration virtual machines to the target host.

[0011] In one embodiment, the calculating the similarity values between every two of the alternative virtual machines and clustering the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters includes:

[0012] Take each of the alternative virtual machines as a clustering cluster, and calculate the similarity values between every two of the clustering clusters according to the first load data and the corresponding second load data;

[0013] Merge the multiple clustering clusters into a new clustering cluster according to the similarity values;

[0014] According to the updated multiple clustering clusters, repeat the steps of calculating the similarity values and merging the clustering clusters until a hierarchical data structure including multiple clustering clusters is obtained, and select some or all of the clustering clusters in the hierarchical data structure as alternative clusters; each alternative cluster includes one or more of the alternative virtual machines.

[0015] In one embodiment, the merging the multiple clustering clusters into a new clustering cluster according to the similarity values includes:

[0016] Among the multiple clustering clusters, merge the two clustering clusters with the smallest similarity value into a new clustering cluster.

[0017] In one embodiment, the obtaining the average eigenvalue corresponding to each of the alternative clusters according to the second load data includes:

[0018] Calculate the eigenvalues of the alternative virtual machines in each of the alternative clusters according to the load balancing objective function, the migration loss objective function, and the second load data;

[0019] Calculate the average eigenvalue of the alternative clusters according to the eigenvalue of each alternative virtual machine.

[0020] In one embodiment, the selecting a target cluster from multiple alternative clusters according to the average eigenvalue includes:

[0021] Sort the multiple alternative clusters according to the average eigenvalue to obtain a migration sequence;

[0022] Obtain the number of virtual machines to be migrated of the target migration virtual machine;

[0023] Select a target cluster according to the number of virtual machines to be migrated and the migration sequence.

[0024] In one embodiment, the using the alternative virtual machines corresponding to the target cluster as target migration virtual machines to schedule the target migration virtual machines to the target host includes:

[0025] In the case that the number of virtual machines to be migrated is less than the number of alternative virtual machines corresponding to the target cluster, determine target migration virtual machines according to the eigenvalue of the alternative virtual machines to schedule the target migration virtual machines to the target host.

[0026] In a second aspect, the present application further provides a virtual machine scheduling device, including:

[0027] A data acquisition module, configured to acquire first load data of a target host and second load data of multiple alternative virtual machines;

[0028] A scheduling analysis module, configured to process the first load data and the second load data through a scheduling analysis model, calculate a similarity value between every two alternative virtual machines, and cluster the multiple alternative virtual machines according to the similarity value to obtain multiple alternative clusters; wherein, the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function;

[0029] A data processing module, configured to obtain an average eigenvalue corresponding to each alternative cluster according to the second load data;

[0030] A scheduling processing module, configured to select a target cluster from multiple alternative clusters according to the average eigenvalue, and use the alternative virtual machines corresponding to the target cluster as target migration virtual machines to schedule the target migration virtual machines to the target host.

[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0032] Obtain the first load data of the target host and the second load data of multiple alternative virtual machines;

[0033] Process the first load data and the second load data through a scheduling analysis model, calculate the similarity values between every two of the alternative virtual machines, and cluster the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters; wherein, the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function;

[0034] Obtain the average eigenvalue corresponding to each alternative cluster according to the second load data;

[0035] Select a target cluster from the multiple alternative clusters according to the average eigenvalue, and use the alternative virtual machines corresponding to the target cluster as target migration virtual machines to schedule the target migration virtual machines to the target host.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0037] Obtain the first load data of the target host and the second load data of multiple alternative virtual machines;

[0038] Process the first load data and the second load data through a scheduling analysis model, calculate the similarity values between every two of the alternative virtual machines, and cluster the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters; wherein, the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function;

[0039] Obtain the average eigenvalue corresponding to each alternative cluster according to the second load data;

[0040] Select a target cluster from the multiple alternative clusters according to the average eigenvalue, and use the alternative virtual machines corresponding to the target cluster as target migration virtual machines to schedule the target migration virtual machines to the target host.

[0041] In a fifth aspect, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0042] Obtain the first load data of the target host and the second load data of multiple alternative virtual machines;

[0043] Process the first load data and the second load data through a scheduling analysis model, calculate the similarity values between every two of the alternative virtual machines, and cluster the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters; wherein, the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function;

[0044] Obtain the average eigenvalue corresponding to each of the alternative clusters according to the second load data;

[0045] Select a target cluster from the multiple alternative clusters according to the average eigenvalue, and use the alternative virtual machines corresponding to the target cluster as target migration virtual machines to schedule the target migration virtual machines to the target host.

[0046] The above virtual machine scheduling method, device, computer device, storage medium and computer program product first obtain the first load data of the target host and the second load data of multiple alternative virtual machines, and process the first load data and the second load data through a scheduling analysis model, so as to calculate the similarity values between every two alternative virtual machines, and cluster the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters. Since the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function, it can take into account the migration loss of the virtual machine while meeting the requirements of host load balancing, cluster the multiple alternative virtual machines by integrating the load data and the migration loss data, and then obtain the average eigenvalue corresponding to each alternative cluster according to the second load data, so as to use the average eigenvalue to reflect the performance of different alternative clusters in load balancing. Finally, select a target cluster from the multiple alternative clusters according to the average eigenvalue, and use the alternative virtual machines corresponding to the target cluster as target migration virtual machines, so as to select appropriate target migration virtual machines according to two selection criteria of the load balancing objective function and the migration loss objective function, and schedule the target migration virtual machines to the target host, so as to reduce the virtual machine migration cost on the basis of meeting the load balancing condition. Description of the Drawings

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without creative efforts.

[0048] Figure 1 It is an application environment diagram of the virtual machine scheduling method in an embodiment;

[0049] Figure 2Schematic flowchart of a virtual machine scheduling method in an embodiment;

[0050] Figure 3 Schematic flowchart of step S208 of the virtual machine scheduling method in an embodiment;

[0051] Figure 4 Block diagram of the structure of a virtual machine scheduling apparatus in an embodiment;

[0052] Figure 5 Internal structure diagram of a computer device in an embodiment;

[0053] Figure 6 Internal structure diagram of a computer device in another embodiment. Detailed implementation manners

[0054] In order to make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] The virtual machine scheduling method provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Among them, the terminal 102 communicates with the server 104 through a network, and is used to receive and send data that needs to be stored, allocated, or processed to the server 104 or a server such as a host.

[0056] In some embodiments, the server 104 may include a status monitoring module and a data analysis module. The status monitoring module is used to collect and monitor information such as the load data of each host and virtual machine and the working status indicating whether migration is required; the data analysis module is used to process the first load data of the target host and the second load data of multiple alternative virtual machines, and select a suitable target migration virtual machine in the case of virtual machine migration, and complete the migration task of the target migration virtual machine to the target host. In other embodiments, the server 104 may only include the above-mentioned data analysis module, and rely on the status monitoring modules of other servers to obtain information such as the load data of each host and virtual machine and the working status indicating whether migration is required.

[0057] Among them, the data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The data storage system can be used to store the load data of each host and virtual machine. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0058] In an exemplary embodiment, as Figure 2 shown, a virtual machine scheduling method is provided. Taking the method applied to Figure 1 the server 104 in it as an example for illustration, it includes the following steps S202 to step S208. Among them:

[0059] Step S202, obtain the first load data of the target host and the second load data of multiple alternative virtual machines.

[0060] Among them, the first load data refers to the running state information of the current target host, which is used to reflect the overall resource usage of the target host, including but not limited to CPU load, memory occupancy, disk I / O rate, network bandwidth usage rate, etc., and can reflect the current load pressure of the target host; the second load data refers to the running state information of multiple alternative virtual machines, which is used to describe the resource usage of each alternative virtual machine to be migrated. Similar to the first load data, it can also include CPU load, memory occupancy, disk I / O, network bandwidth, etc. In addition, since these alternative virtual machines may be distributed on different hosts, their running environments, load states, application requirements, etc. are also different. Therefore, the second load data can also include historical load data. For example, the load data of an alternative virtual machine may be relatively low during a certain period, but relatively high during other time periods.

[0061] Exemplarily, the server 104 can collect the first load data and the second load data through the status monitoring module, or can also obtain the first load data and the second load data from other servers. Further, when obtaining the load data of the target host and the alternative virtual machines, the server 104 can use historical time-series data for statistical analysis to obtain more accurate load information. Specifically, first, the server 104 can continuously collect the running data of the target host and each alternative virtual machine, and arrange these data in chronological order to form a complete time-series data sequence, which can include multiple key metrics such as CPU usage rate, memory occupancy, disk I / O rate, network traffic, etc., and the data will be continuously updated and accumulated over time to provide a long-term load change trend.

[0062] Next, after obtaining the time-series data sequence, the server 104 can perform filtering processing on it to remove the high-frequency jitter that may be caused by random errors. Since there may be short-term load fluctuations during the system operation, such as the execution of certain instantaneous tasks causing a sharp increase in resource occupancy, but these fluctuations do not represent the true situation of the overall load, so it is necessary to smooth the data through filtering technology to make it more representative. After filtering, the server 104 can further detect the possible low-frequency sudden peak loads in the data. Such sudden loads may be caused by temporary tasks or abnormal situations, such as short-term large-scale data processing or unexpected high concurrent requests. This type of data may affect the accuracy of the overall load assessment, so it needs to be removed or corrected to avoid interfering with the final calculation results.

[0063] After completing the data smoothing and anomaly removal, the server 104 can find the maximum load value in the processed time-series data and use it as the true load data of the corresponding virtual machine or host. The determination of the maximum load value can help the system understand the resource usage of each node in the most extreme situation, so as to provide a reference basis for subsequent load balancing and migration scheduling.

[0064] Step S204, process the first load data and the second load data through the scheduling analysis model, calculate the similarity values of every two alternative virtual machines, and cluster the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters.

[0065] Among them, the scheduling analysis model is constructed according to the load balancing objective function and the migration loss objective function.

[0066] Exemplarily, in order to achieve efficient virtual machine scheduling, balance the host resource load, improve resource utilization, and at the same time reduce the migration cost, the two objective functions can be designed as follows and :

[0067] First, to maximize resource balance:

[0068]

[0069] Among them, represents the total number of all host machines in the current system where the target host machine is located, and respectively represent the CPU utilization rate and memory utilization rate on the th host machine. To meet the requirements of resource balance, it is necessary to comprehensively consider resource utilization rate and resource balance degree. Therefore, the larger the value of, the greater the resource utilization rate; the smaller the value of, the better the resource balance degree.

[0070] Second, to minimize migration cost:

[0071]

[0072] Among them, represents whether the th virtual machine needs to be migrated (1 means it needs to be migrated, 0 means it does not need to be migrated), represents the standard time required when the th virtual machine is migrated. The smaller the value of, the smaller the migration cost brought by the number of migrations and migration time.

[0073] Exemplarily, during the process of data processing by the scheduling analysis model, the server 104 can read the first load data and the second load data of all alternative virtual machines, and extract the key load metrics therein, such as CPU occupancy rate, memory usage, disk I / O rate, and network traffic, etc. Next, the server 104 can calculate the similarity value between any two alternative virtual machines according to the above two objective functions. Specifically, the server 104 can adopt the method of cosine similarity and measure the similarity between them by comparing the vector angles of the load data of the alternative virtual machines. The larger the similarity value, the closer the load characteristics of the two virtual machines and the more similar the running modes.

[0074] Furthermore, to coordinate the objective functions, the server 104 can unify them into a minimization objective function, take the reciprocal of the load balancing objective function as the new load balancing objective function, that is .

[0075] After completing the similarity calculation, server 104 can start clustering the alternative virtual machines. Server 104 can use the hierarchical clustering method for clustering. Specifically, server 104 can take each alternative virtual machine as a clustering cluster, calculate the similarity value between every two clustering clusters according to the first load data and the corresponding second load data; merge multiple clustering clusters into a new clustering cluster according to the similarity value; according to the updated multiple clustering clusters, repeat the steps of calculating the similarity value and the steps of merging the clustering clusters until a hierarchical data structure including multiple clustering clusters is obtained, and select some or all of the clustering clusters in the hierarchical data structure as alternative clusters; each alternative cluster includes one or more alternative virtual machines. Further, server 104 can merge the two clustering clusters with the smallest similarity value into a new clustering cluster among multiple clustering clusters.

[0076] Exemplarily, server 104 can read the load data of all alternative virtual machines and convert this data into vector form. The data vector of each alternative virtual machine includes key metrics such as the CPU load, memory occupancy, disk I / O, and network traffic of this virtual machine. Then, server 104 can use the cosine similarity calculation method to compare the included angle of the load vectors of any two alternative virtual machines to determine the similarity degree between them. The value range of the cosine similarity is usually between 0 and 1, where 1 indicates that the load patterns of the two alternative virtual machines are exactly the same, and the smaller the value, the less similar their running characteristics are. Server 104 calculates the similarity between all pairs of alternative virtual machines in turn and stores the results in the similarity matrix.

[0077] After calculating the similarity between all alternative virtual machines, server 104 can enter the initialization stage of hierarchical clustering. In this stage, server 104 can first regard each alternative virtual machine as an independent initial cluster, that is, at the beginning, each cluster only contains one alternative virtual machine. Subsequently, server 104 searches for the two clusters with the smallest similarity in the similarity matrix and merges them into a new cluster. After the merge operation, server 104 can update the similarity matrix because the eigenvalue of the new cluster has changed. Therefore, server 104 can recalculate the similarity between it and other clusters and update the similarity matrix.

[0078] Next, server 104 can continuously repeat the process of merging and updating the similarity matrix, each time merging the two clusters with the smallest current similarity and continuously adjusting the feature vectors of the clusters until finally all virtual machines form a hierarchical structure containing multiple clustering clusters. Server 104 can select a part of the multiple clustering clusters as alternative clusters, or can regard all clustering clusters as alternative clusters, and finally generate multiple alternative clusters.

[0079] In the above steps, the two clustering clusters with the smallest similarity values are merged into a new clustering cluster, which can ensure that the two least similar clusters are merged each time, that is, the virtual machines with large resource differences are grouped together first. Since the alternative virtual machines with large differences are merged, the internal resources of the final cluster will be more balanced, avoiding local resource concentration, which is different from the traditional clustering method that preferentially merges data points with greater similarity, resulting in some clusters having mostly high-load virtual machines and some clusters having mostly low-load virtual machines. Therefore, by merging virtual machines with large differences, the formation of extreme clusters can be avoided, reducing the costs of scheduling and migration.

[0080] Step S206: Obtain the average eigenvalue corresponding to each alternative cluster according to the second load data.

[0081] Among them, the average eigenvalue refers to the overall template, which can be understood as a comprehensive representation of the load characteristics of all virtual machines within a cluster, and it can reflect the average resource usage and load distribution of multiple alternative virtual machines within the cluster. Specifically, the server 104 can traverse each alternative cluster and extract the load data of all virtual machines therein, including multiple key metrics such as CPU usage rate, memory occupancy rate, disk I / O load, and network traffic. For a specific cluster, the server 104 can calculate the average value of all virtual machines within it for each metric, thereby obtaining the overall template of the cluster. For example, if a cluster contains five virtual machines, and their CPU loads are 30%, 40%, 50%, 35%, and 45% respectively, then the overall template value of the CPU load of this cluster can be calculated as 40%, that is, the average CPU load of these virtual machines. The role of the overall template is to provide a clear measurement standard for subsequent migration decisions. The server 104 needs to evaluate the overall load conditions of different clusters to determine which clusters are more balanced and which clusters may have large differences in resource consumption.

[0082] Exemplarily, the server 104 can calculate the eigenvalues of each alternative virtual machine in each alternative cluster according to the load balancing objective function, the migration loss objective function, and the second load data; calculate the average eigenvalue of the alternative cluster according to the eigenvalues of each alternative virtual machine. That is, from multiple clusters S1, S2, S3... obtained by hierarchical clustering, calculate the overall template of each cluster to measure the resource distribution and load balancing degree of each cluster. Further, the server 104 can use the norm to calculate the overall template.

[0083] The calculation of the overall template is based on two optimization objectives: one is to ensure that the resource load of the migrated system is more balanced, and the other is to minimize the computational and storage losses during the migration process. To balance these two objectives, Server 104 can use a norm to measure the numerical size of the overall template. Specifically, a norm is a mathematical tool used to quantify the overall difference degree among multiple metrics. When the norm of a certain cluster is small, it indicates that the virtual machines in that cluster are relatively close in each load dimension, that is, the load situation within the cluster is relatively balanced. At the same time, its overall load has a high adaptability on the target host, and the migration cost is low. Therefore, Server 104 can sort each cluster according to the norm size of the overall template, and preferentially select the clusters with smaller overall template norms to ensure that the more balanced and lower-cost virtual machines are migrated first.

[0084] Step S208: Select a target cluster from multiple alternative clusters according to the average eigenvalue, and use the alternative virtual machines corresponding to the target cluster as the target migrated virtual machines, so as to schedule the target migrated virtual machines to the target host.

[0085] Exemplarily, after calculating the overall templates of all alternative clusters, Server 104 can select N virtual machines suitable for migration based on the values of the overall templates. First, Server 104 can determine the specific value of N, that is, the number of virtual machines that need to be scheduled to the target host during the migration process. Subsequently, during the process of selecting alternative virtual machines, Server 104 can start selecting from the cluster with the smallest overall template in sequence, and use the alternative virtual machines corresponding to the target cluster as the target migrated virtual machines, so as to schedule the target migrated virtual machines to the target host.

[0086] Furthermore, after completing the virtual machine scheduling, Server 104 can also evaluate the effects before and after scheduling and display the results in an appropriate way to verify the effectiveness and optimization effect of the scheduling scheme. To visually display the scheduling effect, Server 104 can use various data display methods, such as numerical comparison, trend chart, heat map or resource distribution map. For system administrators, Server 104 can provide detailed logs or reports, including the migration paths of each virtual machine, changes in resource occupancy, and analysis of the overall scheduling optimization effect. If the scheduling result does not meet the expectation, Server 104 can also analyze in combination with historical data, identify possible abnormal situations, and provide improvement suggestions, such as adjusting the load balancing strategy, optimizing the clustering method, optimizing the above two objective functions or adding new objective functions, etc., to further improve the subsequent scheduling effect.

[0087] In the above virtual machine scheduling method, first, the first load data of the target host and the second load data of multiple alternative virtual machines are obtained. The first load data and the second load data are processed by a scheduling analysis model to calculate the similarity values between every two alternative virtual machines, and the multiple alternative virtual machines are clustered according to the similarity values to obtain multiple alternative clusters. Since the scheduling analysis model is constructed based on a load balancing objective function and a migration loss objective function, it can take into account the migration loss of virtual machines while meeting the requirements of host load balancing, cluster the multiple alternative virtual machines by integrating the load data and the migration loss data, and then obtain the average eigenvalue corresponding to each alternative cluster according to the second load data, so as to use the average eigenvalue to reflect the performance of different alternative clusters in load balancing. Finally, according to the average eigenvalue, a target cluster is selected from the multiple alternative clusters, and the alternative virtual machines corresponding to the target cluster are used as target migration virtual machines, so as to select appropriate target migration virtual machines according to two selection criteria, namely the load balancing objective function and the migration loss objective function, schedule the target migration virtual machines to the target host, reduce the virtual machine migration cost on the basis of meeting the load balancing condition, achieve load balancing among multiple hosts, relieve the resource pressure on a single host, and improve the overall performance and reliability.

[0088] In an exemplary embodiment, as Figure 3 shown, step S208 includes steps S302 to S306. Among them:

[0089] Step S302, sort the multiple alternative clusters according to the average eigenvalue to obtain a migration sequence.

[0090] Exemplarily, the server 104 can sort all clusters according to the average eigenvalue (i.e., the overall template) of each alternative cluster to determine the priority order of migration. The server 104 can traverse all alternative clusters and sort them according to the magnitude of their average eigenvalues. The sorting logic is based on the value of the overall template. A cluster with a smaller overall template indicates more balanced resources and lower migration costs, so the server 104 can give priority to it. The server 104 can arrange all clusters in ascending order of the overall template to form an ordered migration sequence, ensuring that the most suitable set of virtual machines is processed first to achieve the best resource allocation and migration efficiency.

[0091] Step S304, obtain the number of virtual machines to be migrated for the target migration virtual machine.

[0092] Exemplarily, the server 104 can obtain the total number N of target migration virtual machines, that is, the total number of virtual machines that need to be migrated to the target host. N can be determined by the load balancing policy set by the system, the available resources of the host, and the constraints of the current computing environment.

[0093] Step S306: Select a target cluster according to the quantity to be migrated and the migration sequence.

[0094] Exemplarily, the server 104 can sequentially select alternative clusters according to the sorted migration sequence until the migration requirements are met. Further, when the quantity to be migrated is less than the quantity of alternative virtual machines corresponding to the target cluster, the server 104 can determine the target migrated virtual machine according to the eigenvalue of the alternative virtual machine, so as to schedule the target migrated virtual machine to the target host.

[0095] Exemplarily, when traversing to a certain cluster Si, the server 104 needs to determine whether the quantity of virtual machines in this cluster meets the requirement of N. If the total number of virtual machines in the current cluster Si is less than or equal to N, the server 104 can directly select all the virtual machines in this cluster for migration, and update the remaining quantity of virtual machines to be selected N' = N - |Si|, and then continue to select from the next cluster.

[0096] Further, if the quantity of virtual machines in the current cluster Si exceeds N, the server 104 cannot directly select the entire cluster, but needs to further evaluate the suitability of each virtual machine in the cluster. The server 104 can calculate the average value of the resource balance and migration cost of each virtual machine in the cluster Si. The resource balance mainly measures whether the load characteristics of the virtual machine match the target host, while the migration cost involves factors such as data transmission overhead and storage access impact. The server 104 calculates these values for all alternative virtual machines in the cluster and sorts them according to the average value, and preferentially selects virtual machines with better resource balance and lower migration cost until N eligible virtual machines are selected to complete the final determination process of the migrated virtual machine.

[0097] In the above embodiments, the hierarchical clustering algorithm is used for virtual machine scheduling. Compared with existing virtual machine scheduling schemes, such as round-robin scheduling, best-fit scheduling, priority scheduling, load balancing scheduling, etc., the hierarchical clustering algorithm adopted in the above embodiments can automatically perform clustering analysis on virtual machines without manually specifying the number of clusters or a specific clustering algorithm. This automatic clustering feature makes the algorithm more flexible and adaptable. Moreover, through the method of the above embodiments, data in multiple dimensions can be considered simultaneously, including CPU utilization, memory utilization, migration time, number of migrations, etc. Compared with other related scheduling schemes, more factors can be comprehensively considered, and the load situation of virtual machines can be evaluated more comprehensively. When dealing with large-scale data, through the above embodiments, the computing process can have high computing efficiency and low time complexity, so as to cope with complex scheduling scenarios and generate a scheduling scheme in a short time. In addition, the hierarchical clustering algorithm adopted in the above embodiments has high flexibility and scalability during the scheduling process. It can adjust parameters and features according to actual situations, handle virtual machine clusters of different scales and types, and can be dynamically adjusted according to changes in virtual machine loads. This enables the system to better cope with load fluctuations and changes and maintain good performance and resource utilization.

[0098] Furthermore, compared with clustering algorithms that require specifying the number of clusters, the hierarchical clustering algorithm adopted in the above embodiments does not need to specify the number of clusters in advance. It can automatically determine the hierarchical structure of the clusters according to the inherent characteristics of the data. Therefore, this feature of automatically determining the number of clusters can make the algorithm more flexible and adaptable and reduce the need for manual intervention. In addition, the hierarchical clustering algorithm adopted in the above embodiments does not require preset initial cluster centers or partitions. As a bottom-up or top-down clustering process based on the distance or similarity between data, its algorithm is simpler and does not require prior selection of initial values like clustering algorithms such as K-means. It has good adaptability and stability for different types of data, can handle data sets of different shapes, sizes, and densities, and has a certain robustness to outliers.

[0099] In another exemplary embodiment, the server 104 obtains the first load data of the target host and the second load data of multiple alternative virtual machines, and processes the first load data and the second load data through a scheduling analysis model. Each alternative virtual machine is regarded as a clustering cluster, and the similarity value between every two clustering clusters is calculated according to the first load data and the corresponding second load data.

[0100] Next, the server 104 combines the two clusters with the smallest similarity values among multiple clusters into a new cluster, and repeats the steps of calculating the similarity values and the steps of combining clusters according to the updated multiple clusters until a hierarchical data structure including multiple clusters is obtained, and selects some or all of the clusters in the hierarchical data structure as candidate clusters.

[0101] Next, the server 104 calculates the eigenvalue of each candidate virtual machine in each candidate cluster according to the load balancing objective function, the migration loss objective function, and the second load data, and calculates the average eigenvalue of the candidate cluster according to the eigenvalues of the candidate virtual machines. Subsequently, the server 104 sorts the multiple candidate clusters according to the average eigenvalue, obtains a migration sequence, obtains the number of virtual machines to be migrated of the target migration virtual machine, and then selects the target cluster according to the number of virtual machines to be migrated and the migration sequence.

[0102] Finally, the server 104 uses the candidate virtual machines corresponding to the target cluster as the target migration virtual machines to schedule the target migration virtual machines to the target host. In the case where the number of virtual machines to be migrated is less than the number of candidate virtual machines corresponding to the target cluster, the server 104 determines the target migration virtual machines according to the eigenvalues of the candidate virtual machines to schedule the target migration virtual machines to the target host.

[0103] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.

[0104] Based on the same inventive concept, an embodiment of the present application further provides a virtual machine scheduling device for implementing the virtual machine scheduling method described above. The implementation solution provided by this device to solve the problem is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more embodiments of the virtual machine scheduling device provided below can refer to the limitations on the virtual machine scheduling method in the above text, and will not be repeated here.

[0105] In an exemplary embodiment, as Figure 4As shown in the figure, a virtual machine scheduling device is provided, including: a data acquisition module 402, a scheduling analysis module 404, a data processing module 406, and a scheduling processing module 408, where:

[0106] The data acquisition module 402 is configured to acquire the first load data of the target host and the second load data of multiple alternative virtual machines;

[0107] The scheduling analysis module 404 is configured to process the first load data and the second load data through a scheduling analysis model, calculate the similarity values between every two alternative virtual machines, and cluster the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters; among them, the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function;

[0108] The data processing module 406 is configured to obtain the average eigenvalue corresponding to each alternative cluster according to the second load data;

[0109] The scheduling processing module 408 is configured to select a target cluster from the multiple alternative clusters according to the average eigenvalue, and use the alternative virtual machines corresponding to the target cluster as target migration virtual machines to schedule the target migration virtual machines to the target host.

[0110] In one embodiment, the scheduling analysis module 404 includes:

[0111] A numerical calculation unit configured to use each alternative virtual machine as a clustering cluster and calculate the similarity value between every two clustering clusters according to the first load data and the corresponding second load data;

[0112] A clustering unit configured to merge multiple clustering clusters into a new clustering cluster according to the similarity values;

[0113] An iteration unit configured to repeat the steps of calculating the similarity values and merging the clustering clusters according to the updated multiple clustering clusters until a hierarchical data structure including multiple clustering clusters is obtained, and select some or all of the clustering clusters in the hierarchical data structure as alternative clusters; each alternative cluster includes one or more alternative virtual machines.

[0114] In one embodiment, the clustering unit is specifically configured to: in multiple clustering clusters, merge the two clustering clusters with the smallest similarity value into a new clustering cluster.

[0115] In one embodiment, the data processing module 406 is specifically configured to: calculate the eigenvalues of each alternative virtual machine in each alternative cluster according to the load balancing objective function, the migration loss objective function, and the second load data; calculate the average eigenvalue of the alternative cluster according to the eigenvalues of each alternative virtual machine.

[0116] In one embodiment, the scheduling processing module 408 is specifically configured to: sort a plurality of alternative clusters according to the average eigenvalue to obtain a migration sequence; obtain the number of virtual machines to be migrated of the target migration virtual machine; and select a target cluster according to the number of virtual machines to be migrated and the migration sequence.

[0117] In one embodiment, the scheduling processing module 408 is further configured to: when the number of virtual machines to be migrated is less than the number of alternative virtual machines corresponding to the target cluster, determine the target migration virtual machine according to the eigenvalue of the alternative virtual machine, so as to schedule the target migration virtual machine to the target host.

[0118] Each module in the above virtual machine scheduling device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in the form of hardware or be independent of the processor, or can be stored in the memory in the computer device in the form of software, so as to be called by the processor to execute the operations corresponding to the above respective modules.

[0119] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the load data of each host and virtual machine. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a virtual machine scheduling method is implemented.

[0120] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 6As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a virtual machine scheduling method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0121] Those skilled in the art can understand that Figure 6 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0122] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented: obtaining first load data of a target host and second load data of multiple alternative virtual machines; processing the first load data and the second load data through a scheduling analysis model, calculating the similarity values between every two alternative virtual machines, and clustering the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters; wherein, the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function; obtaining an average eigenvalue corresponding to each alternative cluster according to the second load data; selecting a target cluster from the multiple alternative clusters according to the average eigenvalue, and using the alternative virtual machine corresponding to the target cluster as a target migration virtual machine to schedule the target migration virtual machine to the target host.

[0123] In one embodiment, when the processor executes a computer program, the following steps are further implemented: taking each alternative virtual machine as a clustering cluster, calculating the similarity value between every two clustering clusters according to the first load data and the corresponding second load data; merging multiple clustering clusters into a new clustering cluster according to the similarity value; according to the updated multiple clustering clusters, repeating the steps of calculating the similarity value and merging the clustering clusters until a hierarchical data structure including multiple clustering clusters is obtained, and selecting some or all of the clustering clusters in the hierarchical data structure as alternative clusters; each alternative cluster includes one or more alternative virtual machines.

[0124] In one embodiment, when the processor executes a computer program, the following steps are further implemented: in multiple clustering clusters, merging the two clustering clusters with the smallest similarity value into a new clustering cluster.

[0125] In one embodiment, when the processor executes a computer program, the following steps are further implemented: calculating the eigenvalue of each alternative virtual machine in each alternative cluster according to the load balancing objective function, the migration loss objective function and the second load data; calculating the average eigenvalue of the alternative cluster according to the eigenvalues of the alternative virtual machines.

[0126] In one embodiment, when the processor executes a computer program, the following steps are further implemented: sorting multiple alternative clusters according to the average eigenvalue to obtain a migration sequence; obtaining the number of virtual machines to be migrated of the target migration virtual machine; selecting a target cluster according to the number of virtual machines to be migrated and the migration sequence.

[0127] In one embodiment, when the processor executes a computer program, the following steps are further implemented: in the case that the number of virtual machines to be migrated is less than the number of alternative virtual machines corresponding to the target cluster, determining the target migration virtual machine according to the eigenvalue of the alternative virtual machine, so as to schedule the target migration virtual machine to the target host.

[0128] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining the first load data of the target host and the second load data of multiple alternative virtual machines; processing the first load data and the second load data through a scheduling analysis model, calculating the similarity value between every two alternative virtual machines, and clustering the multiple alternative virtual machines according to the similarity value to obtain multiple alternative clusters; wherein, the scheduling analysis model is constructed according to the load balancing objective function and the migration loss objective function; obtaining the average eigenvalue corresponding to each alternative cluster according to the second load data; selecting a target cluster from multiple alternative clusters according to the average eigenvalue, and taking the alternative virtual machines corresponding to the target cluster as the target migration virtual machines, so as to schedule the target migration virtual machines to the target host.

[0129] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: taking each alternative virtual machine as a clustering cluster, calculating the similarity value between every two clustering clusters according to the first load data and the corresponding second load data; merging multiple clustering clusters into a new clustering cluster according to the similarity value; according to the updated multiple clustering clusters, repeating the steps of calculating the similarity value and merging the clustering clusters until a hierarchical data structure including multiple clustering clusters is obtained, and selecting some or all of the clustering clusters in the hierarchical data structure as alternative clusters; each alternative cluster includes one or more alternative virtual machines.

[0130] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: in multiple clustering clusters, merging the two clustering clusters with the smallest similarity value into a new clustering cluster.

[0131] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: calculating the eigenvalue of each alternative virtual machine in each alternative cluster according to the load balancing objective function, the migration loss objective function and the second load data; calculating the average eigenvalue of the alternative cluster according to the eigenvalues of the alternative virtual machines.

[0132] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: sorting multiple alternative clusters according to the average eigenvalue to obtain a migration sequence; obtaining the number of virtual machines to be migrated of the target migration virtual machine; selecting a target cluster according to the number of virtual machines to be migrated and the migration sequence.

[0133] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: in the case that the number of virtual machines to be migrated is less than the number of alternative virtual machines corresponding to the target cluster, determining the target migration virtual machine according to the eigenvalue of the alternative virtual machine so as to schedule the target migration virtual machine to the target host.

[0134] In one embodiment, a computer program product is provided, including a computer program, which when executed by a processor, implements the following steps: obtaining the first load data of the target host and the second load data of multiple alternative virtual machines; processing the first load data and the second load data through a scheduling analysis model, calculating the similarity value between every two alternative virtual machines, and clustering multiple alternative virtual machines according to the similarity value to obtain multiple alternative clusters; wherein, the scheduling analysis model is constructed according to the load balancing objective function and the migration loss objective function; obtaining the average eigenvalue corresponding to each alternative cluster according to the second load data; selecting a target cluster from multiple alternative clusters according to the average eigenvalue, and taking the alternative virtual machines corresponding to the target cluster as the target migration virtual machines so as to schedule the target migration virtual machines to the target host.

[0135] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: taking each alternative virtual machine as a clustering cluster, calculating a similarity value between every two clustering clusters according to the first load data and the corresponding second load data; merging multiple clustering clusters into a new clustering cluster according to the similarity value; according to the updated multiple clustering clusters, repeating the steps of calculating the similarity value and merging the clustering clusters until a hierarchical data structure including multiple clustering clusters is obtained, and selecting some or all of the clustering clusters in the hierarchical data structure as alternative clusters; each alternative cluster includes one or more alternative virtual machines.

[0136] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: in multiple clustering clusters, merging the two clustering clusters with the smallest similarity value into a new clustering cluster.

[0137] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: calculating the eigenvalue of each alternative virtual machine in each alternative cluster according to the load balancing objective function, the migration loss objective function, and the second load data; calculating the average eigenvalue of the alternative cluster according to the eigenvalues of the alternative virtual machines.

[0138] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: sorting multiple alternative clusters according to the average eigenvalue to obtain a migration sequence; obtaining the number of virtual machines to be migrated of the target migration virtual machine; selecting a target cluster according to the number of virtual machines to be migrated and the migration sequence.

[0139] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: in the case where the number of virtual machines to be migrated is less than the number of alternative virtual machines corresponding to the target cluster, determining the target migration virtual machine according to the eigenvalue of the alternative virtual machine, so as to schedule the target migration virtual machine to the target host.

[0140] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0141] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0142] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0143] The above-described embodiments merely represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A virtual machine scheduling method, characterized in that, The method includes: Obtaining first load data of a target host and second load data of multiple alternative virtual machines; Processing the first load data and the second load data through a scheduling analysis model, calculating similarity values between every two of the alternative virtual machines, and clustering the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters; wherein, the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function; Obtaining an average eigenvalue corresponding to each of the alternative clusters according to the second load data; Selecting a target cluster from the multiple alternative clusters according to the average eigenvalue, and using the alternative virtual machines corresponding to the target cluster as target migration virtual machines to schedule the target migration virtual machines to the target host; The calculating similarity values between every two of the alternative virtual machines and clustering the multiple alternative virtual machines according to the similarity values includes: Regarding each of the alternative virtual machines as a clustering cluster, and calculating similarity values between every two of the clustering clusters according to the first load data and the corresponding second load data; Among the multiple clustering clusters, merging the two clustering clusters with the smallest similarity value into a new clustering cluster; The obtaining an average eigenvalue corresponding to each of the alternative clusters according to the second load data includes: Calculating eigenvalues of the alternative virtual machines in each of the alternative clusters according to the load balancing objective function, the migration loss objective function, and the second load data; Calculating the average eigenvalue of the alternative cluster according to the eigenvalues of the alternative virtual machines.

2. The method according to claim 1, wherein The calculating similarity values between every two of the alternative virtual machines and clustering the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters further includes: According to the updated multiple clustering clusters, repeating the steps of calculating the similarity values and merging the clustering clusters until a hierarchical data structure including multiple clustering clusters is obtained, and selecting some or all of the clustering clusters in the hierarchical data structure as alternative clusters; each alternative cluster includes one or more of the alternative virtual machines.

3. The method according to claim 1, wherein The selecting a target cluster from the multiple alternative clusters according to the average eigenvalue includes: Sorting the multiple alternative clusters according to the average eigenvalue to obtain a migration sequence; Obtaining the number of virtual machines to be migrated of the target migration virtual machines; Selecting a target cluster according to the number of virtual machines to be migrated and the migration sequence.

4. The method according to claim 3, characterized in that The using the alternative virtual machines corresponding to the target cluster as target migration virtual machines to schedule the target migration virtual machines to the target host includes: In a case where the number of virtual machines to be migrated is less than the number of the alternative virtual machines corresponding to the target cluster, determining target migration virtual machines according to the eigenvalues of the alternative virtual machines to schedule the target migration virtual machines to the target host.

5. A virtual machine scheduling device, characterized in that, The device includes: A data acquisition module, configured to obtain first load data of a target host and second load data of multiple alternative virtual machines; A scheduling analysis module is used to process the first load data and the second load data through a scheduling analysis model, calculate the similarity values between every two of the alternative virtual machines, and cluster the multiple alternative virtual machines according to the similarity values to obtain multiple alternative clusters; wherein, the scheduling analysis model is constructed based on a load balancing objective function and a migration loss objective function; specifically, the scheduling analysis module is used to take each of the alternative virtual machines as a clustering cluster, and calculate the similarity values between every two of the clustering clusters according to the first load data and the corresponding second load data; among the multiple clustering clusters, merge the two clustering clusters with the smallest similarity value into a new clustering cluster. A data processing module is used to obtain the average eigenvalue corresponding to each of the alternative clusters according to the second load data; specifically, the data processing module is used to calculate the eigenvalues of the alternative virtual machines in each of the alternative clusters according to the load balancing objective function, the migration loss objective function, and the second load data; calculate the average eigenvalue of the alternative cluster according to the eigenvalues of the alternative virtual machines. A scheduling processing module is used to select a target cluster from the multiple alternative clusters according to the average eigenvalue, and use the alternative virtual machines corresponding to the target cluster as target migration virtual machines to schedule the target migration virtual machines to the target host.

6. The device according to claim 5, characterized in that Specifically, the scheduling processing module is used to sort the multiple alternative clusters according to the average eigenvalue to obtain a migration sequence; obtain the number of virtual machines to be migrated of the target migration virtual machine; select a target cluster according to the number of virtual machines to be migrated and the migration sequence.

7. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Multi-target virtual machine scheduling method and system for cloud resource management

    CN110069319A

  • Storage server and operation method of storage server

    CN117631968A