Virtual machine migration method and device, equipment and storage medium

By using a pre-trained virtual machine migration model, combined with graph attention mechanism and multimodal feature extraction, the problems of inflexible adjustment of virtual machine migration strategy and inaccurate migration targets in the existing technology are solved, and flexible migration of virtual machines and dynamic adjustment of resources are achieved.

CN119781899APending Publication Date: 2025-04-08CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411770708.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The existing technology is difficult to flexibly adjust the virtual machine migration strategy based on different business characteristics, and it is impossible to accurately determine which host the virtual machine should be migrated to.

Method used

The pre-trained virtual machine migration model is adopted to input the virtual machine data and host data into the model. The multimodal feature extraction network and the two-stage graph attention network are extracted and the target host is determined through a multimodal feature extraction network based on the graph attention mechanism.

Benefits of technology

It realizes flexible migration to suitable hosts based on the business needs and resource requirements of the virtual machine, improves the accuracy and efficiency of the migration targets, and reduces the migration cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781899A_ABST
    Figure CN119781899A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of data processing, in particular to a virtual machine migration method and device, equipment and a storage medium, and aims to accurately judge which target host machine the virtual machine should be migrated to. Inputting the virtual machine data of the to-be-migrated virtual machine and the host machine data of the plurality of host machines into a virtual machine migration model; performing feature extraction on the virtual machine data and the host machine data through a multi-modal feature extraction network in the virtual machine migration model to obtain a first fusion feature and a plurality of second fusion features; processing the first fusion feature and the plurality of second fusion features through a two-stage graph attention network in the virtual machine migration model to obtain a target host machine corresponding to the to-be-migrated virtual machine; determining whether to execute virtual machine migration operation or not through a strategy network in the virtual machine migration model; and under the condition of determining that the virtual machine migration operation is feasible, executing the virtual machine migration operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of cloud network technology, and in particular to a virtual machine migration method, apparatus, device and storage medium. Background Art

[0002] In the cloud platform, server hardware resources are virtualized into virtual machines to improve resource utilization and business elasticity. Virtual machines sometimes need to be migrated in the cloud platform. In the prior art, when migrating virtual machines, data during the operation of the virtual machines is generally collected to predict future load conditions, and then the target host for migration is determined, or corresponding migration strategies are formulated by monitoring the load conditions of the virtual machines.

[0003] The existing virtual machine migration method is difficult to flexibly adjust the migration strategy according to different business characteristics, and it is also impossible to determine the adaptability between the virtual machine and the target host machine, and it is impossible to accurately determine to which host machine the virtual machine should be migrated. Summary of the invention

[0004] The embodiments of the present application provide a virtual machine migration method, apparatus, device and storage medium, which are intended to accurately determine to which target host machine the virtual machine should migrate.

[0005] A first aspect of an embodiment of the present application provides a virtual machine migration method, the method comprising: Inputting virtual machine data of the virtual machine to be migrated and host machine data of multiple host machines into a pre-trained virtual machine migration model, wherein the virtual machine data includes first text data and first image data, and the host machine data includes second text data and second image data; Performing feature extraction on the virtual machine data and the host machine data respectively through a multimodal feature extraction network based on a graph attention mechanism in the virtual machine migration model to obtain a first fusion feature and a plurality of second fusion features; Processing the first fused feature and the plurality of second fused features through a two-stage graph attention network in the virtual machine migration model to obtain a target host machine corresponding to the virtual machine to be migrated; Determining whether to perform a virtual machine migration operation through a policy network in the virtual machine migration model; If it is determined that the virtual machine migration operation is feasible, the virtual machine migration operation is performed.

[0006] Optionally, the training step of the virtual machine migration model includes: Collecting virtual machine migration data in the cloud platform, wherein the migration data includes virtual machine data and host machine data of the virtual machine before and after migration; Preprocessing the virtual machine data and the host machine data to construct corresponding time series data; Storing the time series data corresponding to each virtual machine in the same data set to obtain a training data set; The virtual machine migration model is trained using the training data set to obtain the trained virtual machine migration model.

[0007] Optionally, the preprocessing the virtual machine data and the host machine data to construct corresponding time series data includes: Performing interpolation processing on missing values ​​in the virtual machine data and the host machine data; Deleting abnormal values ​​in the virtual machine data and the host machine data; Time alignment is performed on resources of different dimensions in the virtual machine data and the host machine data to obtain the time series data.

[0008] Optionally, training the virtual machine migration model using the training data set to obtain the trained virtual machine migration model includes: Inputting the training data set into the virtual machine migration model to obtain the target host machine corresponding to each virtual machine; Determine the performance difference of the virtual machine before and after migration to the target host machine, the performance difference including the performance improvement ratio before and after migration of the virtual machine, the performance difference between the host machine from which the virtual machine is migrated and the target host machine before and after migration of the virtual machine, the migration cost of the virtual machine migration and the network congestion loss; updating the policy network in the virtual machine migration model according to the performance difference; Determining loss values ​​of the multimodal feature extraction network and the two-stage graph attention network in the virtual machine migration model according to the similarity between the virtual machine and the target host machine; The multimodal feature extraction network and the two-stage graph attention network are updated by using the loss value to obtain the trained virtual machine migration model.

[0009] Optionally, the extracting features of the virtual machine data and the host machine data respectively through the multimodal feature extraction network based on the graph attention mechanism in the virtual machine migration model to obtain a first fusion feature and a plurality of second fusion features includes: Inputting the first text data and the second text data into a text encoder respectively to obtain a first text feature and a second text feature; Inputting the first image data and the second image data into an image encoder respectively to obtain a first image feature and a second image feature; Concatenating the first text feature with the first image feature to obtain a first multimodal feature; concatenating the second text feature with the second image feature to obtain a second multimodal feature; Graph attention calculation is performed on the first multimodal feature and the second multimodal feature respectively to obtain the first fusion feature and the second fusion feature.

