Virtual machine scheduling method and device, computer equipment and storage medium
Through the virtual machine scheduling method, the scheduling analysis model is used to calculate the virtual machine similarity and cluster it, select the target cluster and schedule the virtual machine to the target host, solving the problem of high virtual machine migration cost in the existing technology, and realizing load balancing and efficient resource utilization.
Patent Information
- Application Number
- CN202510415786.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-04-03
AI Technical Summary
The existing virtual machine scheduling methods are difficult to reduce the cost of virtual machine migration on the basis of meeting the load balancing conditions, resulting in low resource utilization and unstable service performance.
By obtaining the load data of the target host and the alternative virtual machine, using the scheduling analysis model to calculate the similarity value between the virtual machines and cluster it to obtain multiple alternative clusters. Select the target cluster according to the average characteristic value of the cluster and schedule its corresponding virtual machine to the target host.
It realizes the reduction of virtual machine migration costs and improve resource utilization and service performance on the basis of meeting load balancing conditions.
Smart Images

Figure CN119917225A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a virtual machine scheduling method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] In the growing field of cloud computing, virtualization technology has become an important tool for resource sharing and flexible deployment. Virtual machine scheduling refers to the allocation of virtual machine instances to host machines, while virtual machine selection needs to consider user needs, application characteristics and cost-effectiveness, and select the most suitable instance from a large number of candidate virtual machines to meet different business needs.
[0003] Through precise virtual machine scheduling and wise virtual machine selection, cloud computing platforms can maximize resource utilization and provide more stable and efficient services. When scheduling virtual machines, it is necessary to fully consider resource balancing and migration costs. However, the common virtual machine scheduling methods currently have the following problems: On the one hand, due to the imbalance of resources such as memory of the host machine, the host machine cannot load more virtual machines, resulting in low resource utilization. On the other hand, the migration cost of the virtual machine, such as migration time and number of migrations, may affect the performance and reliability of the service.
[0004] At present, relevant solutions only consider one aspect. When only considering the migration cost, after the virtual machine is migrated to the host machine, resource imbalance may occur. For example, the CPU (Central Processing Unit) overload or memory overload situation is alleviated after the virtual machine is migrated, but the CPU utilization is significantly higher than the memory utilization or the memory utilization is significantly higher than the CPU utilization, which still causes the host machine to be unable to load more virtual machines and requires secondary scheduling. When only considering resource balance, after the virtual machine is migrated to the host machine, SLA (Service Level Agreement) may be affected, and it is difficult to guarantee the performance and reliability of the service. Therefore, relevant solutions cannot reduce the migration cost on the basis of meeting the load balancing conditions. Summary of the invention
[0005] Based on this, it is necessary to provide a virtual machine scheduling method, apparatus, computer equipment, computer-readable storage medium and computer program product that can reduce the virtual machine migration cost on the basis of satisfying load balancing conditions in response to the above technical problems.
[0006] In a first aspect, the present application provides a virtual machine scheduling method, comprising:
[0007] Obtaining first load data of a target host machine and second load data of a plurality of candidate virtual machines;
[0008] The first load data and the second load data are processed by a scheduling analysis model, a similarity value between every two candidate virtual machines is calculated, and a plurality of candidate virtual machines are clustered according to the similarity values to obtain a plurality of candidate clusters; wherein the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function;
[0009] According to the second load data, an average characteristic value corresponding to each of the candidate clusters is obtained;
[0010] According to the average characteristic value, a target cluster is selected from the multiple candidate clusters, and the candidate virtual machine corresponding to the target cluster is used as a target migration virtual machine, so as to schedule the target migration virtual machine to the target host machine.
[0011] In one embodiment, the calculating of the similarity value between every two candidate virtual machines and clustering the plurality of candidate virtual machines according to the similarity value to obtain a plurality of candidate clusters includes:
[0012] Taking each candidate virtual machine as a cluster, and calculating a similarity value between each two clusters according to the first load data and the corresponding second load data;
[0013] Merging the plurality of clusters into a new cluster according to the similarity value;
[0014] According to the updated multiple clusters, the steps of calculating the similarity values and merging the clusters are repeated until a hierarchical data structure including the multiple clusters is obtained, and some or all of the clusters in the hierarchical data structure are selected as candidate clusters; each candidate cluster includes one or more candidate virtual machines.
[0015] In one embodiment, merging the plurality of clusters into a new cluster according to the similarity value includes:
[0016] Among the multiple clusters, two clusters with the smallest similarity values are merged into a new cluster.
[0017] In one embodiment, obtaining the average characteristic value corresponding to each candidate cluster according to the second load data includes:
[0018] Calculating a characteristic value 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;
[0019] The average characteristic value of the candidate cluster is calculated according to the characteristic value of each candidate virtual machine.
[0020] In one embodiment, selecting a target cluster from the plurality of candidate clusters according to the average eigenvalue comprises:
[0021] sorting the plurality of candidate clusters according to the average eigenvalue to obtain a migration sequence;
[0022] Obtaining the number of target migration virtual machines to be migrated;
[0023] A target cluster is selected according to the number to be migrated and the migration sequence.
[0024] In one embodiment, the step of using the candidate virtual machine corresponding to the target cluster as a target migration virtual machine to schedule the target migration virtual machine to the target host machine includes:
[0025] In the case that the number of virtual machines to be migrated is less than the number of candidate virtual machines corresponding to the target cluster, a target migration virtual machine is determined according to the feature values of the candidate virtual machines, so as to schedule the target migration virtual machine to the target host machine.
[0026] In a second aspect, the present application further provides a virtual machine scheduling device, comprising:
[0027] A data acquisition module, used to acquire first load data of a target host machine and second load data of a plurality of candidate 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 candidate virtual machines, and cluster a plurality of the candidate virtual machines according to the similarity value to obtain a plurality of candidate 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, used for obtaining an average characteristic value corresponding to each of the candidate clusters according to the second load data;
[0030] The scheduling processing module is used to select a target cluster from the multiple candidate clusters according to the average characteristic value, and use the candidate virtual machine corresponding to the target cluster as the target migration virtual machine to schedule the target migration virtual machine to the target host machine.
[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0032] Obtaining first load data of a target host machine and second load data of a plurality of candidate virtual machines;
[0033] The first load data and the second load data are processed by a scheduling analysis model, a similarity value between every two candidate virtual machines is calculated, and a plurality of candidate virtual machines are clustered according to the similarity values to obtain a plurality of candidate clusters; wherein the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function;
[0034] According to the second load data, an average characteristic value corresponding to each of the candidate clusters is obtained;
[0035] According to the average characteristic value, a target cluster is selected from the multiple candidate clusters, and the candidate virtual machine corresponding to the target cluster is used as a target migration virtual machine, so as to schedule the target migration virtual machine to the target host machine.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0037] Obtaining first load data of a target host machine and second load data of a plurality of candidate virtual machines;
[0038] The first load data and the second load data are processed by a scheduling analysis model, a similarity value between every two candidate virtual machines is calculated, and a plurality of candidate virtual machines are clustered according to the similarity values to obtain a plurality of candidate clusters; wherein the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function;
[0039] According to the second load data, an average characteristic value corresponding to each of the candidate clusters is obtained;
[0040] According to the average characteristic value, a target cluster is selected from the multiple candidate clusters, and the candidate virtual machine corresponding to the target cluster is used as a target migration virtual machine, so as to schedule the target migration virtual machine to the target host machine.
[0041] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0042] Obtaining first load data of a target host machine and second load data of a plurality of candidate virtual machines;
[0043] The first load data and the second load data are processed by a scheduling analysis model, a similarity value between every two candidate virtual machines is calculated, and a plurality of candidate virtual machines are clustered according to the similarity values to obtain a plurality of candidate clusters; wherein the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function;
[0044] According to the second load data, an average characteristic value corresponding to each of the candidate clusters is obtained;
[0045] According to the average characteristic value, a target cluster is selected from the multiple candidate clusters, and the candidate virtual machine corresponding to the target cluster is used as a target migration virtual machine, so as to schedule the target migration virtual machine to the target host machine.
[0046] The above-mentioned virtual machine scheduling method, device, computer equipment, storage medium and computer program product first obtain the first load data of the target host machine and the second load data of multiple candidate virtual machines, process the first load data and the second load data through the scheduling analysis model, thereby calculating the similarity value of every two candidate virtual machines, and clustering the multiple candidate virtual machines according to the similarity value to obtain multiple candidate clusters. Since the scheduling analysis model is constructed according to the load balancing objective function and the migration loss objective function, it can meet the requirements of host machine load balancing while taking into account the migration loss of the virtual machine, clustering the multiple candidate virtual machines according to the comprehensive load data and migration loss data, and then according to the second load data, obtain the average characteristic value corresponding to each candidate cluster, so as to use the average characteristic value to reflect the performance of different candidate clusters in load balancing, and finally select the target cluster from the multiple candidate clusters according to the average characteristic value, and use the candidate virtual machine corresponding to the target cluster as the target migration virtual machine, so as to select the appropriate target migration virtual machine according to the two selection criteria of the load balancing objective function and the migration loss objective function, so as to schedule the target migration virtual machine to the target host machine, so as to reduce the virtual machine migration cost on the basis of meeting the load balancing conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 An application environment diagram of a virtual machine scheduling method in an embodiment;
[0049] Figure 2A flowchart of a virtual machine scheduling method in one embodiment;
[0050] Figure 3 This is a flow chart of step S208 of a virtual machine scheduling method in one embodiment;
[0051] Figure 4 It is a structural block diagram of a virtual machine scheduling device in one embodiment;
[0052] Figure 5 is an internal structure diagram of a computer device in one embodiment;
[0053] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with 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 in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through the network, and is used to receive and send data that needs to be stored, distributed or processed to the server 104 or a host computer or other service end.
[0056] In some embodiments, the server 104 may include a status monitoring module and a data analysis module, wherein the status monitoring module is used to collect and monitor the load data of each host machine and virtual machine and information such as the working status that indicates whether migration is required; the data analysis module is used to process the first load data of the target host machine and the second load data of multiple candidate virtual machines, and select a suitable target migration virtual machine when virtual machine migration is required, and complete the migration task of the target migration virtual machine to the target host machine. In other embodiments, the server 104 may only include the above-mentioned data analysis module, and rely on the status monitoring modules of other service ends to obtain the load data of each host machine and virtual machine and information such as the working status that indicates 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 it can be placed on the cloud or other network servers. The data storage system can be used to store the load data of each host machine and the virtual machine. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, 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 car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0058] In an exemplary embodiment, Figure 2 As shown, a virtual machine scheduling method is provided, which is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S202 to S208. Among them:
[0059] Step S202: obtaining first load data of a target host machine and second load data of a plurality of candidate virtual machines.
[0060] Among them, the first load data refers to the operating status information of the current target host machine, which is used to reflect the overall resource usage of the target host machine, including but not limited to CPU load, memory usage, disk I / O rate, network bandwidth usage, etc., which can reflect the current load pressure of the target host machine; the second load data refers to the operating status information of multiple candidate virtual machines, which is used to describe the resource usage of each candidate virtual machine to be migrated. Similar to the first load data, it can also include CPU load, memory usage, disk I / O, network bandwidth, etc. In addition, since these candidate virtual machines may be distributed on different host machines, their operating environment, load status, application requirements, etc. are also different. Therefore, the second load data can also include historical load data. For example, a candidate virtual machine may have lower load data in a certain period of time, but higher load data in 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 obtain the first load data and the second load data from other servers. Furthermore, when obtaining the load data of the target host machine and the candidate virtual machine, the server 104 can use the historical time series data for statistical analysis to obtain more accurate load information. Specifically, first, the server 104 can continuously collect the operating data of the target host machine and each candidate virtual machine, and arrange these data in chronological order to form a complete time series data sequence, which may include multiple key indicators such as CPU usage, memory usage, disk I / O rate, network traffic, etc., and the data will be continuously updated and accumulated over time to provide long-term load change trends.
[0062] Next, after acquiring the time series data sequence, the server 104 can filter it to remove high-frequency jitter that may be caused by random errors. Since there may be short-term load fluctuations during the operation of the system, such as the execution of certain instantaneous tasks causing a surge in resource usage, but these fluctuations do not represent the true situation of the overall load, it is necessary to smooth the data through filtering technology to make it more representative. After the filtering is completed, the server 104 can further detect the low-frequency sudden peak load that may exist in the data. This burst load may be caused by temporary tasks or abnormal situations, such as short-term large-scale data processing or unexpected high-concurrency requests. This type of data may affect the accuracy of the overall load assessment, so it needs to be eliminated or corrected to avoid interference with the final calculation results.
[0063] After smoothing and eliminating anomalies in the data, the server 104 can find the maximum load value in the processed time series data and use it as the real 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 case, thereby providing a reference for subsequent load balancing and migration scheduling.
[0064] Step S204 , processing the first load data and the second load data through the scheduling analysis model, calculating the similarity value between every two candidate virtual machines, and clustering the multiple candidate virtual machines according to the similarity values to obtain multiple candidate clusters.
[0065] Among them, the scheduling analysis model is constructed based on the load balancing objective function and the migration loss objective function.
[0066] For example, in order to achieve efficient virtual machine scheduling, balance host resource load, improve resource utilization, and reduce migration costs, the two objective functions can be designed as follows: and :
[0067] First, in order to maximize resource balance:
[0068]
[0069] in, Indicates the number of all hosts in the current system where the target host is located. and Respectively represent The CPU utilization and memory utilization on each host. To meet the requirements of resource balancing, it is necessary to comprehensively consider resource utilization and resource balance. Therefore, The larger the value, the greater the resource utilization; The smaller the value, the better the resource balance.
[0070] Second, to minimize the migration cost:
[0071]
[0072] in, Indicates Whether the virtual machine needs to be migrated (1 means it needs to be migrated, 0 means it does not need to be migrated). Indicates The standard time required to migrate a virtual machine. The smaller the value, the smaller the migration cost caused by the number of migrations and migration time.
[0073] Exemplarily, during the data processing of the scheduling analysis model, the server 104 can read the first load data and the second load data of all candidate virtual machines, and extract key load indicators therein, such as CPU occupancy, memory usage, disk I / O rate, and network traffic. Next, the server 104 can calculate the similarity value between any two candidate virtual machines based on the above two objective functions. Specifically, the server 104 can use the cosine similarity method to measure the similarity between the candidate virtual machine load data by comparing the vector angles. The larger the similarity value, the closer the load characteristics of the two virtual machines are and the more similar the operating modes are.
[0074] Furthermore, in order to coordinate the objective function, the server 104 can unify it into a minimization objective function and convert the load balancing objective function Take the inverse as the new load balancing objective function, that is, .
[0075] After completing the similarity calculation, the server 104 can start clustering the candidate virtual machines. The server 104 can use a hierarchical clustering method for clustering. Specifically, the server 104 can treat each candidate virtual machine as a cluster cluster, calculate the similarity value between each two cluster clusters according to the first load data and the corresponding second load data; merge multiple cluster clusters into a new cluster cluster according to the similarity value; repeat the steps of calculating the similarity value and merging the cluster clusters according to the updated multiple cluster clusters until a hierarchical data structure including multiple cluster clusters is obtained, and select some or all of the cluster clusters in the hierarchical data structure as candidate clusters; each candidate cluster includes one or more candidate virtual machines. Furthermore, the server 104 can merge the two cluster clusters with the smallest similarity values into a new cluster cluster among the multiple cluster clusters.
[0076] Exemplarily, the server 104 can read the load data of all candidate virtual machines and convert these data into vector form. The data vector of each candidate virtual machine contains key indicators such as the CPU load, memory usage, disk I / O, and network traffic of the virtual machine. Then, the server 104 can use the cosine similarity calculation method to compare the load vector angles of any two candidate virtual machines to determine the degree of similarity between them. The value range of cosine similarity is usually between 0 and 1, where 1 means that the load patterns of the two candidate virtual machines are exactly the same, and the smaller the value, the less similar their operating characteristics are. The server 104 calculates the similarity between all candidate virtual machine pairs in turn and stores the results in a similarity matrix.
[0077] After calculating the similarities between all candidate virtual machines, the server 104 can enter the initialization phase of hierarchical clustering. In this phase, the server 104 can first regard each candidate virtual machine as an independent initial cluster, that is, each cluster contains only one candidate virtual machine at the beginning. Subsequently, the 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, the server 104 can update the similarity matrix because the eigenvalues of the new cluster have changed, so the server 104 can recalculate the similarity between it and other clusters and update the similarity matrix.
[0078] Next, the server 104 may 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 all virtual machines finally form a hierarchical structure containing multiple clusters. The server 104 may select a part of the multiple clusters as candidate clusters, or may select all the clusters as candidate clusters, and finally generate multiple candidate clusters.
[0079] In the above steps, the two clusters with the smallest similarity values are merged into a new cluster, which can ensure that the two most dissimilar clusters are merged each time, that is, the virtual machines with large resource differences are combined first. Since the alternative virtual machines with large differences are merged, the resources within the final cluster will be more balanced, avoiding local resource concentration. This is different from the traditional clustering method that preferentially merges data points with greater similarity, resulting in some clusters being mostly high-load virtual machines and some clusters being mostly low-load virtual machines. Therefore, by merging virtual machines with large differences, the formation of extreme clusters can be avoided, reducing the cost of scheduling and migration.
[0080] Step S206: obtaining an average eigenvalue corresponding to each candidate cluster according to the second load data.
[0081] Among them, the average characteristic value refers to the overall template, which can be understood as a comprehensive representation of the load characteristics of all virtual machines within a cluster, which can reflect the average resource usage and load distribution of multiple candidate virtual machines in the cluster. Specifically, the server 104 can traverse each candidate cluster and extract the load data of all virtual machines therein, including multiple key indicators such as CPU usage, memory occupancy, disk I / O load, network traffic, etc. For a specific cluster, the server 104 can calculate the average value of all virtual machines within it on each indicator to obtain 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 the 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 metric for subsequent migration decisions. The server 104 needs to evaluate the overall load of different clusters to determine which clusters are more balanced and which clusters may have large resource consumption differences.
[0082] Exemplarily, the server 104 can calculate the characteristic value 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 calculate the average characteristic value of the candidate cluster according to the characteristic value of each candidate virtual machine. That is, from the multiple clusters S1, S2, S3, etc. obtained by hierarchical clustering, the overall template of each cluster is calculated to measure the resource distribution and load balancing degree of each cluster. Further, the server 104 can use a norm to calculate the overall template.
[0083] The calculation of the overall template is based on two optimization goals: one is to ensure that the resource load of the system after migration is more balanced, and the other is to reduce the computing and storage losses caused by the migration process as much as possible. In order to strike a balance between these two goals, the server 104 can use the norm to measure the numerical size of the overall template. Specifically, the norm is a mathematical tool used to quantify the comprehensive difference between multiple indicators. When the norm of a cluster is small, it means that the virtual machines of the cluster are closer in each load dimension, that is, the load situation within the cluster is more balanced, and at the same time, its overall load has a higher adaptability on the target host machine, and the cost of migration is lower. Therefore, the server 104 can sort the clusters according to the norm size of the overall template, and give priority to clusters with smaller norms of the overall template to ensure that those virtual machines that are more balanced and have lower migration costs are migrated first.
[0084] Step S208 , selecting a target cluster from the multiple candidate clusters according to the average characteristic value, and using the candidate virtual machine corresponding to the target cluster as the target migration virtual machine, so as to schedule the target migration virtual machine to the target host machine.
[0085] For example, after calculating the overall template of all candidate clusters, the server 104 can select N virtual machines suitable for migration based on the value of the overall template. First, the 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, in the process of selecting candidate virtual machines, the server 104 can start selecting from the cluster with the smallest overall template, and use the candidate virtual machine corresponding to the target cluster as the target migration virtual machine to schedule the target migration virtual machine to the target host.
[0086] Furthermore, after completing the virtual machine scheduling, the server 104 can also evaluate the effects before and after the scheduling, and display the results in an appropriate manner to verify the effectiveness and optimization effect of the scheduling scheme. In order to intuitively display the scheduling effect, the server 104 can use a variety of data display methods, such as numerical comparison, trend chart, heat map or resource distribution map. For system administrators, the server 104 can provide detailed logs or reports, including the migration path of each virtual machine, resource occupancy changes, and overall scheduling optimization effect analysis. If the scheduling result does not meet expectations, the server 104 can also analyze the 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 effect of subsequent scheduling.
[0087] In the above-mentioned virtual machine scheduling method, firstly, the first load data of the target host machine and the second load data of multiple candidate virtual machines are obtained, and the first load data and the second load data are processed by the scheduling analysis model to calculate the similarity value between every two candidate virtual machines, and the multiple candidate virtual machines are clustered according to the similarity value to obtain multiple candidate clusters. Since the scheduling analysis model is constructed based on the load balancing objective function and the migration loss objective function, it can take into account the migration loss of the virtual machine while meeting the requirements of the host machine load balancing. It clusters multiple candidate virtual machines based on the comprehensive load data and migration loss data, and then obtains the average eigenvalue corresponding to each candidate cluster based on the second load data, so that the average eigenvalue is used to reflect the performance of different candidate clusters in load balancing. Finally, based on the average eigenvalue, a target cluster is selected from multiple candidate clusters, and the candidate virtual machine corresponding to the target cluster is used as the target migration virtual machine, thereby realizing the selection of a suitable target migration virtual machine based on the two selection criteria of the load balancing objective function and the migration loss objective function, so as to schedule the target migration virtual machine to the target host machine, thereby reducing the virtual machine migration cost on the basis of meeting the load balancing conditions, and realizing load balancing between multiple host machines, so as to reduce the resource pressure on a single host machine and improve the overall performance and reliability.
[0088] In an exemplary embodiment, Figure 3 As shown, step S208 includes steps S302 to S306. Among them:
[0089] Step S302: sorting multiple candidate clusters according to the average eigenvalue to obtain a migration sequence.
[0090] Exemplarily, the server 104 may sort all clusters according to the average feature value of each candidate cluster (i.e., the overall template) to determine the order of priority migration. The server 104 may traverse all candidate clusters and sort them according to the size of their average feature values. The sorting logic is based on the value of the overall template. Clusters with smaller overall templates indicate more balanced resources and lower migration costs, so the server 104 may give priority to them. The server 104 may arrange all clusters in order from small to large according to the overall template to form an ordered migration sequence, ensuring that the most appropriate set of virtual machines is processed first to achieve the best resource allocation and migration efficiency.
[0091] Step S304: Obtain the number of target migration virtual machines to be migrated.
[0092] For example, the server 104 may 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 machine. N may be determined by the load balancing strategy set by the system, the available resources of the host machine, and the constraints of the current computing environment.
[0093] Step S306: Select a target cluster according to the number of objects to be migrated and the migration sequence.
[0094] For example, the server 104 may select candidate clusters one by one according to the sorted migration sequence until the migration requirements are met. Further, when the number of candidates to be migrated is less than the number of candidate virtual machines corresponding to the target cluster, the server 104 may determine the target migration virtual machine according to the feature values of the candidate virtual machines to schedule the target migration virtual machine to the target host machine.
[0095] For example, when traversing to a certain cluster Si, the server 104 needs to determine whether the number of virtual machines in the 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 virtual machines in the cluster for migration, and update the number of remaining virtual machines to be selected N'=N-|Si|, and then continue to select from the next cluster.
[0096] Furthermore, if the number of virtual machines in the current cluster Si exceeds N, the server 104 may not directly select the entire cluster, but further evaluate the suitability of each virtual machine in the cluster. The server 104 can calculate the average value of resource balance and migration cost for each virtual machine in the cluster Si. Resource balance mainly measures whether the load characteristics of the virtual machine match the target host machine, while the migration cost involves factors such as data transmission overhead and storage access impact. The server 104 calculates these values of all candidate virtual machines in the cluster, and sorts them according to the average value, giving priority to virtual machines with better resource balance and lower migration cost, until N qualified virtual machines are selected, completing the final migration virtual machine determination process.
[0097] In the above embodiment, a hierarchical clustering algorithm is used for virtual machine scheduling. Compared with existing virtual machine scheduling schemes, such as polling scheduling, best fit scheduling, priority scheduling, load balancing scheduling, etc., the hierarchical clustering algorithm used in the above embodiment can automatically perform cluster 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, and through the method of the above embodiment, multiple dimensions of data can be considered at the same time, including CPU utilization, memory utilization, migration time, migration times, etc. Compared with other related scheduling schemes, more factors can be comprehensively considered and the load of virtual machines can be evaluated more comprehensively. When processing large-scale data, through the above embodiment, the calculation process can have higher calculation efficiency and lower time complexity, so that it can cope with complex scheduling scenarios and generate scheduling schemes in a shorter time. In addition, the hierarchical clustering algorithm used in the above embodiment has higher flexibility and scalability in the scheduling process, and can adjust parameters and features according to actual conditions, handle virtual machine clusters of different sizes and types, and can be dynamically adjusted according to changes in virtual machine loads, which enables the system to better cope with load fluctuations and changes and maintain good performance and resource utilization.
[0098] Furthermore, compared to clustering algorithms that require the specification of the number of clusters, the hierarchical clustering algorithm used in the above embodiment does not require the specification of the number of clusters in advance, and can automatically determine the hierarchical structure of 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, reducing the need for manual intervention. In addition, the hierarchical clustering algorithm used in the above embodiment does not require the preset initial cluster centers or divisions. 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 the selection of initial values in advance like clustering algorithms such as K-means. It has good adaptability and stability for different types of data, can process 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 machine and the second load data of multiple candidate virtual machines, and processes the first load data and the second load data through a scheduling analysis model, takes each candidate virtual machine as a cluster, and calculates the similarity value between each two clusters based on the first load data and the corresponding second load data.
[0100] Next, the server 104 merges the two clusters with the smallest similarity values among the multiple clusters into a new cluster, and repeats the steps of calculating the similarity values and merging the clusters based on 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 characteristic value 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 characteristic value of the candidate cluster according to the characteristic value of each candidate virtual machine. Subsequently, the server 104 sorts the multiple candidate clusters according to the average characteristic value, obtains the migration sequence, obtains the number of target migration virtual machines to be migrated, and then selects the target cluster according to the number to be migrated and the migration sequence.
[0102] Finally, the server 104 uses the alternative virtual machine corresponding to the target cluster as the target migration virtual machine to schedule the target migration virtual machine to the target host machine. When the number of virtual machines to be migrated is less than the number of alternative virtual machines corresponding to the target cluster, the server 104 determines the target migration virtual machine based on the characteristic values of the alternative virtual machines to schedule the target migration virtual machine to the target host machine.
[0103] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed 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 these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0104] Based on the same inventive concept, the embodiment of the present application also provides a virtual machine scheduling device for implementing the virtual machine scheduling method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more virtual machine scheduling device embodiments provided below can refer to the limitations of the virtual machine scheduling method above, and will not be repeated here.
[0105] In an exemplary embodiment, Figure 4As shown, 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, wherein:
[0106] A data acquisition module 402 is used to acquire first load data of a target host machine and second load data of a plurality of candidate virtual machines;
[0107] The scheduling analysis module 404 is used to process the first load data and the second load data through the scheduling analysis model, calculate the similarity value of every two candidate virtual machines, and cluster the multiple candidate virtual machines according to the similarity value to obtain multiple candidate clusters; wherein the scheduling analysis model is constructed according to the load balancing objective function and the migration loss objective function;
[0108] A data processing module 406 is used to obtain an average characteristic value corresponding to each candidate cluster according to the second load data;
[0109] The scheduling processing module 408 is used to select a target cluster from multiple candidate clusters according to the average characteristic value, and use the candidate virtual machine corresponding to the target cluster as the target migration virtual machine to schedule the target migration virtual machine to the target host machine.
[0110] In one embodiment, the scheduling analysis module 404 includes:
[0111] A numerical calculation unit, used for taking each candidate virtual machine as a cluster, and calculating a similarity value between every two clusters according to the first load data and the corresponding second load data;
[0112] A clustering unit is used to merge multiple clusters into a new cluster according to similarity values;
[0113] The iteration unit is used to repeat the steps of calculating similarity values and merging clusters according to the updated multiple clusters until a hierarchical data structure including multiple clusters is obtained, and select some or all of the clusters in the hierarchical data structure as candidate clusters; each candidate cluster includes one or more candidate virtual machines.
[0114] In one embodiment, the clustering unit is specifically used to: merge two clusters with the smallest similarity values among multiple clusters into a new cluster.
[0115] In one embodiment, the data processing module 406 is specifically used to: calculate the characteristic value 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; calculate the average characteristic value of the candidate cluster according to the characteristic value of each candidate virtual machine.
[0116] In one embodiment, the scheduling processing module 408 is specifically used to: sort multiple candidate clusters according to the average characteristic value to obtain a migration sequence; obtain the number of target migration virtual machines to be migrated; and select a target cluster according to the number to be migrated and the migration sequence.
[0117] In one embodiment, the scheduling processing module 408 is further used to: when the number of virtual machines to be migrated is less than the number of candidate virtual machines corresponding to the target cluster, determine the target migration virtual machine according to the characteristic values of the candidate virtual machines to schedule the target migration virtual machine to the target host machine.
[0118] Each module in the above-mentioned virtual machine scheduling device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0119] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to 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 machine and the virtual machine. The input / output interface of the computer device is used to exchange information between the processor and the external device. 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 may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. 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. 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 the external device. The communication interface of the computer device is used to communicate with an external terminal 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, a virtual machine scheduling method is implemented. 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, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0121] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure 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 certain components, or have a different arrangement of components.
[0122] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining first load data of a target host machine and second load data of multiple candidate virtual machines; processing the first load data and the second load data through a scheduling analysis model, calculating a similarity value between every two candidate virtual machines, and clustering the multiple candidate virtual machines according to the similarity values to obtain multiple candidate 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 candidate cluster according to the second load data; selecting a target cluster from the multiple candidate clusters according to the average eigenvalue, and using the candidate virtual machine corresponding to the target cluster as a target migration virtual machine to schedule the target migration virtual machine to the target host machine.
[0123] In one embodiment, when the processor executes the computer program, the following steps are also implemented: taking each candidate virtual machine as a cluster, calculating the similarity value between each two clusters according to the first load data and the corresponding second load data; merging multiple clusters into a new cluster according to the similarity value; repeating the steps of calculating the similarity value and merging the clusters according to the updated multiple clusters until a hierarchical data structure including multiple clusters is obtained, and selecting part or all of the clusters in the hierarchical data structure as candidate clusters; each candidate cluster includes one or more candidate virtual machines.
[0124] In one embodiment, when the processor executes the computer program, the following steps are further implemented: among the multiple clusters, two clusters with the smallest similarity values are merged into a new cluster.
[0125] In one embodiment, when the processor executes the computer program, the following steps are also implemented: according to the load balancing objective function, the migration loss objective function and the second load data, the characteristic value of each candidate virtual machine in each candidate cluster is calculated; according to the characteristic value of each candidate virtual machine, the average characteristic value of the candidate cluster is calculated.
[0126] In one embodiment, when the processor executes the computer program, the following steps are also implemented: sorting multiple candidate clusters according to the average characteristic value to obtain a migration sequence; obtaining the number of target migration virtual machines to be migrated; and selecting a target cluster according to the number to be migrated and the migration sequence.
[0127] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the number of virtual machines to be migrated is less than the number of candidate virtual machines corresponding to the target cluster, the target migration virtual machine is determined according to the characteristic values of the candidate virtual machines to schedule the target migration virtual machine to the target host machine.
[0128] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining first load data of a target host machine and second load data of multiple candidate virtual machines; processing the first load data and the second load data through a scheduling analysis model, calculating a similarity value between every two candidate virtual machines, and clustering the multiple candidate virtual machines according to the similarity values to obtain multiple candidate clusters; wherein the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function; according to the second load data, an average characteristic value corresponding to each candidate cluster is obtained; according to the average characteristic value, a target cluster is selected from the multiple candidate clusters, and the candidate virtual machine corresponding to the target cluster is used as a target migration virtual machine, so as to schedule the target migration virtual machine to the target host machine.
[0129] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: taking each candidate virtual machine as a cluster, calculating the similarity value between each two clusters according to the first load data and the corresponding second load data; merging multiple clusters into a new cluster according to the similarity value; repeating the steps of calculating the similarity value and merging the clusters according to the updated multiple clusters until a hierarchical data structure including multiple clusters is obtained, and selecting some or all of the clusters in the hierarchical data structure as candidate clusters; each candidate cluster includes one or more candidate virtual machines.
[0130] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: among the multiple clusters, two clusters with the smallest similarity values are merged into a new cluster.
[0131] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the load balancing objective function, the migration loss objective function and the second load data, the characteristic value of each candidate virtual machine in each candidate cluster is calculated; according to the characteristic value of each candidate virtual machine, the average characteristic value of the candidate cluster is calculated.
[0132] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: sorting multiple candidate clusters according to the average characteristic value to obtain a migration sequence; obtaining the number of target migration virtual machines to be migrated; and selecting a target cluster according to the number to be migrated and the migration sequence.
[0133] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the number of virtual machines to be migrated is less than the number of candidate virtual machines corresponding to the target cluster, the target migration virtual machine is determined according to the characteristic values of the candidate virtual machines to schedule the target migration virtual machine to the target host machine.
[0134] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: obtaining first load data of a target host machine and second load data of multiple candidate virtual machines; processing the first load data and the second load data through a scheduling analysis model, calculating a similarity value between every two candidate virtual machines, and clustering the multiple candidate virtual machines according to the similarity values to obtain multiple candidate clusters; wherein the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function; according to the second load data, obtaining an average eigenvalue corresponding to each candidate cluster; according to the average eigenvalue, selecting a target cluster from the multiple candidate clusters, and using the candidate virtual machine corresponding to the target cluster as a target migration virtual machine, so as to schedule the target migration virtual machine to the target host machine.
[0135] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: taking each candidate virtual machine as a cluster, calculating the similarity value between each two clusters according to the first load data and the corresponding second load data; merging multiple clusters into a new cluster according to the similarity value; repeating the steps of calculating the similarity value and merging the clusters according to the updated multiple clusters until a hierarchical data structure including multiple clusters is obtained, and selecting some or all of the clusters in the hierarchical data structure as candidate clusters; each candidate cluster includes one or more candidate virtual machines.
[0136] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: among the multiple clusters, two clusters with the smallest similarity values are merged into a new cluster.
[0137] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the load balancing objective function, the migration loss objective function and the second load data, the characteristic value of each candidate virtual machine in each candidate cluster is calculated; according to the characteristic value of each candidate virtual machine, the average characteristic value of the candidate cluster is calculated.
[0138] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: sorting multiple candidate clusters according to the average characteristic value to obtain a migration sequence; obtaining the number of target migration virtual machines to be migrated; and selecting a target cluster according to the number to be migrated and the migration sequence.
[0139] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the number of virtual machines to be migrated is less than the number of candidate virtual machines corresponding to the target cluster, the target migration virtual machine is determined according to the characteristic values of the candidate virtual machines to schedule the target migration virtual machine to the target host machine.
[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 used 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 must comply with relevant regulations.
[0141] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and 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-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. 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), magnetic 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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, they should be considered to be within the scope of this specification.
[0143] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A virtual machine scheduling method, characterized in that: The method comprises: Obtaining first load data of a target host machine and second load data of a plurality of candidate virtual machines; The first load data and the second load data are processed by a scheduling analysis model, a similarity value between every two candidate virtual machines is calculated, and a plurality of candidate virtual machines are clustered according to the similarity values to obtain a plurality of candidate clusters; wherein the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function; According to the second load data, an average characteristic value corresponding to each of the candidate clusters is obtained; According to the average characteristic value, a target cluster is selected from the multiple candidate clusters, and the candidate virtual machine corresponding to the target cluster is used as a target migration virtual machine, so as to schedule the target migration virtual machine to the target host machine.
2. The method according to claim 1, characterized in that The calculating of the similarity value between every two candidate virtual machines and clustering the plurality of candidate virtual machines according to the similarity value to obtain a plurality of candidate clusters includes: Taking each candidate virtual machine as a cluster, and calculating a similarity value between each two clusters according to the first load data and the corresponding second load data; Merging the plurality of clusters into a new cluster according to the similarity value; According to the updated multiple clusters, the steps of calculating the similarity values and merging the clusters are repeated until a hierarchical data structure including the multiple clusters is obtained, and some or all of the clusters in the hierarchical data structure are selected as candidate clusters; each candidate cluster includes one or more candidate virtual machines.
3. The method according to claim 2, characterized in that The step of merging the plurality of clusters into a new cluster according to the similarity value includes: Among the multiple clusters, two clusters with the smallest similarity values are merged into a new cluster.
4. The method according to claim 1, characterized in that: The step of obtaining an average characteristic value corresponding to each candidate cluster according to the second load data includes: Calculating a characteristic value 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; The average characteristic value of the candidate cluster is calculated according to the characteristic value of each candidate virtual machine.
5. The method according to claim 4, characterized in that The step of selecting a target cluster from the plurality of candidate clusters according to the average eigenvalue comprises: sorting the plurality of candidate clusters according to the average eigenvalue to obtain a migration sequence; Obtaining the number of target migration virtual machines to be migrated; A target cluster is selected according to the number to be migrated and the migration sequence.
6. The method according to claim 5, characterized in that The step of using the candidate virtual machine corresponding to the target cluster as a target migration virtual machine to schedule the target migration virtual machine to the target host machine includes: In the case that the number of virtual machines to be migrated is less than the number of candidate virtual machines corresponding to the target cluster, a target migration virtual machine is determined according to the feature values of the candidate virtual machines, so as to schedule the target migration virtual machine to the target host machine.
7. A virtual machine scheduling device, characterized in that: The device comprises: A data acquisition module, used to acquire first load data of a target host machine and second load data of a plurality of candidate virtual machines; 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 candidate virtual machines, and cluster a plurality of the candidate virtual machines according to the similarity value to obtain a plurality of candidate clusters; wherein the scheduling analysis model is constructed according to a load balancing objective function and a migration loss objective function; A data processing module, used for obtaining an average characteristic value corresponding to each of the candidate clusters according to the second load data; The scheduling processing module is used to select a target cluster from the multiple candidate clusters according to the average characteristic value, and use the candidate virtual machine corresponding to the target cluster as the target migration virtual machine to schedule the target migration virtual machine to the target host machine.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method for migration scheduling of multiple virtual machines
CN102968344A
Load balancing method of virtual machines, related equipment and trunking system
CN104184813A
Cloud computing resource scheduling method based on minimum relative load imbalance degree
CN104375897A
Multi-target virtual machine scheduling method and system for cloud resource management
CN110069319A
Storage server and operation method of storage server
CN117631968A