[0010] Optionally, the processing of the first fused feature and the plurality of second fused features by a two-stage graph attention network in the virtual machine migration model to obtain a target host machine corresponding to the virtual machine to be migrated includes: Performing hard attention mechanism calculation on the first fusion feature and the plurality of the second fusion features through the two-stage graph attention network to determine a candidate target host machine corresponding to the virtual machine to be migrated; The first fusion feature and the second fusion feature corresponding to the candidate target host are calculated by a soft attention mechanism through the two-stage graph attention network to obtain the target host corresponding to the virtual machine to be migrated.

[0011] Optionally, determining whether to perform a virtual machine migration operation by using a policy network in the virtual machine migration model includes: Determining the migration value of the virtual machine to the target host machine through the policy network; When the migration value meets expectations, determining that the virtual machine migration operation is feasible; When the migration value does not meet expectations, it is determined that the virtual machine migration operation is not feasible.

[0012] A second aspect of an embodiment of the present application provides a virtual machine migration device, the device comprising: A data input module, used to input virtual machine data of the virtual machine to be migrated and host machine data of multiple host machines into a pre-trained virtual machine migration model, wherein the virtual machine data includes first text data and first image data, and the host machine data includes second text data and second image data; A feature extraction module, configured to extract features from the virtual machine data and the host machine data respectively through a multimodal feature extraction network based on a graph attention mechanism in the virtual machine migration model to obtain a first fused feature and a plurality of second fused features; a target host determination module, configured to process the first fusion feature and the plurality of second fusion features through a two-stage graph attention network in the virtual machine migration model to obtain a target host corresponding to the virtual machine to be migrated; An operation verification module, used to determine whether to perform a virtual machine migration operation through a policy network in the virtual machine migration model; The operation execution module is used to execute the virtual machine migration operation when it is determined that the virtual machine migration operation is feasible.

[0013] Optionally, the training step of the virtual machine migration model includes: Collecting virtual machine migration data in the cloud platform, wherein the migration data includes virtual machine data and host machine data of the virtual machine before and after migration; Preprocessing the virtual machine data and the host machine data to construct corresponding time series data; Storing the time series data corresponding to each virtual machine in the same data set to obtain a training data set; The virtual machine migration model is trained using the training data set to obtain the trained virtual machine migration model.

[0014] Optionally, the preprocessing the virtual machine data and the host machine data to construct corresponding time series data includes: Performing interpolation processing on missing values ​​in the virtual machine data and the host machine data; Deleting abnormal values ​​in the virtual machine data and the host machine data; Time alignment is performed on resources of different dimensions in the virtual machine data and the host machine data to obtain the time series data.

[0015] Optionally, training the virtual machine migration model using the training data set to obtain the trained virtual machine migration model includes: Inputting the training data set into the virtual machine migration model to obtain the target host machine corresponding to each virtual machine; Determine the performance difference of the virtual machine before and after migration to the target host machine, the performance difference including the performance improvement ratio before and after migration of the virtual machine, the performance difference between the host machine from which the virtual machine is migrated and the target host machine before and after migration of the virtual machine, the migration cost of the virtual machine migration, and the network congestion loss; updating the policy network in the virtual machine migration model according to the performance difference; Determining loss values ​​of the multimodal feature extraction network and the two-stage graph attention network in the virtual machine migration model according to the similarity between the virtual machine and the target host machine; The multimodal feature extraction network and the two-stage graph attention network are updated by using the loss value to obtain the trained virtual machine migration model.

[0016] Optionally, the feature extraction module includes: A text feature acquisition submodule, used for inputting the first text data and the second text data into a text encoder respectively to obtain a first text feature and a second text feature; An image feature acquisition submodule, used to input the first image data and the second image data into an image encoder respectively to obtain a first image feature and a second image feature; A first multimodal feature acquisition submodule, used for concatenating the first text feature with the first image feature to obtain a first multimodal feature; A second multimodal feature acquisition submodule, used for concatenating the second text feature with the second image feature to obtain a second multimodal feature; The fusion feature acquisition submodule is used to perform graph attention calculation on the first multimodal feature and the second multimodal feature respectively to obtain the first fusion feature and the second fusion feature.

[0017] Optionally, the target host determination module includes: A first host determination submodule, configured to perform hard attention mechanism calculation on the first fusion feature and the plurality of second fusion features through the two-stage graph attention network to determine a candidate target host corresponding to the virtual machine to be migrated; The second host determination submodule is used to perform a soft attention mechanism calculation on the first fusion feature and the second fusion feature corresponding to the candidate target host through the two-stage graph attention network to obtain the target host corresponding to the virtual machine to be migrated.

[0018] Optionally, the operation verification module includes: A migration value determination submodule, used to determine the migration value of migrating the virtual machine to the target host machine through the policy network; A first determination submodule is used to determine that the virtual machine migration operation is feasible when the migration value meets expectations; The second determining submodule is used to determine that the virtual machine migration operation is not feasible when the migration value does not meet expectations.

[0019] A third aspect of an embodiment of the present application provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the method described in the first aspect of the present application are implemented.

[0020] A fourth aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in the first aspect of the present application are implemented.

[0021] Using the virtual machine migration method provided by the present application, the virtual machine data of the virtual machine to be migrated and the host machine data of multiple host machines are input into a pre-trained virtual machine migration model, the virtual machine data includes first text data and first image data, and the host machine data includes second text data and second image data; the virtual machine data and the host machine data are respectively extracted by a multimodal feature extraction network based on a graph attention mechanism in the virtual machine migration model to obtain a first fusion feature and multiple second fusion features; the first fusion feature and the multiple second fusion features are processed by a two-stage graph attention network in the virtual machine migration model to obtain a target host machine corresponding to the virtual machine to be migrated; whether to perform a virtual machine migration operation is determined by a policy network in the virtual machine migration model; and when it is determined that the virtual machine migration operation is feasible, the virtual machine migration operation is performed.

[0022] In this method, a virtual machine migration model is established, and the target host of the virtual machine to be migrated is determined according to the virtual machine data and the host host. The multimodal feature extraction network is used to extract multimodal features of the data, and the dynamic calculation of the migration features is realized. The fusion features are calculated by graph attention through a two-stage graph attention network to determine the target host. Then, it is determined whether the target host is suitable for migration according to the policy network, thereby realizing the flexible migration of the virtual machine to the corresponding host according to the business needs and resource requirements of the virtual machine, quickly determining the migration target of the virtual machine, realizing the dynamic adjustment of resources on the cloud platform, and reducing the migration cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be 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 any creative labor.

[0024] Figure 1 is a training diagram of a virtual machine migration model proposed in an embodiment of the present application; Figure 2 It is a schematic diagram of the training process of the virtual machine migration model proposed in one embodiment of the present application; Figure 3 is a flow chart of a virtual machine migration method proposed in one embodiment of the present application; Figure 4 It is a multimodal feature extraction model based on a graph attention mechanism proposed in an embodiment of the present application; Figure 5 It is a schematic diagram of a two-stage graph attention network structure proposed in an embodiment of the present application; Figure 6 It is an overall flow chart of a virtual machine migration method based on a graph attention mechanism proposed in one embodiment of the present application; Figure 7 is a schematic diagram of a virtual machine migration target selection process proposed in an embodiment of the present application; Figure 8 Schematic diagram of a virtual machine migration device proposed in an embodiment of the present application Fig. 9 It is a schematic diagram of an electronic device proposed in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0026] In the related technologies, cloud computing platform, as an advanced resource management mode, provides users with a more flexible and scalable resource management mode. By virtualizing physical server hardware resources into virtual machines, it improves resource utilization efficiency and business elasticity. However, with the expansion of the scale of cloud computing platforms, the demand for resource management and optimization has become more urgent, and virtual machine migration has become a key requirement in cloud computing environments. Virtual machine migration can migrate virtual machines from one physical server to another without interrupting business, thereby recovering virtual machines that have service anomalies due to server overload or failure, providing strong support for dynamic resource adjustment. However, how to calculate the features that guide virtual machine migration and how to select the migration target of virtual machines have brought great challenges to the implementation of virtual machine migration.

[0027] Existing virtual machine migration methods mainly collect load data during the operation of virtual machines, predict future load conditions, and guide migration according to predefined rules. However, the inaccuracy of prediction will affect the quality of migration; or formulate migration strategies by monitoring the load conditions of virtual machines, which requires long-term real-time monitoring of the status of all virtual machines, bringing additional system overhead.

[0028] Most existing virtual machine migration methods collect resource loads during virtual machine operation, such as CPU, memory, network bandwidth and other load data, and calculate features for migration through simple combinations. The features are relatively simple and it is difficult to flexibly and automatically generate different features for the characteristics of different businesses such as computing, IO, memory intensive, and network communication. It is also difficult to flexibly adjust according to the business type and specific needs of the virtual machine.

[0029] When selecting a migration target, existing virtual machine migration methods usually adopt the method of selecting a target by asking all physical machines in turn, or filtering candidate targets according to certain indicators or rules, which is costly. In addition, most current methods select the physical machine with the best performance as the migration target, and rarely consider the adaptability between the virtual machine and the migration target, such as computing business virtual machines are suitable for migration to computing physical machines. Less consideration of the similarity relationship between virtual machines and physical machines (adaptability of features) can improve stability after migration and even improve performance.

[0030] The embodiment of the present application is implemented based on a virtual machine migration model. In one embodiment proposed in the present application, the training step of the virtual machine migration model includes: S11: Collecting virtual machine migration data in the cloud platform, where the migration data includes virtual machine data before and after the migration of the virtual machine and host machine data.

[0031] In this embodiment, the virtual machine data and host machine data include text data and image data. The text data includes computing resource text data (such as CPU utilization, number of CPU cores, total memory, memory utilization), network resource text data (such as network bandwidth, peak and valley values ​​of uplink and downlink traffic), and storage resource text data (such as total storage of the virtual machine, storage usage, and IO load). The image data includes curve graphs of load changes such as CPU, memory, and network traffic.

[0032] In this embodiment, historical data of virtual machine migration in the cloud computing platform is collected, including but not limited to migration data under the guidance of expert rules and statistical learning methods. Logs or monitoring tools are used to collect virtual machine migration data in the cloud platform. The migration data includes virtual machine data and host machine data before and after the migration.

[0033] S12: Preprocess the virtual machine data and the host machine data to construct corresponding time series data.

[0034] In this embodiment, the large amount of collected data needs to be processed before it can be used as training data. The specific steps include: S12-1: performing interpolation processing on missing values ​​in the virtual machine data and the host machine data.

[0035] In this embodiment, there may be missing values ​​in the virtual machine data and the host machine data, and interpolation processing is performed on the missing values ​​in the virtual machine data and the host machine data to fill in possible values ​​according to the rules of the data.

[0036] S12-2: Deleting abnormal values ​​in the virtual machine data and the host machine data.

[0037] In this embodiment, there may be abnormal values ​​in the virtual machine data and the host machine data, and the abnormal values ​​are deleted.

[0038] S12-3: Time-align different dimensional resources in the virtual machine data and the host machine data to obtain the time series data.

[0039] In this embodiment, text modality data and image modality data from different dimensional resources such as computing resources, network resources, and storage resources are time-aligned to construct time series data, that is, data arranged in chronological order.

[0040] S13: Storing the time series data corresponding to each virtual machine into the same data set to obtain a training data set.

[0041] In this embodiment, high-quality virtual machine migration data is obtained through the collection and preprocessing of the above data. A data sample of each virtual machine in a time series is constructed according to the data collection time, that is, each data contains the current computing resource information, network resource information, storage resource information and other numerical information and load change trend of the virtual machine within a period of time, and the constructed time series data are placed in the same data set to obtain a training data set.

[0042] S14: Training the virtual machine migration model using the training data set to obtain the trained virtual machine migration model.

[0043] refer to Figure 1 , Figure 1 is a training diagram of a virtual machine migration model proposed in an embodiment of the present application, such as Figure 1 As shown in the figure, reinforcement learning is used as the basic model to construct a virtual machine migration model, and a multimodal feature extraction model based on a graph attention mechanism and a migration target selection model based on a two-stage graph attention mechanism are embedded in it. First, the virtual machine data information and the host data information are input into the multimodal feature extraction model, and the multimodal feature extraction model is input into the two-stage graph attention model and the policy network respectively. The migration target is determined by the two-stage graph attention model, and then the migration action is executed through the policy network, the corresponding reward is calculated, and iterative training is performed until a trained virtual machine migration model is obtained.

[0044] In this embodiment, the specific steps of training the virtual machine migration model by using the training data set to obtain the trained virtual machine migration model include: S14-1: Input the training data set into the virtual machine migration model to obtain the target host machine corresponding to each virtual machine.

[0045] In this embodiment, the training data set is input into the virtual machine migration model, and the virtual machine migration model extracts fusion features of the data in the data set to obtain the fusion features of the virtual machine to be migrated and the fusion features of the host machine, and then uses the two-stage attention mechanism for calculation to finally obtain the corresponding target host machine.

[0046] S14-2: Determine the performance difference before and after the virtual machine migrates to the target host machine, the performance difference includes the performance improvement ratio before and after the virtual machine migration, the performance difference between the host machine from which the virtual machine migrated and the target host machine before and after the virtual machine migration, the migration cost of the virtual machine migration and the network congestion loss.

[0047] In this embodiment, the performance difference of the virtual machine before and after migration to the target host machine can reflect the impact of the virtual machine migration on the original host machine and the target host machine, thereby determining whether the virtual machine is suitable for migration to the target host machine.

[0048] S14-3: updating the policy network in the virtual machine migration model according to the performance difference.

[0049] In this embodiment, the policy network in the virtual machine migration model is used to decide whether to migrate the virtual machine. The policy network is updated based on the performance difference after the migration, so that the trained policy network can better decide whether to perform the virtual machine migration task.

[0050] S14-4: Determine the loss values ​​of the multimodal feature extraction network and the two-stage graph attention network in the virtual machine migration model based on the similarity between the virtual machine and the target host machine.

[0051] In this embodiment, the similarity between the virtual machine and the target host machine is used as the loss value of the multimodal feature extraction network and the two-stage graph attention network in the virtual machine migration model.

[0052] S14-5: The multimodal feature extraction network and the two-stage graph attention network are updated using the loss value to obtain the trained virtual machine migration model.

[0053] For the virtual machine migration task, consider the performance difference before and after the virtual machine migration, the performance difference of the host machine, and the network congestion to design the reward for virtual machine migration. : (1) in, is the coefficient. is the performance improvement ratio before and after virtual machine migration. The comprehensive performance difference between the host machine migrated out and the host machine migrated into before and after the virtual machine migration. The predefined migration cost and network congestion loss are used. Then, the policy network is updated based on the reward calculation loss through reinforcement learning training.

[0054] For the two-stage graph attention model, considering that the virtual machine to be migrated is expected to be migrated to the host machine that best matches the resource dimension mode such as computing, network, and storage, we use Divergence constructs the loss function of the two-stage graph attention model and feature extraction model. First, use The negative value of the divergence is normalized to calculate the similarity between the fusion features of the virtual machine to be migrated and each host machine. , the higher the similarity, The smaller the divergence value, Bigger:

[0055] in, For the virtual machine to be migrated With host The similarity is used as a label, and the mean square error is used to calculate the loss function of the two-stage attention network. The calculation formula is as follows:

[0056] In this embodiment, the corresponding loss value is obtained through the above loss function, and then the parameters of the multimodal feature extraction network and the two-stage graph attention network are adjusted to finally obtain a trained virtual machine migration model. When the above training process is completed, a trained feature extraction model, a migration target selection model based on the two-stage graph attention mechanism, and a virtual machine migration strategy training model based on reinforcement learning will be obtained. In the actual cloud computing platform, the above model is applied to extract features, select migration targets, and finally complete the virtual machine migration task.

[0057] refer to Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a training process of a virtual machine migration model proposed in an embodiment of the present application. Figure 2 As shown, the training process includes: (1) Virtual machine migration data collection: Collect historical data on virtual machine migration in the cloud computing platform from logs and sensor virtual machine management systems. Use virtual machine and host monitoring tools to obtain text and image data on computing resource utilization such as CPU utilization and memory utilization; use network traffic monitoring tools and logs to obtain text and image data on network resources; use storage device monitoring tools and operating system commands to obtain text and image data on storage usage; collect virtual machine performance, power consumption, load and other indicators.

[0058] (2) Data preprocessing: Detect and process possible missing values ​​and outliers, using interpolation, deletion, or statistical methods. Time-align text and image data from different resource dimensions such as computing resources, network resources, and storage resources to construct time series information.

[0059] (3) Constructing a training experience pool: Construct data samples for each virtual machine in a time series based on the data collection time. That is, each piece of data contains the numerical information and change trend of the virtual machine’s current computing resource information, network resource information, storage resource information, and performance information over a period of time.

[0060] (4) Initialization process: Initialize the network parameters of the multimodal feature extraction model based on the graph attention mechanism, the migration target selection model based on the two-stage graph attention mechanism, and the virtual machine migration method training model based on reinforcement learning.

[0061] (5) Training cycle process of virtual machine migration method: (5.1) Sample extraction: Randomly extract historical samples of the virtual machine migration process from the training experience pool.

[0062] (5.2) Feature extraction: Input the original data of the virtual machine and host machine’s computing network storage and other resource dimensions, and use the multimodal feature extraction model based on the graph attention mechanism to extract the fusion features of the virtual machine / host machine.

[0063] (5.3) Migration target selection: The migration target selection model based on the two-stage graph attention mechanism calculates the virtual machine's attention to other host machines and selects the migration target according to the greedy algorithm.

[0064] (5.4) Estimate action value: Calculate the value of the selected transfer action based on the reinforcement learning network.

[0065] (5.5) Select action and execute: Execute the virtual machine migration action based on the estimated action value and migration target. (5.6) Calculate rewards and next state: Calculate rewards according to the reward calculation formula, obtain the next state and store it in the experience pool.

[0066] (6.7) Model update: Calculate the model error according to the designed loss function, and use the gradient descent method to reversely update the network parameters of the above model.

[0067] When the loop condition is not met, that is, when the loop reaches a preset number of training times or a preset indicator, a virtual machine migration method that performs well in the cloud computing platform and can autonomously select the migration target can be obtained, and can be further applied to the actual cloud computing platform.

[0068] refer to Figure 3 , Figure 3 1 is a flow chart of a virtual machine migration method proposed in one embodiment of the present application. Figure 3 As shown, the method comprises the following steps: S21: inputting virtual machine data of the virtual machine to be migrated and host machine data of multiple host machines into a pre-trained virtual machine migration model, wherein the virtual machine data includes first text data and first image data, and the host machine data includes second text data and second image data.

[0069] In this embodiment, the virtual machine to be migrated is a virtual machine that needs to be migrated, and the virtual machine data includes the first text data and the first image data of the virtual machine during operation, such as the computing resource data, network resource data and storage resource data of the virtual machine. The host machine data includes the second text data and the second image data corresponding to the host machine, including the computing resource data, network resource data and storage resource data of the host machine.

[0070] In this embodiment, the virtual machine data of the virtual machine to be migrated and the host machine data of multiple host machines are input into a pre-trained virtual machine migration model. After receiving the virtual machine data and the host machine data, the virtual machine migration model starts to perform data analysis.

[0071] S22: Perform feature extraction on the virtual machine data and the host machine data respectively through a multimodal feature extraction network based on a graph attention mechanism in the virtual machine migration model to obtain a first fusion feature and multiple second fusion features.

[0072] In this embodiment, the cross-modal feature extraction network based on the graph attention mechanism is a graph neural network, in which the virtual machine and the host machine are regarded as points in the graph, and the relationship between the virtual machine and the host machine is regarded as an edge.

[0073] In this embodiment, feature extraction is performed on virtual machine data and host data respectively through a multimodal feature extraction network based on a graph attention mechanism in a virtual machine migration model to obtain a first fusion feature and a second fusion feature. The first fusion feature is a virtual machine fusion feature, and the second fusion feature is a host fusion feature.

[0074] In this embodiment, the virtual machine data and the host machine data are respectively subjected to feature extraction by a multimodal feature extraction network based on a graph attention mechanism in the virtual machine migration model to obtain a first fusion feature and a plurality of second fusion features. The specific steps include: S22-1: Input the first text data and the second text data into a text encoder respectively to obtain a first text feature and a second text feature.

[0075] In this embodiment, the first text data and the second text data are respectively input into a text encoder for text encoding to obtain a first text feature and a second text feature.

[0076] S22-2: Input the first image data and the second image data into an image encoder respectively to obtain a first image feature and a second image feature.

[0077] In this embodiment, the first image data and the second image data are respectively input into an image encoder for image encoding to obtain a first image feature and a second image feature.

[0078] S22-3: Concatenate the first text feature and the first image feature to obtain a first multimodal feature.

[0079] In this embodiment, the first text feature and the first image feature are concatenated to obtain a first multimodal feature, that is, a multimodal feature of the virtual machine.

[0080] S22-4: Concatenate the second text feature and the second image feature to obtain a second multimodal feature.

[0081] In this embodiment, the second text feature and the second image feature are concatenated to obtain a second multimodal feature, that is, a multimodal feature of the host machine.

[0082] S22-5: Perform graph attention calculation on the first multimodal feature and the second multimodal feature respectively to obtain the first fusion feature and the second fusion feature.

[0083] In this embodiment, graph attention calculation is performed on the first multimodal feature and the plurality of second multimodal features respectively to obtain a first fusion feature and a second fusion feature.

[0084] In this embodiment, a multimodal learning method is used to learn and understand the association between text and image modal data in each resource dimension (computing, network, storage, etc.), where text data mainly focuses on the quantitative analysis of the virtual machine status and virtual machine load characteristics at the current moment, while image data mainly focuses on the changing trend of virtual machine resource usage and the qualitative analysis of virtual machine load characteristics, combining the two modalities to more accurately characterize the features used for virtual machine migration. The graph attention mechanism is further used to adaptively learn the key resources required by the virtual machine, increase the attention weight of the features of the key resources, calculate the fused features, and realize the adaptive change of the features used for virtual machine migration as the virtual machine business changes.

[0085] refer to Figure 4 , Figure 4 is a multimodal feature extraction model based on a graph attention mechanism proposed in an embodiment of the present application, such as Figure 4 As shown in the figure, in this model, the model input is the text and image data of computing resource information, network resource information, and storage resource information, and the output is the fusion feature after multimodal learning. The parameters that need to be initialized in this model are the text encoder of different dimensional data, the image encoder, the multimodal feature learning model, and the graph attention network parameters.

[0086] In this embodiment, before obtaining the virtual machine migration target, feature fusion extraction is performed on the input multi-dimensional multi-modal data information to guide the selection of the migration target. resource dimensions, input the text data and image data of each resource dimension into the corresponding encoder to obtain text features and image features , after splicing, input the multimodal learning model and output the multimodal features under the resource dimension The process is as follows: (4) Each resource dimension is abstracted as a point in the graph, and its multimodal features As node features, each node Apply the graph attention mechanism, calculate the attention weight, obtain the features of other nodes to obtain the fusion features. The calculation formula is: (5)

[0087] in, is the learning parameter, yes Activation function, yes Activation function, are the graph attention network parameters, and They are the normalized nodes before and after For Node 's attention value.

[0088] The following formula is designed to use attention weights to weight the features of different nodes and obtain the fusion feature .

[0089]

[0090] The fusion feature calculates the feature ratios from different resource dimensions by weighted calculation, and generates features with different resource preferences for different business virtual machines, which can guide the virtual machine to migrate to the host machine with its preferred resource attributes.

[0091] S23: Processing the first fusion feature and the multiple second fusion features through the two-stage graph attention network in the virtual machine migration model to obtain a target host machine corresponding to the virtual machine to be migrated.

[0092] In this embodiment, the first fusion feature (fusion feature of the virtual machine to be migrated) and multiple second fusion features (fusion features of the host machine) are processed through the two-stage graph attention network in the virtual machine migration model to obtain the target host machine corresponding to the virtual machine to be migrated.

[0093] refer to Figure 5 , Figure 5 is a schematic diagram of a two-stage graph attention network structure proposed in an embodiment of the present application, such as Figure 5 As shown in the figure, the virtual machines to be migrated and other host machines in the cloud computing platform are abstracted into a fully connected relationship graph, and the graph is defined as a virtual machine migration relationship graph. Among them, the fusion features of the virtual machines to be migrated and the host machines are defined as nodes in the virtual machine migration relationship graph, and the edges in the virtual machine migration relationship graph indicate that there is a potential virtual machine migration relationship between the two connected machines. The fusion features of the virtual machines to be migrated and the fusion features of other host machines are input into the two-stage graph attention mechanism. First, the hard attention mechanism outputs the hard attention value (whose value is 0 or 1), where 0 indicates that the virtual machine to be migrated will not migrate to the host machine, and 1 indicates that the virtual machine to be migrated may migrate to the host machine. Secondly, the soft attention mechanism outputs the soft attention value (whose value is between 0 and 1), where the host machine with the largest attention value is the migration target.

[0094] In this embodiment, the specific steps of processing the first fusion feature and the plurality of second fusion features through the two-stage graph attention network in the virtual machine migration model to obtain the target host machine corresponding to the virtual machine to be migrated include: S23-1: Perform hard attention mechanism calculation on the first fusion feature and multiple second fusion features through the two-stage graph attention network to determine the candidate target host machine corresponding to the virtual machine to be migrated.

[0095] In this embodiment, the hard attention mechanism is an attention mechanism in deep learning, which is opposite to the soft attention mechanism. When processing information, the hard attention mechanism selects only the most relevant information from the stored multiple information, usually the word vector with the highest probability, and ignores other information.

[0096] In this embodiment, a hard attention mechanism is firstly calculated on the first fusion feature and multiple second fusion features through a two-stage graph attention network to determine the second fusion feature corresponding to the first fusion feature, that is, to determine the candidate target host machine corresponding to the virtual machine to be migrated.

[0097] S23-2: Perform soft attention mechanism calculation on the first fusion feature and the second fusion feature corresponding to the candidate target host through the two-stage graph attention network to obtain the target host corresponding to the virtual machine to be migrated.

[0098] In this embodiment, when the soft attention mechanism is training the model, although the weights of the words are different, each word will be used, and the weight of the focus word is larger. The soft attention mechanism allows the model to pay attention to multiple information and optimize the model performance by adjusting the weights.

[0099] In this embodiment, the first fusion feature and the second fusion feature corresponding to the candidate target host are calculated through the soft attention mechanism to obtain the target host corresponding to the virtual machine to be migrated.

[0100] In this embodiment, a two-stage graph attention mechanism is constructed using a key-value pair query method, and a hard attention mechanism is initialized. The network weights of , the query vector of the soft attention mechanism and key-value vector .

[0101] In this embodiment, the fusion features of the virtual machine to be migrated for migration are calculated by a multimodal feature extraction model based on the graph attention mechanism. , and simultaneously calculate the fusion features of all possible hosts that may be the migration target in the cloud computing platform , and and Enter the two-stage graph attention network. First, calculate the hard attention value between the virtual machine to be migrated and all migration target hosts. The calculation formula is as follows:

[0102] in, Indicates the virtual machine to be migrated to the migration target host The hard attention value of is a long short-term memory network, is the fully connected layer, is the temperature coefficient, for Noise. The original hard attention output is 0 or 1, which makes direct sampling unable to perform end-to-end back-propagation learning. After noise, normalization is performed to calculate the approximate random samples to solve the problem that the gradient cannot be back-propagated.

[0103] When the hard attention is 0, migration to the host is not considered. When the hard attention is 1, the host is added to the candidate target set. After the hard attention mechanism is screened, the range of target hosts is reduced, and then the soft attention of the virtual machine to be migrated and the host in the candidate target set is calculated. and Enter the soft attention mechanism network and calculate the attention using the following formula: (9) in, represents the soft attention value of the virtual machine to be migrated to the host in the candidate target set, Candidate target host Fusion Features The transpose of . The larger the value, the greater the chance of becoming a migration target. The final attention value is calculated by the following formula: : (10) based on Select the host migration target, where The larger the value, the more similar the computing, network, storage and other resource dimensions of the virtual machine are to the host machine. Therefore, it should be migrated to In order to increase the exploratory nature of the virtual machine migration strategy, we use The greedy method selects the migration target, and the virtual machine is The probability of choosing The largest host is used as the migration target, The probability of randomly selecting a host in the candidate target set as the migration target.

[0104] S24: Determine whether to perform a virtual machine migration operation through the policy network in the virtual machine migration model.

[0105] In this embodiment, the policy network is used to decide whether to execute the virtual machine migration task.

[0106] In this embodiment, whether a virtual machine is suitable for migration to a target host machine is determined by using a policy network in a virtual machine migration model. The specific steps include: S24-1: Determine the migration value of migrating the virtual machine to the target host machine through the policy network.

[0107] In this embodiment, the migration value refers to the degree of impact of the migration of the virtual machine to the target host machine on the performance of the virtual machine and the performance of the target host machine.

[0108] In this embodiment, the policy network learns the impact of migrating a virtual machine to a target host on the performance of the virtual machine and the target host based on the virtual machine migration data during training. In actual use, the corresponding migration value can be predicted based on the virtual machine data and the target host data.

[0109] S24-2: When the migration value meets expectations, determine that the virtual machine migration operation is feasible.

[0110] In this embodiment, when the migration value meets expectations, for example, the migration value is positive, it means that the migration of the virtual machine to the host machine will not affect the performance of the target host machine or the performance of the virtual machine. At this time, it is determined that the virtual machine is suitable for migration to the target host machine.

[0111] S24-3: If the migration value does not meet expectations, determine that the virtual machine migration operation is not feasible.

[0112] In this embodiment, if the migration value does not meet expectations, for example, the migration value is negative, it means that the migration of the virtual machine to the host machine will affect the performance of the target host machine and the performance of the virtual machine. At this time, it is determined that the virtual machine is not suitable for migration to the target host machine.

[0113] S25: When it is determined that the virtual machine migration operation is feasible, perform the virtual machine migration operation.

[0114] In this embodiment, when it is determined that the virtual machine is suitable for migration to the target host machine, a virtual machine migration task is executed to migrate the virtual machine to be migrated to the target virtual machine.

[0115] refer to Figure 6 , Figure 6 is an overall flow chart of a virtual machine migration method based on a graph attention mechanism proposed in an embodiment of the present application, such as Figure 6 As shown, firstly, the training data is collected and processed, then the virtual machine migration features are extracted, then the virtual machine migration target is selected, and then the virtual machine migration and training are executed.

[0116] refer to Figure 7 , Figure 7FIG. 1 is a schematic diagram of a virtual machine migration target selection process proposed in an embodiment of the present application. Figure 7 As shown, there is a virtual machine to be migrated , 4 other migratable hosts ( ) cloud computing platform as an example, showing the virtual machines to be migrated Select the target host for migration The process of , where h represents the feature vector. The host and virtual machine obtain text and image information of virtual machine resources through logs, monitoring programs and sensors. The "square" represents the virtual machine to be migrated, the "circle" represents other hosts that may be the migration target, and the "solid line" represents the attention weight of the virtual machine to be migrated to other hosts. The thickness of the "solid line" represents the size of the attention. The thicker the line, the greater the attention value.

[0117] In the above embodiment of the present application, a multimodal feature extraction model based on a graph attention mechanism is designed, which can autonomously calculate the fusion migration features that can express the resource preferences of the virtual machine according to the business changes of the virtual machine, improve the flexibility and adaptability of the migration features in the process of virtual machine migration, and solve the problem that the traditional rules and empirical methods can only handle the migration of specific business virtual machines. A migration target selection model based on a two-stage graph attention mechanism is also designed. When selecting the migration target, the similarity between the resource mode of the virtual machine and the host machine is taken into account, and the virtual machine is migrated to the host machine that best meets its resource preferences, thereby improving the adaptability and performance of the virtual machine after migration. At the same time, unnecessary hosts are simplified through a hard attention mechanism, reducing the computational cost. A reward function based on attributes such as changes in property indicators before and after virtual machine migration is designed, and a loss function for graph neural network training is designed in combination with JS divergence, which improves the training effect of the model and effectively guides the model to learn how to find the most suitable migration target. This improves the efficiency of virtual machine migration in the cloud platform.

[0118] Based on the same inventive concept, an embodiment of the present application provides a virtual machine migration device. Figure 8 , Figure 8 FIG. 8 is a schematic diagram of a virtual machine migration device 800 proposed in an embodiment of the present application. Figure 8 As shown, the device comprises: A data input module 801, used to input virtual machine data of a virtual machine to be migrated and host machine data of multiple host machines into a pre-trained virtual machine migration model, wherein the virtual machine data includes first text data and first image data, and the host machine data includes second text data and second image data; A feature extraction module 802 is used to extract features from the virtual machine data and the host machine data respectively through a multimodal feature extraction network based on a graph attention mechanism in the virtual machine migration model to obtain a first fused feature and a plurality of second fused features; A target host determination module 803 is used to process the first fusion feature and the plurality of second fusion features through a two-stage graph attention network in the virtual machine migration model to obtain a target host corresponding to the virtual machine to be migrated; An operation verification module 804 is used to determine whether to perform a virtual machine migration operation through a policy network in the virtual machine migration model; The operation execution module 805 is used to execute the virtual machine migration operation when it is determined that the virtual machine migration operation is feasible.

[0119] Optionally, the training step of the virtual machine migration model includes: Collecting virtual machine migration data in the cloud platform, wherein the migration data includes virtual machine data and host machine data of the virtual machine before and after migration; Preprocessing the virtual machine data and the host machine data to construct corresponding time series data; Storing the time series data corresponding to each virtual machine in the same data set to obtain a training data set; The virtual machine migration model is trained using the training data set to obtain the trained virtual machine migration model.

[0120] Optionally, the preprocessing the virtual machine data and the host machine data to construct corresponding time series data includes: Performing interpolation processing on missing values ​​in the virtual machine data and the host machine data; Deleting abnormal values ​​in the virtual machine data and the host machine data; Time alignment is performed on resources of different dimensions in the virtual machine data and the host machine data to obtain the time series data.

[0121] Optionally, training the virtual machine migration model using the training data set to obtain the trained virtual machine migration model includes: Inputting the training data set into the virtual machine migration model to obtain the target host machine corresponding to each virtual machine; Determine the performance difference of the virtual machine before and after migration to the target host machine, the performance difference including the performance improvement ratio before and after migration of the virtual machine, the performance difference between the host machine from which the virtual machine is migrated and the target host machine before and after migration of the virtual machine, the migration cost of the virtual machine migration, and the network congestion loss; updating the policy network in the virtual machine migration model according to the performance difference; Determining loss values ​​of the multimodal feature extraction network and the two-stage graph attention network in the virtual machine migration model according to the similarity between the virtual machine and the target host machine; The multimodal feature extraction network and the two-stage graph attention network are updated by using the loss value to obtain the trained virtual machine migration model.

[0122] Optionally, the feature extraction module includes: A text feature acquisition submodule, used for inputting the first text data and the second text data into a text encoder respectively to obtain a first text feature and a second text feature; An image feature acquisition submodule, used to input the first image data and the second image data into an image encoder respectively to obtain a first image feature and a second image feature; A first multimodal feature acquisition submodule, used for concatenating the first text feature with the first image feature to obtain a first multimodal feature; A second multimodal feature acquisition submodule, used for concatenating the second text feature with the second image feature to obtain a second multimodal feature; The fusion feature acquisition submodule is used to perform graph attention calculation on the first multimodal feature and the second multimodal feature respectively to obtain the first fusion feature and the second fusion feature.

[0123] Optionally, the target host determination module includes: A first host determination submodule, configured to perform hard attention mechanism calculation on the first fusion feature and the plurality of the second fusion features through the two-stage graph attention network, to determine a candidate target host corresponding to the virtual machine to be migrated; The second host determination submodule is used to perform soft attention mechanism calculation on the first fusion feature and the second fusion feature corresponding to the candidate target host through the two-stage graph attention network to obtain the target host corresponding to the virtual machine to be migrated.

[0124] Optionally, the operation verification module includes: A migration value determination submodule, used to determine the migration value of migrating the virtual machine to the target host machine through the policy network; A first determination submodule is used to determine that the virtual machine migration operation is feasible when the migration value meets expectations; The second determining submodule is used to determine that the virtual machine migration operation is not feasible when the migration value does not meet expectations.

[0125] Based on the same inventive concept, another embodiment of the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the virtual machine migration method as described in any of the above embodiments of the present application.

[0126] Based on the same inventive concept, another embodiment of the present application provides an electronic device, Fig. 9 It is a schematic diagram of an electronic device 900 proposed in one embodiment of the present application, including a memory 902, a processor 901 and a computer program stored in the memory and executable on the processor, and when the processor is executed, the steps in the virtual machine migration method described in any of the above embodiments of the present application are implemented.

[0127] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0128] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0129] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0130] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0131] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0133] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0134] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0135] The virtual machine migration method, device, equipment and storage medium provided by the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A virtual machine migration method, characterized in that: The method comprises: Inputting virtual machine data of the virtual machine to be migrated and host machine data of multiple host machines into a pre-trained virtual machine migration model, wherein the virtual machine data includes first text data and first image data, and the host machine data includes second text data and second image data; Performing feature extraction on the virtual machine data and the host machine data respectively through a multimodal feature extraction network based on a graph attention mechanism in the virtual machine migration model to obtain a first fusion feature and a plurality of second fusion features; Processing the first fused feature and the plurality of second fused features through a two-stage graph attention network in the virtual machine migration model to obtain a target host machine corresponding to the virtual machine to be migrated; Determining whether to perform a virtual machine migration operation through a policy network in the virtual machine migration model; If it is determined that the virtual machine migration operation is feasible, the virtual machine migration operation is performed.

2. The virtual machine migration method according to claim 1, characterized in that: The training steps of the virtual machine migration model include: Collecting virtual machine migration data in the cloud platform, wherein the migration data includes virtual machine data and host machine data of the virtual machine before and after migration; Preprocessing the virtual machine data and the host machine data to construct corresponding time series data; Storing the time series data corresponding to each virtual machine in the same data set to obtain a training data set; The virtual machine migration model is trained using the training data set to obtain the trained virtual machine migration model.

3. The virtual machine migration method according to claim 2, characterized in that: The preprocessing of the virtual machine data and the host machine data to construct corresponding time series data includes: Performing interpolation processing on missing values ​​in the virtual machine data and the host machine data; Deleting abnormal values ​​in the virtual machine data and the host machine data; Time alignment is performed on resources of different dimensions in the virtual machine data and the host machine data to obtain the time series data.

4. The virtual machine migration method according to claim 2, characterized in that: The virtual machine migration model is trained by using the training data set to obtain the trained virtual machine migration model, including: Inputting the training data set into the virtual machine migration model to obtain the target host machine corresponding to each virtual machine; Determine the performance difference of the virtual machine before and after migration to the target host machine, the performance difference including the performance improvement ratio before and after migration of the virtual machine, the performance difference between the host machine from which the virtual machine is migrated and the target host machine before and after migration of the virtual machine, the migration cost of the virtual machine migration, and the network congestion loss; updating the policy network in the virtual machine migration model according to the performance difference; Determining loss values ​​of the multimodal feature extraction network and the two-stage graph attention network in the virtual machine migration model according to the similarity between the virtual machine and the target host machine; The multimodal feature extraction network and the two-stage graph attention network are updated by using the loss value to obtain the trained virtual machine migration model.

5. The virtual machine migration method according to claim 1, characterized in that: The multimodal feature extraction network based on the graph attention mechanism in the virtual machine migration model extracts features from the virtual machine data and the host machine data respectively to obtain a first fusion feature and a plurality of second fusion features, including: Inputting the first text data and the second text data into a text encoder respectively to obtain a first text feature and a second text feature; Inputting the first image data and the second image data into an image encoder respectively to obtain a first image feature and a second image feature; Concatenating the first text feature with the first image feature to obtain a first multimodal feature; concatenating the second text feature with the second image feature to obtain a second multimodal feature; Graph attention calculation is performed on the first multimodal feature and the second multimodal feature respectively to obtain the first fusion feature and the second fusion feature.

6. The virtual machine migration method according to claim 1, characterized in that: The step of processing the first fusion feature and the plurality of second fusion features through the two-stage graph attention network in the virtual machine migration model to obtain a target host machine corresponding to the virtual machine to be migrated includes: Performing hard attention mechanism calculation on the first fusion feature and the plurality of the second fusion features through the two-stage graph attention network to determine a candidate target host machine corresponding to the virtual machine to be migrated; The first fusion feature and the second fusion feature corresponding to the candidate target host are calculated by a soft attention mechanism through the two-stage graph attention network to obtain the target host corresponding to the virtual machine to be migrated.

7. The virtual machine migration method according to claim 1, characterized in that: The determining whether to perform the virtual machine migration operation through the policy network in the virtual machine migration model includes: Determining the migration value of the virtual machine to the target host machine through the policy network; When the migration value meets expectations, determining that the virtual machine migration operation is feasible; When the migration value does not meet expectations, it is determined that the virtual machine migration operation is not feasible.

8. A virtual machine migration device, characterized in that: The device comprises: A data input module, used to input virtual machine data of the virtual machine to be migrated and host machine data of multiple host machines into a pre-trained virtual machine migration model, wherein the virtual machine data includes first text data and first image data, and the host machine data includes second text data and second image data; A feature extraction module, configured to extract features from the virtual machine data and the host machine data respectively through a multimodal feature extraction network based on a graph attention mechanism in the virtual machine migration model to obtain a first fused feature and a plurality of second fused features; a target host determination module, configured to process the first fusion feature and the plurality of second fusion features through a two-stage graph attention network in the virtual machine migration model to obtain a target host corresponding to the virtual machine to be migrated; An operation verification module, used to determine whether to perform a virtual machine migration operation through a policy network in the virtual machine migration model; The operation execution module is used to execute the virtual machine migration operation when it is determined that the virtual machine migration operation is feasible.

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 in the method according to any one of claims 1 to 7 are implemented.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Data migration method, system and device of virtual machine and storage medium

    CN120653370A

  • Data migration method and system, device and storage medium of virtual machine

    CN120653370B

  • Virtual machine migration method and apparatus, device, and storage medium

    WO2026118863A1