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

By identifying virtual machines with unbalanced resource loads and using intelligent algorithms to select migration targets, the virtual machine migration decision is optimized, solving the problem of low migration efficiency in existing technologies and achieving more efficient and stable data migration.

CN120653370BActive Publication Date: 2025-11-28JINAN INSPUR DATA TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511159535.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-11-28
Estimated Expiration
2045-08-19

AI Technical Summary

Technical Problem

Existing virtual machine migration strategies rely on fixed thresholds and resource utilization comparisons, leading to unreasonable resource allocation, impacting business operations, and resulting in low migration efficiency.

Method used

By identifying the first virtual machine with resource load exceeding a first threshold and the candidate virtual machines with resource load below a second threshold, intelligent algorithms are used to comprehensively analyze network links and business data, select the most suitable migration target from the candidate virtual machines, optimize migration decisions, and carry out data migration within an appropriate time window.

Benefits of technology

It improves the efficiency of virtual machine data migration, avoids resource waste and business performance degradation, and ensures the stability of the migration process and the rational allocation of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653370B_ABST
    Figure CN120653370B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a virtual machine data migration method and system, device and storage medium, and relate to the field of computers, wherein the virtual machine data migration method comprises: determining a first virtual machine with resource load higher than a first threshold from a plurality of virtual machines, and determining at least one candidate virtual machine with resource load lower than a second threshold from the plurality of virtual machines, wherein the first threshold is higher than the second threshold; determining a second virtual machine for data migration from the at least one candidate virtual machine by using first resource data and service data of the first virtual machine, second resource data of the at least one candidate virtual machine, and network link data between the first virtual machine and the at least one candidate virtual machine; and transmitting data of the first virtual machine to the second virtual machine.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the computer field, in particular, to a data migration method and system, device and storage medium of a virtual machine. BACKGROUND

[0002] In the existing cloud computing environment, with the increase of the number of virtual machines and the dynamic change of business load, the problem of unbalanced resource load among virtual machines is increasingly prominent. The traditional virtual machine migration strategy often relies on fixed thresholds and simple resource usage comparison, resulting in unreasonable resource allocation in the migration process and unnecessary negative impact on the running business, thereby leading to low migration efficiency.

[0003] Therefore, there is a technical problem of low data migration efficiency of a virtual machine in the related art. SUMMARY

[0004] Embodiments of the present application provide a data migration method and system, device and storage medium of a virtual machine to at least solve the technical problem of low data migration efficiency of a virtual machine in the related art.

[0005] According to an embodiment of the present application, a data migration method of a virtual machine is provided, comprising: determining a first virtual machine with resource load higher than a first threshold and at least one candidate virtual machine with resource load lower than a second threshold from a plurality of virtual machines, wherein the first threshold is higher than the second threshold; determining a second virtual machine for data migration from the at least one candidate virtual machine by using first resource data and business data of the first virtual machine, second resource data of the at least one candidate virtual machine, and network link data between the first virtual machine and the at least one candidate virtual machine; and transmitting data of the first virtual machine to the second virtual machine.

[0006] According to another embodiment of the present application, a data migration device of a virtual machine is provided, comprising: a first determination unit configured to determine a first virtual machine with resource load higher than a first threshold and at least one candidate virtual machine with resource load lower than a second threshold from a plurality of virtual machines, wherein the first threshold is higher than the second threshold; a second determination unit configured to determine a second virtual machine for data migration from the at least one candidate virtual machine by using first resource data and business data of the first virtual machine, second resource data of the at least one candidate virtual machine, and network link data between the first virtual machine and the at least one candidate virtual machine; and a migration unit configured to transmit data of the first virtual machine to the second virtual machine.

[0007] According to still another embodiment of the present application, a computer readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the method embodiments described above when executed.

[0008] According to still another embodiment of the present application, an electronic device is also provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps of any of the method embodiments described above.

[0009] Through the embodiments provided in the present application, the first virtual machine with excessively high resource load and the candidate virtual machine with resource load lower than a certain threshold are dynamically identified from multiple virtual machines, ensuring that the unbalanced distribution of resources is considered from the source in the migration decision, and blind migration operations are avoided. The real-time resources and service data of the first virtual machine, the resource state of the candidate virtual machine, and the network link data between the two are used to select the most suitable second virtual machine as the migration target from the candidate list through an intelligent algorithm (such as a machine learning model). This analysis based on multi-dimensional decision factors can comprehensively consider business demand, network status, and the availability of the target host, thereby making more reasonable and accurate migration decisions, avoiding resource waste and business performance degradation during the migration process, achieving the technical effect of improving the data migration efficiency of virtual machines, and solving the technical problem of low data migration efficiency of virtual machines in related technologies. BRIEF DESCRIPTION OF DRAWINGS

[0010] Figure 1 is a hardware structure block diagram of a virtual machine data migration method according to an embodiment of the present application;

[0011] Figure 2 is a flowchart of a virtual machine data migration method according to an embodiment of the present application;

[0012] Figure 3 is a flowchart of an intelligent migration decision implementation step based on multi-dimensional decision factors according to an embodiment of the present application;

[0013] Figure 4 is a flowchart of a migration process dynamic monitoring and adaptive adjustment implementation step according to an embodiment of the present application;

[0014] Figure 5 is a structure block diagram of a virtual machine data migration device according to an embodiment of the present application. DETAILED DESCRIPTION

[0015] Hereinafter, embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with embodiments.

[0016] It should be noted that the terms "first", "second" and the like in the description and in the claims of the present application as well as above-mentioned appended drawings are intended to distinguish between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so-termed first, second, etc., is interchangeable so that the embodiments of the application described herein are capable of accomplishing the operations in other than the recited order. In addition, the terms "comprise", "comprising", "have", "having" and any variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or apparatus that comprises a list of steps or units is not necessarily limited to those steps or units which are expressly listed, but can include other steps or units that are not expressly listed or inherent to such process, method, product or apparatus.

[0017] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or similar computing device. Taking a computer terminal as an example, Figure 1 is a hardware structure block diagram of a computer terminal of a data migration method of a virtual machine according to an embodiment of the present application. As shown in Figure 1 , the computer terminal can include one or more (only one is shown in Figure 1 ) processors 102 (the processor 102 can include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal can further include a transmission device 106 for communication function and an input and output device 108. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal can further include more or less components than those shown in Figure 1 , or have a different configuration from Figure 1 .

[0018] The memory 104 can be used to store computer programs, for example, software programs of application software and modules, such as the computer program corresponding to the data migration method of the virtual machine in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the computer terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0019] The transmission device 106 is configured to receive or send data via a network. The network can include a wireless network provided by a communication service provider of a computer terminal. In one embodiment, the transmission device 106 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one embodiment, the transmission device 106 can be a radio frequency (RF) module that is configured to communicate with the Internet wirelessly.

[0020] As an alternative, the data migration method of the virtual machine can be as shown in FIG. 2, and the specific steps include: Figure 2

[0021] S202, determining a first virtual machine whose resource load is higher than a first threshold value from the plurality of virtual machines, and determining at least one candidate virtual machine whose resource load is lower than a second threshold value from the plurality of virtual machines, wherein the first threshold value is higher than the second threshold value;

[0022] S204, determining a second virtual machine for data migration from the at least one candidate virtual machine by using the first resource data and the service data of the first virtual machine, the second resource data of the at least one candidate virtual machine, and the network link data between the first virtual machine and the at least one candidate virtual machine;

[0023] S206, transmitting the data of the first virtual machine to the second virtual machine.

[0024] Optionally, in the embodiment, the virtual machine (VM) is a software-implemented machine running on a physical server, which can run an operating system and an application program like an independent computer.

[0025] Optionally, in the embodiment, the resource load refers to the usage of the computing resource (such as CPU and memory), the storage resource (disk I / O), and the network resource (bandwidth) consumed by the virtual machine.

[0026] Optionally, in the embodiment, the first threshold value and the second threshold value are respectively used to define the critical points of the excessively high and low resource loads, and the first threshold value is usually set at the warning line of the resource utilization, while the second threshold value is used to find the relatively idle resource carrying capacity.

[0027] Optionally, in the embodiment, the first resource data and the second resource data respectively refer to the real-time resource usage of the first virtual machine and the at least one candidate virtual machine, including the CPU usage, the memory usage, the disk I / O rate, and the network traffic.

[0028] ​Optionally, in this embodiment, the network link data includes bandwidth utilization, delay, and packet loss rate of the inter-virtual machine network connection, which is used to evaluate the network transmission status.

[0029] Optionally, in this embodiment, the resource usage of all virtual machines in the data center is continuously monitored first. When it is detected that the resource load of a certain virtual machine is continuously higher than a first threshold value, and the resource load of other virtual machines is lower than a second threshold value, the former is marked as a first virtual machine, and the latter is marked as a candidate virtual machine, which is ready for resource balancing operation.

[0030] For example, assuming that there are 10 virtual machines in the data center, the CPU usage of virtual machine A is continuously above 90%, and the CPU usage of virtual machines B and C is below 30%, then virtual machine A is the first virtual machine, and virtual machines B and C are the candidate virtual machines.

[0031] The resource data and service characteristics of the first virtual machine, the resource status of the candidate virtual machines, and the network link status data between the first virtual machine and the candidate virtual machines are collected. Based on this information, the best second virtual machine is determined from the candidate virtual machines through intelligent algorithm analysis, which is used to receive data migration of the first virtual machine, and the most suitable data migration time is calculated.

[0032] For further example, for virtual machine A, its service type (for example, real-time data processing or batch processing task) and current resource usage are analyzed, and the resource status of virtual machines B and C and the network link data between A and B and A and C are combined to determine that virtual machine B is the best migration target after calculation.

[0033] According to the intelligent decision result, the data transmission process is started to efficiently transmit the data of the first virtual machine to the selected second virtual machine, realizing online migration of the virtual machine. During data transmission, the system dynamically adjusts the transmission rate according to the real-time status of the network link to ensure the stability of the migration process and the minimum impact on other services.

[0034] For further example, after determining that virtual machine B is the migration target, the system starts to transmit the data of virtual machine A to B, and monitors the network status during the process. If the bandwidth is tight, the transmission rate will be automatically reduced to avoid affecting the normal operation of other virtual machines in the data center.

[0035] It can be understood that in this embodiment, through real-time monitoring and intelligent analysis, the virtual machine with excessively high resource occupancy rate can be accurately identified, and the most suitable migration target can be selected from the virtual machine with relatively abundant resources. This method not only optimizes the migration decision process, but also intelligently controls the data transmission rate to ensure the efficiency and stability of the migration operation.

[0036] By the embodiments provided in the present application, the first virtual machine with excessively high resource load and the candidate virtual machine with resource load lower than a specific threshold are dynamically identified from multiple virtual machines, ensuring that the migration decision considers the unbalanced distribution of resources from the source, and avoiding blind migration operations. The real-time resource and service data of the first virtual machine, the resource state of the candidate virtual machine, and the network link data between the two are used to select the most suitable second virtual machine as the migration target from the candidate list through an intelligent algorithm (such as a machine learning model). This analysis based on multiple decision factors can comprehensively consider business demand, network status, and the availability of the target host, thereby making more reasonable and accurate migration decisions, avoiding resource waste and business performance degradation during migration, and achieving the technical effect of improving the data migration efficiency of virtual machines.

[0037] As an optional solution, before transmitting the data of the first virtual machine to the second virtual machine, the method further includes:

[0038] The first resource data and service data, and the second resource data and network link data are used to determine a data migration time for data migration;

[0039] The data of the first virtual machine is transmitted to the second virtual machine, including:

[0040] The data of the first virtual machine is transmitted to the second virtual machine according to the data migration time.

[0041] Optionally, in the present embodiment, the data migration time is the best time point determined by the intelligent algorithm based on the current system state and the expected resource utilization efficiency, which is used to start the data migration process of the first virtual machine to the second virtual machine, so as to reduce the impact on the running business and optimize resource allocation.

[0042] Optionally, in the present embodiment, before formally performing data migration, the migration process is further optimized, and the first resource data and service data of the first virtual machine, and the second resource data of the candidate virtual machine and the network link data between the two are used to determine the best data migration time through intelligent analysis based on multiple factors.

[0043] For further illustration, it is assumed that the network bandwidth and computing resources in the data center are most relaxed at night during off-peak hours. At this time, the system intelligently determines that 11:00 at night is the best time to migrate the virtual machine A to the virtual machine B, because the network delay is low at this time, the data transmission efficiency is the highest, and the business request volume is small, which will not significantly affect the business.

[0044] After determining the data migration time, the data of the first virtual machine will be transferred to the selected second virtual machine according to the time schedule, realizing the smooth migration of the virtual machine. This step ensures that the migration operation is carried out within the most appropriate time window, minimizing the interference with the business.

[0045] Through the embodiments provided in the present application, through careful assessment and planning in advance, data migration can be performed in the best period without affecting business operation, avoiding the negative impact that may be caused by performing migration operations during resource shortage or business peak period. This method not only improves the efficiency of data migration, but also ensures the rationality of cloud platform resource allocation and the stability of business continuity.

[0046] As an optional solution, before transferring the data of the first virtual machine to the second virtual machine, the method further comprises:

[0047] The first resource data and the business data, and the second resource data and the network link data are input into the first decision model for data migration prediction to obtain a prediction result for indicating the second virtual machine and the data migration time, wherein the first decision model is a first neural network model trained using migration data samples of historical virtual machines collected in a historical time period, and the migration data samples include resource data samples, business data samples, network link data samples and data migration time samples of the historical virtual machines.

[0048] Optionally, in this embodiment, the first decision model refers to a neural network model trained by machine learning technology, which is used to predict the best target host (second virtual machine) and the best migration time of virtual machine data migration, so as to realize intelligent scheduling and optimization of resources.

[0049] Optionally, in this embodiment, the migration data samples include resource data, business data, network link data and actual data migration time of historical virtual machines, which are used to train the first decision model, so that it can learn the rules and experiences of historical migration decisions.

[0050] Optionally, in this embodiment, the historical time period refers to the time range of data collected and used for training the first decision model, which usually includes past resource usage records, business demand changes, network conditions and migration operation results, etc.

[0051] Optionally, in this embodiment, before making real-time data migration decisions, a large number of virtual machine migration data samples need to be collected in a historical time period, including the resource usage of historical virtual machines, business types, network link states and actual migration times. These data samples are used to train the first decision model, i.e. the first neural network model, so that it can understand and predict the best migration decision based on the current resource configuration, business demand and network conditions.

[0052] For example, in the past week, the data center has recorded the CPU usage, memory occupancy, data processing type, network bandwidth consumption and successful migration timing of all virtual machines, which are used to train the first decision model so that it can predict the optimal migration target and time according to similar real-time data.

[0053] When resource load imbalance is identified and virtual machine data migration is needed, the current first virtual machine resource data, business data, and candidate virtual machine resource data, network link data are input into the first decision model, and the model outputs the prediction result by using the learned rules, indicating the second virtual machine most suitable for receiving data migration and the best data migration time.

[0054] For further example, when the resource load of virtual machine A is detected to be too high, the CPU usage, memory consumption, data type being processed of A, and the resource status of potential target virtual machines B and C and the network conditions between A and B and A and C are input into the first decision model. The model calculates and predicts that virtual machine B is the best migration target and should start migrating at 2:00 a.m. to avoid affecting business during peak hours.

[0055] Once the prediction result of the first decision model is obtained, the system will follow the indication and start transferring the data of the first virtual machine to the second virtual machine at the predicted best time point to achieve balanced allocation and efficient use of resources.

[0056] Through the embodiments provided in this application, the first decision model based on machine learning is introduced, which greatly improves the intelligence and prediction accuracy of the virtual machine data migration strategy. By learning from historical data, the model can better understand the complex relationship between resource load dynamic changes, business demand fluctuations and network conditions affecting migration. This not only helps to make migration preparations in advance before the resource usage peak arrives, reducing resource pressure during peak hours.

[0057] As an optional solution, the first resource data and business data, and the second resource data and network link data are input into the first decision model for data migration prediction to obtain a prediction result for indicating the second virtual machine and the data migration time, including:

[0058] The first decision model is used to perform similarity calculation on the first resource data and the service data, and the second resource data and the network link data, to obtain an adaptation value between the first virtual machine and each candidate virtual machine, wherein the adaptation value is used to indicate a priority of each candidate virtual machine as receiving data of the first virtual machine.

[0059] The candidate virtual machine with the highest adaptation value is determined as the second virtual machine.

[0060] Optionally, in the embodiment, the adaptation value represents a matching degree between the first virtual machine and the candidate virtual machine, which comprehensively reflects matching conditions of resource load, service type and network link state, and is used to evaluate a priority of the candidate virtual machine as a data migration target.

[0061] Optionally, in the embodiment, the similarity calculation is used as a data processing technology to calculate a similarity or an adaptation degree between the first virtual machine and the candidate virtual machine by comparing resource data, service data and network link data of the first virtual machine and the candidate virtual machine, to provide a basis for intelligent decision.

[0062] Optionally, in the embodiment, first, the first resource data (such as CPU usage and memory occupation) of the first virtual machine, the service data (such as service type and priority) of the first virtual machine, and the second resource data of at least one candidate virtual machine and the network link state data between the first virtual machine and the candidate virtual machine are input to the first decision model. The model internally uses a machine learning algorithm, such as a deep neural network, to comprehensively analyze and perform similarity calculation on the data, to obtain an adaptation value between the first virtual machine and each candidate virtual machine.

[0063] For example, it is assumed that there are virtual machine A and candidate virtual machines B and C in the system, the resource data and the service data of A, and the resource data and the network link data of B and C are input to the model, and the model calculates that the adaptation value between virtual machine A and B is 0.85, and the adaptation value between A and C is 0.75.

[0064] Optionally, in the embodiment, based on the adaptation value output by the first decision model, the system automatically identifies the candidate virtual machine with the highest adaptation value, and determines the candidate virtual machine as the second virtual machine, that is, the best data migration target, so as to ensure that the migration operation is performed in the case of the most suitable resources and the least impact on the service.

[0065] For further example, in the foregoing adaptation value comparison, the adaptation value of virtual machine B is the highest, and therefore the system determines virtual machine B as the best migration target for receiving data of virtual machine A, that is, the second virtual machine.

[0066] By introducing the operation of "similarity calculation", the intelligent decision-making process of virtual machine data migration is further refined through the embodiments provided in the present application. Not only the resource load and network link state are considered, but also the particularity of business data is taken into account, so that the first decision-making model can evaluate the matching degree of the first virtual machine and each candidate virtual machine from multiple dimensions to obtain a quantitative adaptation value. The calculation result of the adaptation value directly reflects the comprehensive priority of the candidate virtual machine as the data migration receiver, thereby ensuring that the system can select the most suitable second virtual machine from numerous candidates to achieve accurate matching of resources and efficient migration.

[0067] As an optional solution, the data of the first virtual machine is transmitted to the second virtual machine, comprising:

[0068] The memory data of the first virtual machine and the disk data of the first virtual machine are subjected to differential calculation to generate a data difference file;

[0069] The data difference file is transmitted to the second virtual machine.

[0070] Optionally, in the present embodiment, differential calculation is used to compare the differences between two data sets to generate a data file containing only changed data, thereby reducing data transmission volume and improving transmission efficiency.

[0071] Optionally, in the present embodiment, the data difference file is generated after differential calculation and contains only the set of memory data and disk data that has changed since the last data synchronization, for efficient migration.

[0072] Optionally, in the present embodiment, after determining the data migration target host (the second virtual machine), the system performs a quick scan of the memory data and disk data of the first virtual machine and compares them with the snapshot of the last data synchronization. The differential calculation process identifies all data blocks that have changed since the last synchronization and generates a data difference file containing only these changed data, without the unchanged part.

[0073] For example, it is detected that virtual machine A needs to be migrated to run on virtual machine B. Before migration, differential calculation is performed on the memory and disk data of A. It is assumed that 1MB of data in the memory of A has been changed and a file on the disk has increased by 50KB of content. These changes are recorded in the data difference file, and the original data that has not changed is not transmitted.

[0074] Subsequently, only the data difference file is transmitted from the first virtual machine to the second virtual machine, without the need to transmit all the memory and disk data, greatly reducing the time required for migration and network resource consumption.

[0075] For further illustration, in the above example, the data difference file of virtual machine A (containing 1MB memory data change and 50KB disk data addition) is efficiently transmitted to virtual machine B, and B quickly completes the complete state replication of A by applying these difference data to the local virtual machine environment, without the need to additionally transmit the unchanged memory and disk data of A, greatly improving the migration efficiency.

[0076] Through the embodiments provided in the present application, by implementing differential calculation and data difference file transmission, the efficiency and speed of virtual machine data migration are significantly improved. The differential calculation technology only focuses on the changed part of the data, and the generated data difference file is much smaller than the full amount of memory and disk data of the virtual machine, so that in the case of limited network resources or urgent migration time, data migration can be quickly completed.

[0077] As an optional solution, transmitting the data difference file to the second virtual machine comprises:

[0078] transmitting the data difference file to the second virtual machine at a first transmission rate;

[0079] wherein, in the case that the network bandwidth utilization is detected to be greater than a third threshold during the data difference file transmission, the first transmission rate is reduced to a second transmission rate, and the data difference file is transmitted to the second virtual machine at the second transmission rate.

[0080] Optionally, in the present embodiment, the first transmission rate is the initial set data difference file transmission speed, which is usually set to a higher value according to the current network condition and the expected data transmission efficiency to speed up the migration process.

[0081] Optionally, in the present embodiment, the third threshold is a preset network bandwidth utilization threshold, when the network bandwidth utilization is detected to exceed this threshold, it indicates that the network resources are tight, and the data transmission strategy needs to be adjusted to avoid negative impact on other services.

[0082] Optionally, in the present embodiment, the second transmission rate is the data difference file transmission speed automatically reduced by the system when the network bandwidth utilization is detected to exceed the third threshold, in order to reduce the network resource occupation and ensure the normal operation of other services.

[0083] Optionally, in the present embodiment, after determining the data migration target host (the second virtual machine) and generating the data difference file, the system first starts transmitting the data difference file at a preset first transmission rate. This rate is usually set based on the current network condition and the expected data transmission efficiency, aiming to quickly complete the data migration.

[0084] For example, the data difference file of virtual machine A is transmitted to virtual machine B, and the initial transmission rate is set to 80% of the link bandwidth. This rate is selected to complete the migration as soon as possible and reduce the downtime of virtual machine A.

[0085] During the transmission of the data difference file, the system detects the network bandwidth utilization in real time. If it is found that the bandwidth utilization exceeds the preset third threshold, the system will automatically adjust the transmission strategy, reduce the first transmission rate to the second transmission rate, and slow down the data transmission speed to prevent network congestion and ensure that other services are not affected.

[0086] For further example, during the transmission of the data difference file, the system monitors that the network bandwidth utilization rises to 85%, which exceeds the preset third threshold of 80%. At this time, the system reduces the transmission rate from 80% of the link bandwidth to 50% to reduce the occupation of network resources and ensure that the services of virtual machines C and D run normally without being affected by the migration operation.

[0087] After reducing the transmission rate, the system continues to transmit the data difference file at the second transmission rate until it is completely transmitted to the second virtual machine. This strategy ensures smooth data migration while reasonably allocating network resources.

[0088] For further example, the data difference file of virtual machine A is transmitted to virtual machine B at a link bandwidth rate of 50%. Although the transmission time is prolonged, it ensures the stability of the network during migration and avoids interference with other virtual machine services.

[0089] Through the embodiments provided in the present application, by dynamically adjusting the transmission rate of the data difference file, intelligent and efficient data migration is achieved under the premise of ensuring reasonable allocation of network resources and business continuity. When network resources are scarce, the system can automatically reduce the data transmission speed to prevent network congestion and ensure the normal operation of other services.

[0090] As an optional solution, after transmitting the data difference file to the second virtual machine, the method further comprises:

[0091] performing data verification on the data difference file received by the second virtual machine;

[0092] In the case where the data verification result indicates that data loss occurred in the data transmission process of the data difference file, the data difference file is retransmitted to the second virtual machine.

[0093] Optionally, in the present embodiment, the data verification is a process of checking the integrity and accuracy of the transmitted data after the data transmission is completed to ensure that the data is not damaged or lost during the transmission process.

[0094] Optionally, in the embodiment, data loss refers to that, during the data transmission, due to network error, device failure or other reasons, part of the data fails to successfully reach the receiving end, affecting the integrity of the data and the accuracy of the migration.

[0095] Optionally, in the embodiment, after the data difference file is successfully transmitted to the second virtual machine (i.e. the data migration target host), the system immediately starts the data verification program. The program performs integrity verification on the data difference file received by the second virtual machine, checking whether there is data loss or damage.

[0096] For example, after the data difference file of the virtual machine A is transmitted to the virtual machine B, the data verification program of the B end runs, compares the received data difference file with the original difference file of the A end, and checks whether there is a data block that is not correctly received during the transmission process.

[0097] If the data verification result shows that the data difference file has data loss during the transmission process, the system will trigger the retransmission mechanism to retransmit the complete data difference file to the second virtual machine, ensuring the integrity of the data and the accuracy of the migration.

[0098] For further example, during the data verification process, if it is found that 50KB of data in the data difference file of the virtual machine A has not been correctly transmitted to the virtual machine B, the 50KB of data will be automatically retransmitted until the data verification passes and it is confirmed that the data difference file is completely successfully received.

[0099] Through the embodiments provided in the application, by implementing the data verification and retransmission mechanism, the reliability and accuracy of the virtual machine data migration are significantly enhanced. The data verification ensures the integrity of the data difference file during the transmission process, and the retransmission mechanism serves as an effective supplement to deal with data loss. Through this series of operations, even in poor network conditions or in the case of unexpected transmission errors, the system can ensure the smooth completion of the data migration.

[0100] As an optional solution, during the process of transmitting the data of the first virtual machine to the second virtual machine, the method further comprises:

[0101] Obtaining target running state data of the second virtual machine and target network link data between the first virtual machine and the second virtual machine;

[0102] Determining the target running state data and the target network link data as load reference data;

[0103] In the case where the load reference data meets the target load condition, performing a target operation corresponding to the target load condition.

[0104] Optionally, in this embodiment, the target running state data refers to the running state data that the second virtual machine is expected to reach after receiving the first virtual machine data, including but not limited to CPU usage, memory occupancy, disk IO rate and other indicators, to evaluate the load balancing after migration.

[0105] Optionally, in this embodiment, the target network link data is the expected network link quality data when establishing a data transmission channel between the first virtual machine and the second virtual machine, including bandwidth, delay, packet loss rate and other parameters, to evaluate the feasibility and efficiency of data transmission.

[0106] Optionally, in this embodiment, the load reference data is a comprehensive data composed of target running state data and target network link data, serving as a reference basis for judging whether the load of the second virtual machine meets the expected standard. The target load condition is the preset quality condition of running state and network link. When the actual running state and network link data of the second virtual machine meet these conditions, it indicates that the migration operation meets the expectation, and subsequent optimization or adjustment operations can be performed.

[0107] Optionally, in this embodiment, during the process of data migration from the first virtual machine to the second virtual machine, the target running state data of the second virtual machine (such as expected CPU usage) and the target network link data between the first and second virtual machines (such as expected network delay) are collected simultaneously. These target data are used to form load reference data to judge whether the load after migration meets the expectation.

[0108] The collected load reference data is compared with the preset target load condition. If the running state and network link data of the second virtual machine both meet the target load condition, it indicates that the migration operation will not cause resource overload or network performance degradation of the target host.

[0109] Once it is confirmed that the load reference data meets the target load condition, the system will perform optimization operations corresponding to the target condition, such as adjusting virtual machine configuration, optimizing network transmission strategy, etc., to further improve the resource utilization and business response speed of the cloud environment.

[0110] Through the embodiments provided in this application, by collecting and evaluating the target running state data and the target network link data in real time during data migration, effective load reference data is formed to ensure that the migration operation does not exceed the carrying capacity of the second virtual machine, and can be carried out under ideal network conditions. Through such design, the system not only can intelligently judge and perform data migration operation, but also can make corresponding optimization adjustment according to the real-time feedback of the load reference data, to ensure that the resource usage and network performance after migration meet the established target, improving the intelligent level of cloud resource management and scheduling, and ensuring the continuity and efficient operation of business.

[0111] As an optional solution, when the load reference data meets the target load condition, the target operation corresponding to the target load condition is executed, and the method further comprises:

[0112] When the load reference data meets the first load condition, the data transmission rate from the first virtual machine to the second virtual machine is reduced.

[0113] When the load reference data meets the second load condition, the data transmission from the first virtual machine to the second virtual machine is suspended.

[0114] When the load reference data meets the third load condition, a third virtual machine for data migration is determined from the plurality of virtual machines, and the data from the first virtual machine is transmitted to the third virtual machine.

[0115] The first load condition indicates a load intensity lower than the second load condition, and the second load condition indicates a load intensity lower than the third load condition.

[0116] Optionally, in this embodiment, the first load condition is used to indicate the upper limit of the data transmission rate that the system can accept when the load state of the target virtual machine (the second virtual machine) is relatively low. The second load condition is used to indicate the condition when the load of the target virtual machine starts to rise, but is still within the acceptable range. The system will suspend data transmission to ensure stable operation of the virtual machine. The third load condition is used to indicate that when the load state of the target virtual machine exceeds the preset threshold, i.e. the data transmission may cause a serious decline in the performance of the virtual machine, the system will find and use another more suitable virtual machine (the third virtual machine) as the target of data transmission to redirect the data migration operation.

[0117] Optionally, in this embodiment, the load intensity is the degree of resource consumption of the virtual machine during operation, including but not limited to CPU usage, memory occupancy and I / O load, etc., which is used to evaluate the real-time running pressure of the virtual machine.

[0118] Optionally, in this embodiment, when the load reference data meets the first load condition, i.e. the target virtual machine is still in a low load state after receiving the data transmission, the system will automatically reduce the data transmission rate. This step can further optimize the allocation of network resources and ensure that other services are not affected.

[0119] For example, if the target virtual machine B receives data from A, its load intensity (such as CPU usage of 50%) is lower than the preset first load condition (such as CPU usage of 60%), the system will automatically adjust the data transmission rate from high speed mode to medium speed mode to prevent the load of B from suddenly increasing.

[0120] Once the load reference data reaches the second load condition, i.e., the load of the target virtual machine starts to rise but is still controllable, the system will suspend data transmission to avoid further increasing the load of the virtual machine, ensuring the stability of its operation and the continuity of the service.

[0121] For example, when the load intensity of the target virtual machine B (such as CPU usage of 65%) approaches the preset second load condition (such as CPU usage of 70%), the system will suspend data transmission until the load decreases or B can handle additional load.

[0122] If the load reference data meets the third load condition, i.e., the load intensity of the target virtual machine exceeds the preset limit value, the system will select a third virtual machine with lighter load from multiple candidate virtual machines as a new data migration target to avoid excessive burden on the target virtual machine.

[0123] For example, if the resource usage of the target virtual machine B (such as CPU usage reaching 90%) reaches the preset third load condition, the system will automatically switch to a virtual machine C with lower resource occupancy to continue the data migration operation to ensure the smooth progress of the migration process.

[0124] Through the embodiments provided in the present application, by implementing a dynamic data transmission control strategy based on three-level load conditions, the intelligence and stability of the virtual machine data migration process are significantly enhanced. The system can adjust the data transmission rate according to the real-time load intensity of the target virtual machine, even suspend transmission or redirect data to another virtual machine, avoiding the problem of resource overload caused by data migration operations, and ensuring the continuity and efficient operation of the service in the cloud environment. This method of dynamically adjusting the migration strategy according to the load intensity not only improves the flexibility of resource scheduling, but also optimizes the use efficiency of network resources.

[0125] As an optional solution, before performing the target operation corresponding to the target load condition, the method further comprises:

[0126] In the case where the target running state data indicates that the resource load of the second virtual machine increases from the second threshold to the fourth threshold, or the target network link data indicates that the delay increment is higher than the first increment threshold, it is determined that the load reference data meets the first load condition;

[0127] In the case where the target running state data indicates that the resource load of the second virtual machine increases from the second threshold to the fifth threshold, or the target network link data indicates that the delay increment is higher than the second increment threshold, it is determined that the load reference data meets the second load condition;

[0128] In a case where the target running state data indicates that the resource load of the second virtual machine increases from the second threshold value to the sixth threshold value, or the target network link data indicates that the delay increment is higher than the third increment threshold value, it is determined that the load reference data satisfies a third load condition;

[0129] The sixth threshold value is higher than the fifth threshold value, the fifth threshold value is higher than the fourth threshold value, the third increment threshold value is higher than the second increment threshold value, and the second increment threshold value is higher than the first increment threshold value.

[0130] Optionally, in the embodiment, the fourth, fifth, and sixth threshold values are resource load indexes that increase in sequence, and correspond to trigger threshold values of the first, second, and third load conditions respectively, and represent different levels of resource usage of the target virtual machine in the data transmission process.

[0131] Optionally, in the embodiment, the first, second, and third increment threshold values are preset threshold values of the network delay increment, and correspond to trigger conditions of the first, second, and third load conditions respectively, and are used to determine whether the network link state reaches a degree that requires adjustment of the data transmission strategy.

[0132] Optionally, in the embodiment, the resource load refers to resource consumption of the virtual machine in the running process, including CPU utilization, memory occupation, disk I / O rate, etc., and is used to evaluate the carrying capacity and running efficiency of the virtual machine. The delay increment refers to the increase amplitude of the network delay in the data transmission process, and is used to evaluate the influence of the data transmission on the network performance, and ensure the continuity of the service and the user experience.

[0133] Optionally, in the embodiment, when the target running state data indicates that the resource load of the second virtual machine increases from the second threshold value to the fourth threshold value, or the target network link data indicates that the delay increment is higher than the first increment threshold value, the system determines that the load reference data satisfies the first load condition. At this time, the data transmission rate can be appropriately reduced to reduce the load pressure of the target virtual machine and avoid further increase of the network delay.

[0134] If it is detected that the target running state data indicates that the resource load of the second virtual machine continues to rise to the fifth threshold value, or the target network link data indicates that the delay increment is higher than the second increment threshold value, it is determined that the load reference data satisfies the second load condition. At this time, the system will suspend the data transmission to avoid excessive load of the target virtual machine or serious decline of the network performance.

[0135] When the target running state data indicates that the resource load of the second virtual machine rises to the sixth threshold value, or the target network link data indicates that the delay increment is higher than the third increment threshold value, the system determines that the load reference data satisfies the third load condition. At this time, the system determines a third virtual machine for data migration from the plurality of virtual machines, and transmits the data of the first virtual machine to the third virtual machine to avoid resource overload or network performance problems of the original target host.

[0136] Through the embodiments provided in the present application, by setting different levels of resource load and network delay increment threshold values, a dynamic adjustment mechanism based on load reference data is constructed for real-time monitoring and control of resource and network states in the data migration process. When the resource usage or network delay of the target virtual machine reaches the preset threshold value, the system can automatically determine the current load condition and take corresponding measures, thereby improving the intelligence and reliability of data migration.

[0137] As an optional solution, after obtaining the target running state data of the second virtual machine and the target network link data between the first virtual machine and the second virtual machine, the method further comprises:

[0138] inputting the target running state data and the target network link data into a second decision model for operation prediction to obtain a target operation output by the second decision model, wherein the second decision model is used to calculate the target running state data and the target network link data to obtain reference values of a plurality of reference operations, the reference values are used to indicate the priority of the plurality of reference operations as the target operation, and the target operation is an operation with the highest reference value in the plurality of reference operations.

[0139] Optionally, in the present embodiment, the second decision model is a machine learning-based model used to predict and decide the operations that can be taken in the data migration process and their priorities. It analyzes the target running state data and the target network link data to output reference values of a series of reference operations, which are used to guide subsequent data transmission and optimization strategies.

[0140] Optionally, in the present embodiment, the target operation is an operation instruction with the highest priority and most suitable for the current scenario according to the prediction result of the second decision model, such as adjusting the data transmission rate, pausing transmission, or redirecting data to another virtual machine, etc.

[0141] Optionally, in the present embodiment, the reference operation is a set of possible operation options obtained by the second decision model after analysis, which contains different levels of resource management and network optimization strategies. The reference value is a numerical value obtained by the second decision model after evaluating each reference operation, which reflects the suitability of an operation as a target operation. The higher the reference value, the higher the priority.

[0142] Optionally, in the embodiment, the acquired target running state data (such as CPU utilization and memory occupation of the second virtual machine) and target network link data (such as network delay and bandwidth utilization) are taken as inputs and input into the pre-trained second decision model for calculation and prediction.

[0143] The second decision model calculates reference values of a series of reference operations based on the input data through a predefined algorithm. Each reference value represents the rationality and priority of the corresponding operation as the target operation, and a high reference value means that the operation is more suitable as the target operation.

[0144] The second decision model automatically selects the operation with the highest reference value as the target operation according to the calculated reference values, for guiding the adjustment of the next step of data migration strategy.

[0145] Through the embodiments provided in the present application, by introducing the second decision model, the running state data and network link data of the target virtual machine are analyzed in depth and the operation is predicted, which can intelligently output the target operation with the highest priority to guide the dynamic adjustment of data migration. Compared with the traditional static preset condition, the second decision model can dynamically evaluate and decide the optimal operation according to real-time data, greatly improving the efficiency and stability of data migration, and reducing the complexity of resource scheduling and the risk of business interruption in the cloud environment. This method combines the prediction ability of machine learning and the demand of dynamic resource management, and provides strong technical support for intelligent operation of cloud data centers.

[0146] As an optional solution, before the target running state data and the target network link data are input into the operation decision model for operation prediction, the method further comprises:

[0147] Collecting N groups of migration records of historical virtual machines in a historical time period, wherein one group of migration records is used to indicate a first resource state of the historical virtual machine before a historical target operation is performed on the historical virtual machine in a migration process, a second resource state of the historical virtual machine after the historical target operation is performed, and an expected parameter corresponding to the migration process;

[0148] Determining the first resource state, the second resource state, the expected parameter and the historical target operation as a group of operation training samples corresponding to the group of migration records;

[0149] Training the initialized second neural network model using N groups of operation training samples corresponding to N groups of migration records;

[0150] In a case where a loss function value corresponding to the trained second neural network model is less than a preset loss threshold, it is determined that the training is completed, and the trained second neural network model is determined as the second decision model.

[0151] Optionally, in this embodiment, the historical time period is a specific time window for collecting historical virtual machine migration data, which will be used to train the second neural network model to improve its decision accuracy.

[0152] Optionally, in this embodiment, the N groups of migration records are a collection of multiple virtual machine migration operations recorded within the historical time period, each group containing the resource state changes before and after migration and specific expected parameters during migration as the data basis for model training.

[0153] Optionally, in this embodiment, the first resource state is the resource usage of the historical virtual machine before the data migration operation starts, including but not limited to CPU utilization, memory occupancy, disk I / O rate, etc. The second resource state is the resource usage of the historical virtual machine after completing the data migration operation, reflecting the impact of migration on virtual machine resources.

[0154] Optionally, in this embodiment, the expected parameter is a pre-set target parameter during data migration, such as expected migration time, expected resource balance degree, or expected service performance indicator. The operation training sample is a data set composed of the first resource state, the second resource state, the expected parameter, and the historical target operation in a group of migration records, used to train the second neural network model to improve its prediction and decision-making ability. The pre-set loss threshold is a threshold used to evaluate the gap between the model prediction accuracy and the expected value during model training. When the model reaches or falls below this threshold, it is considered that the model training is complete and can be used for actual decision-making.

[0155] Optionally, in this embodiment, N groups of records of virtual machine migration within the historical time period are automatically or manually collected, each record containing the resource state of the historical virtual machine before migration, the resource state after migration, the expected parameter during migration, and the historical target operation executed, for subsequent model training.

[0156] Each collected migration record is converted into a corresponding operation training sample, i.e., the resource state changes of the historical virtual machine, the expected parameter, and the historical target operation are associated to form a structured data sample for model training.

[0157] The N groups of operation training samples are used to train the initialized second neural network model, and the model parameters are continuously adjusted through the backpropagation algorithm, so that the model can predict which historical target operation is most expected under different resource states and expected parameters.

[0158] During model training, the loss function value of the model is continuously monitored, and when it falls below the pre-set loss threshold, it is considered that the model training is sufficient and can be used for actual decision-making. At this time, the trained second neural network model is determined as the second decision model.

[0159] Through the embodiments provided in the present application, by collecting the migration records of historical virtual machines, an operation training sample is constructed for training a second decision model, which is an intelligent decision model based on deep learning. During the model training process, the system not only focuses on the historical resource state and operation result, but also fuses the expected parameters of migration, so that the model can more accurately predict the best migration strategy to be taken under the current resource state and expected parameters. By setting a preset loss threshold, the sufficiency and effectiveness of the model training are ensured, and intelligent decision support is provided for subsequent virtual machine data migration operations.

[0160] As an optional solution, before determining the first resource state, the second resource state, the expected parameter and the historical target operation as a set of operation training samples corresponding to a set of migration records, the method further comprises:

[0161] obtaining a migration efficiency parameter, a business impact parameter and a resource balance parameter of the migrated virtual machine corresponding to the migration process, wherein the migration efficiency parameter is used to indicate the migration efficiency of the migration process, the business impact parameter is used to indicate the degree of business performance decline caused by the migration process, and the migrated virtual machine is a virtual machine that receives the migrated data in the migration process, and the resource balance parameter is used to indicate the difference degree of the resource utilization rate of the migrated virtual machine and the average resource utilization rate of the plurality of virtual machines;

[0162] performing weighted calculation on the migration efficiency parameter, the business impact parameter and the resource balance parameter to obtain the expected parameter corresponding to the migration process.

[0163] Optionally, in the present embodiment, the migration efficiency parameter is used to measure the efficiency index in the virtual machine migration process, including data transmission rate, migration time consumption, etc., reflecting the rapidity and resource use efficiency of the migration operation.

[0164] Optionally, in the present embodiment, the business impact parameter represents the influence degree of the data migration on the business performance decline, such as the increase of business response time, the decrease proportion of throughput, etc., which is used to quantify the potential negative impact of the migration operation on business continuity and user experience.

[0165] Optionally, in the present embodiment, the resource balance parameter measures the difference degree between the resource utilization rate of the migrated virtual machine and the average resource utilization rate of the entire virtual machine cluster, ensuring the reasonable allocation and utilization efficiency of resources, and avoiding the load imbalance caused by the concentration of resources on some hosts.

[0166] Optionally, in the present embodiment, the weighted calculation is used to give different weights according to the importance of each parameter, and the overall effect of the migration operation is evaluated by mathematical operation, and the obtained expected parameter reflects the comprehensive performance of the migration operation in the aspects of efficiency, business impact and resource balance.

[0167] Optionally, in this embodiment, the migration efficiency parameter, the service impact parameter and the resource balancing parameter are collected after the virtual machine migration is completed. The migration efficiency parameter can be the average rate of data transmission or the total time consumption in the migration process; the service impact parameter reflects the specific impact of the migration on the service performance, such as how much the response time is prolonged; and the resource balancing parameter is the difference between the virtual machine and the average resource utilization of the cluster after the migration, which reflects whether the resource allocation is balanced.

[0168] The various parameters are weighted to obtain the expected parameter of the migration process. The selection of the weight is crucial, and the importance of the migration efficiency, the service impact and the resource balancing should be adjusted according to the actual situation. Through weighting, the overall benefit of the migration operation can be comprehensively evaluated to provide data support for subsequent decision-making.

[0169] For example, assuming that the migration efficiency parameter weight is 0.4, the service impact parameter weight is 0.5, and the resource balancing parameter weight is 0.1, the specific values are substituted into the weighted calculation to obtain the overall expected parameter of the migration process.

[0170] The calculated expected parameter, together with the resource state data before and after the migration and the historical target operation, forms a complete operation training sample for the training of the subsequent second decision-making model.

[0171] Through the embodiments provided in this application, the overall effect of the virtual machine migration process is comprehensively evaluated by introducing the migration efficiency parameter, the service impact parameter and the resource balancing parameter, and the expected parameter measuring the comprehensive performance of the migration operation is obtained through weighted calculation. This parameter integrates the performance of the migration operation in the three dimensions of efficiency, service impact and resource balancing, and is an important part of constructing the operation training sample. By including the expected parameter and the historical resource state and operation in the training sample, a more accurate second decision-making model can be trained, which can better balance the speed of virtual machine migration, business continuity and uniformity of resource allocation when deciding the migration strategy, and improve the operation efficiency of the cloud data center and user experience.

[0172] As an optional solution, the migration efficiency parameter corresponding to the migration process is obtained, including:

[0173] The total migration time corresponding to the migration process is obtained, and the migrated time when the target operation is executed in the migration process is obtained;

[0174] The difference obtained by subtracting the migrated time from the total migration time is divided by the total migration time to determine the migration efficiency parameter.

[0175] Optionally, in this embodiment, the total migration duration is the entire duration from the start of migration to the completion of migration to the target host, including the sum of the time of all migration-related operations such as data transmission and state adjustment.

[0176] Optionally, in this embodiment, the migrated duration is the cumulative time from the start of the target operation (such as adjusting the data transmission rate, pausing transmission, or rescheduling the migration target) to the completion of the operation during the migration process, which may be affected by the execution of the operation, such as pausing transmission which may prolong the migrated duration.

[0177] Optionally, in this embodiment, the migration efficiency parameter is an index that measures the efficiency of the migration operation by calculating the difference between the total migration duration and the migrated duration, and the proportion of the total migration duration. The larger the parameter value, the smaller the negative impact of the operation on the overall migration efficiency during the migration process, that is, the higher the migration efficiency.

[0178] Optionally, in this embodiment, after the completion of the data migration of the virtual machine, the system automatically records the total time consumption of the entire migration process, that is, the total migration duration; at the same time, records the cumulative time of the target operation (such as adjusting the transmission rate) during the migration process, that is, the migrated duration.

[0179] Suppose the total time consumption of virtual machine A migrating to B is 120 seconds, and the cumulative time of the operation of adjusting the transmission rate is 40 seconds.

[0180] The difference between the total migration duration (120 seconds) and the migrated duration (40 seconds) is 80 seconds, which is divided by the total migration duration 120 seconds, and the result (about 0.67) is taken as the migration efficiency parameter, which represents the proportion of the influence of the target operation on the total migration duration in this migration.

[0181] For example, through the above calculation, the migration efficiency parameter is 0.67, which means that about 67% of the total migration time is not directly affected by the target operation, which can be considered as effective migration time, and the migration efficiency is high.

[0182] Through the embodiments provided in the present application, the migration efficiency parameter is calculated by comparing the total migration duration and the migrated duration. The calculation method of this parameter considers the actual influence of the target operation on the migration duration during the migration process, and can effectively reflect the performance of the migration operation in time efficiency.

[0183] As an optional solution, before determining the trained second neural network model as the operation decision model, the method further comprises:

[0184] obtaining the expected parameter corresponding to each group of migration records and the target expected parameter corresponding to each group of migration records in the training process of the initialized second neural network model;

[0185] According to the difference information between the target expected parameter corresponding to each set of migration records and the expected parameter corresponding to each set of migration records, a loss function value corresponding to the trained second neural network model is determined.

[0186] Optionally, in this embodiment, the target expected parameter is a preset ideal migration result parameter in the machine learning model training process, reflecting the comprehensive expectation of the efficiency, business impact and resource balance of the migration operation under ideal conditions. It is the target value of model training, used to evaluate the gap between model output and ideal state.

[0187] Optionally, in this embodiment, the difference information is the difference between the expected parameter output by the model training and the target expected parameter, usually represented as a numerical difference or ratio, used to quantify the accuracy and effectiveness of the model prediction result.

[0188] Optionally, in this embodiment, the loss function value is an index that measures the difference between the model prediction value and the target value, the smaller the loss function value, the closer the model prediction result to the target expectation, and the better the model training effect. In neural network model training, the loss function is a guide for the optimization direction, used to guide the adjustment of model parameters.

[0189] Optionally, in this embodiment, when the second neural network model is trained using the operation training sample each time, the expected parameter output by the model (the migration effect parameter predicted by the current training sample) and the target expected parameter set in advance (the preset ideal migration effect parameter) are recorded.

[0190] For example, suppose in a certain training round, the model predicts the migration efficiency parameter, business impact parameter and resource balance parameter as 60%, 10% and 1% respectively, while the preset target expected parameter is 65%, 5% and 0.5% respectively.

[0191] According to the difference information between the expected parameter output by the operation training sample in each training and the preset target expected parameter, the error or deviation of the model prediction is calculated using the loss function, which reflects the gap between the current training state of the model and the ideal state.

[0192] For example, using the square error as the loss function, the difference between the above two parameter sets is calculated, and the loss function value obtained is 0.007. This means that the model prediction result deviates from the preset target to a certain extent, but overall it is still within an acceptable range.

[0193] By continuously comparing the loss function value after each training iteration, the progress and effect of model training are evaluated. When the model training is sufficient, resulting in a loss function value below the preset threshold, it means that the model has reached a satisfactory training state and can be used as an operation decision model.

[0194] For example, after multiple iterations, the loss function value stabilizes below 0.0005, which is much lower than the preset loss threshold (such as 0.01), at which time the system determines that the model training is complete, and the trained second neural network model is determined as the operation decision model.

[0195] Through the embodiments provided in the present application, by comparing the expected parameters predicted by the model with the preset target expected parameters, the value of the loss function is calculated, which can monitor the accuracy and convergence of the model training in real time. This process ensures that the operation decision model can make the most ideal migration decision based on historical migration data when it is finally applied, taking into account the efficiency of migration, business impact and resource balance, providing reliable technical support for intelligent online migration of virtual machines in cloud data centers.

[0196] As an optional solution, the present application also provides a data migration system for a virtual machine, characterized in that it comprises:

[0197] a resource monitoring module for continuously monitoring the resource load of a plurality of virtual machines, and identifying a first virtual machine whose resource load exceeds a first threshold and at least one candidate virtual machine whose resource load is lower than a second threshold, wherein the first threshold is higher than the second threshold;

[0198] an intelligent decision module in communication connection with the resource monitoring module, for receiving first resource data and business data of the first virtual machine, second resource data of the at least one candidate virtual machine, and network link data between the first virtual machine and the at least one candidate virtual machine, and determining a second virtual machine for data migration from the at least one candidate virtual machine through a machine learning algorithm;

[0199] a data transmission module in communication connection with the intelligent decision module, for executing data transmission according to the selection of the second virtual machine indicated by the intelligent decision module, and transmitting the data of the first virtual machine to the second virtual machine.

[0200] Optionally, in the present embodiment, the resource monitoring module is a system component responsible for real-time monitoring of the resource usage (such as CPU, memory occupancy rate, etc.) of each virtual machine in the cloud data center, which can automatically identify the first virtual machine with excessively high resource load and the candidate virtual machine with relatively light resource load.

[0201] Optionally, in the present embodiment, the intelligent decision module is connected with the resource monitoring module for collecting monitoring data, analyzing the data and deciding which candidate virtual machine is most suitable for receiving data migration of the first virtual machine through the integrated machine learning algorithm, so as to realize dynamic balancing and optimization of resources.

[0202] Optionally, in this embodiment, the data transmission module is configured to execute specific migration operations to transmit the data of the first virtual machine to the selected second virtual machine according to the instructions of the intelligent decision module, while optimizing the data transmission strategy, such as adjusting the transmission rate or using differential transmission, to improve the migration efficiency and reduce the business impact.

[0203] Optionally, in this embodiment, the first threshold / second threshold is a preset resource load level standard for determining whether the virtual machine needs to be migrated and which host can be used as a migration target. Generally, the first threshold is set higher, representing resource shortage, and the second threshold is relatively lower, representing resource abundance.

[0204] Optionally, in this embodiment, the resource monitoring module continuously monitors the CPU and memory usage of all virtual machines in the cloud data center. For example, if the CPU usage of virtual machine X reaches 85%, exceeding the preset first threshold (assuming 80%), it is marked as the first virtual machine with high resource load; while the CPU usage of virtual machine Y is only 50%, lower than the second threshold (assuming 60%), it is considered as one of the candidate virtual machines with low resource load.

[0205] After receiving the information from the resource monitoring module, the intelligent decision module further collects detailed resource data, business type data of the first virtual machine X, and resource data and network link data (such as delay, bandwidth utilization) of the candidate virtual machine Y, etc. Through the deployed machine learning algorithms, such as gradient boosting decision tree or deep neural network, the intelligent decision module analyzes these data, evaluates the migration suitability of each candidate virtual machine, and finally selects the virtual machine Y with the most matched resource state and network condition as the second virtual machine to receive the data migration of X.

[0206] Once the intelligent decision module determines the second virtual machine Y, the data transmission module starts to execute the data migration from virtual machine X to Y. This process may be accompanied by dynamic adjustment of the transmission rate, such as high-speed data transmission in the initial stage, automatic reduction of the rate when the network bandwidth is occupied too high, and priority transmission of critical data to ensure the efficiency and safety of the migration operation.

[0207] Through the embodiments provided by the present application, the resource monitoring module dynamically monitors the resource state of all virtual machines, the intelligent decision module comprehensively analyzes and decides the monitoring data based on machine learning algorithms, selects the most suitable candidate virtual machine for data reception, and the data transmission module executes the data migration operation and optimizes the transmission strategy. This system architecture aims to achieve dynamic balancing of resources, improve migration efficiency, and reduce the impact on business, thereby improving the operation efficiency of the cloud data center and user experience.

[0208] As an optional solution, the above-mentioned virtual machine data migration method is applied to the virtual machine dynamic intelligent online migration scene. With the wide application of cloud computing technology, virtual machines (VM) have become the basic component unit in data centers and cloud computing environments. However, with the growth and change of business, the resource demand of virtual machines is also changing, in order to ensure the continuity and efficiency of business, virtual machine dynamic online migration has become an important means to realize flexible scheduling of cloud resources, load balancing and energy saving. However, the existing virtual machine dynamic online migration technology still has many problems: first, the migration decision lacks comprehensive consideration of multi-dimensional factors, usually only according to the current CPU, memory and other resource utilization of virtual machine to make judgment, without fully considering the business type, network bandwidth occupation, real-time load fluctuation of the target host and other factors, resulting in unreasonable migration decision, and the situation of resource imbalance after migration or excessive frequent migration. Second, during the migration process, the data transmission efficiency is low, and the traditional full data migration method will occupy a large amount of network bandwidth in a short time, affecting the normal operation of other businesses. Third, the monitoring and adjustment of the running state of the virtual machine during the migration process are not fine enough, and it is not possible to respond to network jitter, temporary resource shortage of the target host and other sudden conditions in time, which may lead to migration failure or business interruption. Therefore, an improved virtual machine dynamic online migration technology is urgently needed to solve the above problems.

[0209] The embodiment designs a virtual machine dynamic online migration method based on the above-mentioned virtual machine data migration method, proposes an intelligent migration decision model based on multi-dimensional decision factors, determines the best migration time based on this, designs an efficient data migration method based on differential transmission and flow control, ensures the efficiency of virtual machine migration, maximizes the reduction of network impact on other businesses, and ensures the stability of the migration process. And in the migration process, a dynamic monitoring and adaptive adjustment mechanism is designed to ensure the smooth progress of the virtual machine migration process and minimize the impact on the operating business.

[0210] Optionally, in the embodiment, an intelligent migration decision model based on multi-dimensional decision factors is constructed. First, the resource usage of the virtual machine (CPU usage, memory usage, disk I / O rate, network traffic, etc.), the business type (real-time requirement, priority, etc.), the resource state of the target host (remaining CPU, memory resources, current load change trend) and the network link state (bandwidth utilization, delay, packet loss rate) and other multi-dimensional data are collected, then machine learning algorithms (such as gradient boosting decision tree algorithm) are used to analyze and process these data, and finally a migration decision model is trained. The decision model evaluates the necessity and feasibility of migration according to the set migration trigger conditions (such as source host resource utilization exceeding threshold, business demand change, etc.), selects the optimal migration target host, and determines the best migration time, avoiding blind migration and unreasonable resource scheduling.

[0211] Optionally, in this embodiment, an efficient data migration method based on differential transmission and flow control is proposed. Before virtual machine migration (in the iteration migration period), differential calculation is performed on the memory and disk data of the source virtual machine, and only the data changed since the last data synchronization is transmitted, reducing the data transmission amount. At the same time, combined with the network link state, the data transmission rate is dynamically adjusted. When the network bandwidth is tight, the transmission rate is reduced, and the data is sorted by priority queue, and the key data (such as operating system core data, service data being processed) that guarantees the normal operation of the virtual machine is transmitted preferentially; when the network bandwidth is sufficient, the transmission rate is increased, and the migration process is accelerated. In this way, while ensuring the efficiency of virtual machine migration, the network impact on other services is reduced, and the stability of the migration process is ensured.

[0212] Optionally, in this embodiment, a migration process dynamic monitoring and adaptive adjustment mechanism is designed. In the virtual machine migration process, the states of the source host, the target host and the network link are monitored in real time. The monitoring module collects CPU usage, memory load, network delay, packet loss rate and other data, and feeds these data back to the migration control module in real time. When it is detected that network jitter causes data transmission delay to increase, or the target host is resource-constrained due to sudden load increase, the migration control module dynamically adjusts the migration strategy based on the adaptive adjustment algorithm of reinforcement learning. For example, suspend the transmission of part of the non-critical data, and prioritize the transmission of the core data that ensures the operation of the virtual machine; or reevaluate and switch to a more suitable migration target host to ensure the smooth progress of the virtual machine migration process and minimize the impact on services.

[0213] Optionally, in this embodiment, the flowchart of the implementation steps of the intelligent migration decision based on multi-dimensional decision factors is as shown in Figure 3 The data collection module collects the running data of host 1 and host 2 at regular intervals, and then stores these data in the database. The historical collection data is periodically retrieved from the database to train and optimize the data model, improving the decision accuracy of the model. The real-time monitoring module continuously monitors the running state of the host (such as host 1 and host 2) to determine whether the trigger condition for virtual machine migration is met. If a host meets the migration trigger condition, it will pass the relevant information to the migration decision module. The migration decision module calls the trained model, combines multi-dimensional data (such as the resource situation of each host), analyzes and selects the optimal host that is most suitable for receiving virtual machine migration. According to the optimal host selected by the migration decision module, the migration operation of the virtual machine (such as virtual machines 1, 2, 3 and 4 that meet the migration condition) is performed, and the entire migration process is completed.

[0214] Optionally, in this embodiment, the data collection module is deployed in the management platform of the cloud data center to collect the resource usage data and service type information of the virtual machine at a fixed time interval (e.g., 30 seconds), and to obtain the resource state data and network link state data of the migration target host, and store these data in the database. The historical collection data is regularly (e.g., every week) trained and optimized by using the gradient boosting decision tree migration decision model, the model parameters are adjusted according to the actual migration effect feedback to improve the decision accuracy of the model. When the migration trigger condition is met (e.g., the CPU usage of the source host exceeds 80% for 5 minutes continuously), the migration decision module calls the trained model, comprehensively analyzes the multi-dimensional data, and selects the optimal migration target host from the candidate target hosts, and determines the best migration start time.

[0215] Optionally, in this embodiment, the efficient data migration implementation steps based on differential transmission and flow control include the following steps: after determining the migration target host, the migration control module starts the data preprocessing program to perform differential calculation on the memory and disk data of the source virtual machine, and generates a data difference file. The data transmission module dynamically adjusts the data transmission rate according to the real-time collected network link state data. In the early stage of migration, if the network bandwidth is sufficient, the data is transmitted at a high rate (e.g., 80% of the link bandwidth); when it is detected that the network bandwidth utilization exceeds 70%, the transmission rate is reduced, and the critical data is transmitted in priority according to the data priority queue, to ensure the basic operation of the virtual machine. After the data is transmitted to the target host, the data is checked, if data loss or error is found, the corresponding data is timely supplemented from the source host to ensure the integrity of the virtual machine data.

[0216] Optionally, in this embodiment, the flowchart of the migration process dynamic monitoring and adaptive adjustment implementation steps is as follows Figure 4As shown, the data collection module collects data such as CPU usage, memory occupation, network delay, and packet loss rate from the monitoring components of host 1 (running virtual machines 1 and 2) and host 2 (running virtual machines 3 and 4) in real time, and also performs differential calculation on memory and disk data. During the migration process, the migration control module monitors the resource status of each host in real time to determine whether the resources exceed the threshold. If the resources do not exceed the threshold, the data processing module generates differential data, which is transmitted to the target (e.g., host 2) by the data transmission module through the migration data transmission channel. If the resources exceed the threshold, the adaptive adjustment process is entered: action 1, adjust the transmission rate to optimize data transmission efficiency; action 2, complete the migration or terminate the migration and roll back to ensure system stability; and action 3, reschedule an appropriate target host to perform migration to ensure smooth migration. After the data transmission module transmits data, the data verification module performs data verification. If data loss or other problems are found, the relevant situation is fed back to ensure data accuracy. When the data transmission and verification processes are successfully completed, the migration is completed, and if necessary, the new host can perform migration-related operations again. The entire process revolves around virtual machine migration, and through data collection, control, processing, transmission, verification, and adaptive adjustment, efficient and reliable virtual machine migration is achieved.

[0217] Optionally, in this embodiment, monitoring sensors and monitoring modules are deployed on the source host, target host, and network link critical nodes to collect data such as CPU usage, memory occupation, network delay, and packet loss rate at intervals of 10 seconds and transmit the data to the migration control module in real time. When the migration control module detects that the network delay suddenly increases by more than a preset threshold (e.g., an increase of 50%) or the memory usage of the target host increases to 90% in a short period of time, the adaptive adjustment algorithm based on reinforcement learning is triggered. The agent selects an appropriate action (e.g., reducing the data transmission rate by 30%) based on the current state and observes the new state and reward after executing the action, continuously optimizing the adjustment strategy to ensure smooth migration. When all data transmission is completed and the virtual machine is successfully started and normally running on the target host, the migration control module confirms that the migration is complete and updates the resource management information of the cloud data center.

[0218] Optionally, in this embodiment, the adaptive adjustment algorithm for virtual machine migration based on reinforcement learning is designed as follows.

[0219] Define resource state: Let S_t be the migration state at time t, including the resource state of the source host S_{source,t} (CPU usage u_{source,t}^{CPU}, memory usage u_{source,t}^{memory}, etc.), the resource state of the target host S_{target,t} (remaining CPU resources r_{target,t}^{CPU}, remaining memory resources r_{target,t}^{memory}, etc.), network link state S_{network,t} (bandwidth utilization u_{network,t}, delay d_{network,t}, packet loss rate l_{network,t}), and virtual machine migration progress P_t, etc. information. That is, S_t = [S_{source,t}, S_{target,t}, S_{network,t}, P_t].

[0220] Define execution action: A_t includes adjusting data transmission rate (such as increasing n% or decreasing m%), suspending / resuming part of data transmission, selecting and switching to a new migration target host, etc.

[0221] Design reward function: The reward R_t considers migration efficiency, business impact and resource utilization, let the total migration time of virtual machine be T_{total}, the migrated time be T_t, the performance degradation index caused by migration be D_t (such as response time increase, throughput decline, etc.), and the resource balance degree of target host after migration be B_t (measured by calculating the difference between target host and cluster average resource utilization).

[0222] The reward function is defined as: R_t = α * (T_{total} - T_t) / T_{total} - β * D_t + γ * B_t, where α, β, γ are weight coefficients, which are adjusted according to actual business needs to balance migration efficiency, business performance and resource balance.

[0223] Reinforcement policy learning: Deep Q network (DQN) is used for reinforcement policy learning. The designed agent predicts the Q value Q(S_t, A_t) of each action through neural network according to the current state S_t, and selects the action with the maximum Q value to execute. After executing the action, the new state S_{t+1} and the reward R_t are observed, and the experience (S_t, A_t, R_t, S_{t+1}) is stored in the experience replay buffer D. A batch of experiences are randomly extracted from the experience replay buffer D for training at regular intervals, and the parameters θ of the neural network are updated by using the mean square error minimization loss function.

[0224] The loss function is defined as follows: L(0) = E_(S_t,A_t,R_t,S_{t+1})~D[(R_t+max_A'Q(S_{t+1},A_t';0)-Q(S_t,A_t;0)) 2 ], which measures the mean square error between the current Q network prediction value and the target Q value. The state transition sequence (S_t, A_t, R_t, S_{t+1}) is randomly sampled from the experience replay buffer D, that is, the sample is subject to the distribution in D. Through continuous training and learning, the agent gradually optimizes the migration strategy to realize the adaptive adjustment of the virtual machine migration process.

[0225] Through the above innovations and algorithms, intelligent, efficient and stable dynamic online migration of virtual machines can be realized, the utilization efficiency of cloud resources is improved, the risk of business interruption is reduced, and important application value and economic benefits are achieved.

[0226] Through the embodiments provided in the application, intelligent migration decision can be realized, and the best migration timing can be determined. In the data transmission process, efficient data migration can be realized based on differential transmission and flow control, and the virtual machine migration process can be smoothly realized according to the dynamic monitoring and adaptive adjustment mechanism, thereby minimizing the impact on the operation business. The application is beneficial to the dynamic balance of user data center resources and improves the use efficiency of the business.

[0227] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and a general hardware platform as required, and of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the methods of the various embodiments of the application.

[0228] In the embodiment, a virtual machine data migration device is also provided, which is used to realize the above embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the device described in the following embodiments is preferably realized in software, hardware or a combination of software and hardware is also possible and is contemplated.

[0229] Figure 5 is a structural block diagram of the virtual machine data migration device according to the embodiments of the application, as shown in Figure 5 the device comprises:

[0230] The first determining unit 502 is configured to determine a first virtual machine with resource load higher than a first threshold from the plurality of virtual machines, and determine at least one candidate virtual machine with resource load lower than a second threshold from the plurality of virtual machines, wherein the first threshold is higher than the second threshold.

[0231] The second determining unit 504 is configured to determine a second virtual machine for data migration from the at least one candidate virtual machine by using the first resource data and the service data of the first virtual machine, the second resource data of the at least one candidate virtual machine, and network link data between the first virtual machine and the at least one candidate virtual machine.

[0232] The migration unit 506 is configured to transmit data of the first virtual machine to the second virtual machine.

[0233] As an optional solution, the apparatus further includes:

[0234] The first determining module is configured to determine a data migration time for data migration by using the first resource data and the service data, and the second resource data and the network link data, before transmitting the data of the first virtual machine to the second virtual machine.

[0235] The migration unit 506 includes:

[0236] The first migration module is configured to transmit the data of the first virtual machine to the second virtual machine according to the data migration time.

[0237] As an optional solution, the apparatus further includes:

[0238] The first prediction module is configured to input the first resource data and the service data, and the second resource data and the network link data, into a first decision model for data migration prediction, to obtain a prediction result indicating the second virtual machine and a data migration time, before transmitting the data of the first virtual machine to the second virtual machine, wherein the first decision model is a first neural network model trained by using migration data samples of historical virtual machines collected in a historical time period, and the migration data samples include resource data samples, service data samples, network link data samples, and data migration time samples of the historical virtual machines.

[0239] As an optional solution, the first prediction module includes:

[0240] The calculation sub-module is configured to perform similarity calculation on the first resource data and the service data, and the second resource data and the network link data by using the first decision model, to obtain an adaptation value between the first virtual machine and each candidate virtual machine, wherein the adaptation value is used to indicate a priority of each candidate virtual machine for receiving the data of the first virtual machine.

[0241] The first determining sub-module is configured to determine the candidate virtual machine with the highest adaptation value as the second virtual machine.

[0242] As an optional solution, the migration unit 506 comprises:

[0243] The difference calculation module is configured to perform difference calculation on the memory data of the first virtual machine and the disk data of the first virtual machine to generate a data difference file.

[0244] The second migration module is configured to transmit the data difference file to the second virtual machine.

[0245] As an optional solution, the second migration module comprises:

[0246] The migration sub-module is configured to transmit the data difference file to the second virtual machine at the first transmission rate.

[0247] In a case where the network bandwidth utilization is greater than the third threshold during the transmission of the data difference file, the first transmission rate is reduced to a second transmission rate, and the data difference file is transmitted to the second virtual machine at the second transmission rate.

[0248] As an optional solution, the device further comprises:

[0249] The checking module is configured to perform data checking on the data difference file received by the second virtual machine after the data difference file is transmitted to the second virtual machine.

[0250] The retransmission module is configured to retransmit the data difference file to the second virtual machine in a case where the data checking result indicates that data loss occurs in the data difference file during the data transmission.

[0251] As an optional solution, the device further comprises:

[0252] The first obtaining module is configured to obtain target running state data of the second virtual machine and target network link data between the first virtual machine and the second virtual machine during the transmission of the data of the first virtual machine to the second virtual machine.

[0253] The second determining module is configured to determine the target running state data and the target network link data as load reference data during the transmission of the data of the first virtual machine to the second virtual machine.

[0254] The execution module is configured to perform a target operation corresponding to a target load condition in a case where the load reference data satisfies the target load condition during the transmission of the data of the first virtual machine to the second virtual machine.

[0255] As an optional solution, the execution module further comprises:

[0256] a first execution submodule, configured to, in a case where the load reference data satisfies a first load condition, reduce a data transmission rate of the first virtual machine to the second virtual machine;

[0257] a second execution submodule, configured to, in a case where the load reference data satisfies a second load condition, suspend data transmission of the first virtual machine to the second virtual machine;

[0258] a third execution submodule, configured to, in a case where the load reference data satisfies a third load condition, determine a third virtual machine for data migration from the plurality of virtual machines, and transmit data of the first virtual machine to the third virtual machine;

[0259] wherein the first load condition indicates a load intensity lower than a load intensity indicated by the second load condition, and the second load condition indicates a load intensity lower than a load intensity indicated by the third load condition.

[0260] As an optional solution, the device further comprises:

[0261] a third determination module, configured to, before performing a target operation corresponding to the target load condition, determine that the load reference data satisfies the first load condition in a case where the target running state data indicates that the resource load of the second virtual machine increases from the second threshold value to a fourth threshold value, or the target network link data indicates that the delay increment is higher than a first increment threshold value;

[0262] a fourth determination module, configured to, before performing the target operation corresponding to the target load condition, determine that the load reference data satisfies the second load condition in a case where the target running state data indicates that the resource load of the second virtual machine increases from the second threshold value to a fifth threshold value, or the target network link data indicates that the delay increment is higher than a second increment threshold value;

[0263] a fifth determination module, configured to, before performing the target operation corresponding to the target load condition, determine that the load reference data satisfies the third load condition in a case where the target running state data indicates that the resource load of the second virtual machine increases from the second threshold value to a sixth threshold value, or the target network link data indicates that the delay increment is higher than a third increment threshold value;

[0264] wherein the sixth threshold value is higher than the fifth threshold value, the fifth threshold value is higher than the fourth threshold value, the third increment threshold value is higher than the second increment threshold value, and the second increment threshold value is higher than the first increment threshold value.

[0265] As an optional solution, the device further comprises:

[0266] The second prediction module is configured to input the target running state data and the target network link data into the second decision model to perform operation prediction after obtaining the target running state data and the target network link data between the first virtual machine and the second virtual machine, and obtain a target operation output by the second decision model, wherein the second decision model is configured to calculate the target running state data and the target network link data to obtain reference values of a plurality of reference operations, the reference values are used to indicate priorities of the plurality of reference operations as the target operation, and the target operation is an operation with the highest reference value in the plurality of reference operations.

[0267] As an optional solution, the apparatus further includes:

[0268] The collection module is configured to collect N sets of migration records of historical virtual machines in a historical time period before inputting the target running state data and the target network link data into the operation decision model to perform operation prediction, wherein each set of migration records is used to indicate a first resource state of the historical virtual machine before performing a historical target operation on the historical virtual machine in a migration process, a second resource state of the historical virtual machine after performing the historical target operation, and an expected parameter corresponding to the migration process.

[0269] The sixth determination module is configured to determine the first resource state, the second resource state, the expected parameter, and the historical target operation as a set of operation training samples corresponding to each set of migration records before inputting the target running state data and the target network link data into the operation decision model to perform operation prediction.

[0270] The training module is configured to train the initialized second neural network model using N sets of operation training samples corresponding to the N sets of migration records before inputting the target running state data and the target network link data into the operation decision model to perform operation prediction.

[0271] The seventh determination module is configured to determine that the training is completed and determine the trained second neural network model as the second decision model in a case where a loss function value corresponding to the trained second neural network model is less than a preset loss threshold before inputting the target running state data and the target network link data into the operation decision model to perform operation prediction.

[0272] As an optional solution, the apparatus further includes:

[0273] The second obtaining module is configured to obtain a migration efficiency parameter, a service impact parameter and a resource balance parameter of the migrated virtual machine corresponding to the migration process before determining the first resource state, the second resource state, the expected parameter and the historical target operation as the set of operation training samples corresponding to the set of migration records, wherein the migration efficiency parameter is used to indicate the migration efficiency of the migration process, the service impact parameter is used to indicate the degree of service performance decline caused by the migration process, the migrated virtual machine is a virtual machine that receives the migrated data in the migration process, and the resource balance parameter is used to indicate the difference degree between the resource utilization rate of the migrated virtual machine and the average resource utilization rate of the plurality of virtual machines.

[0274] The weighting module is configured to perform weighted calculation on the migration efficiency parameter, the service impact parameter and the resource balance parameter before determining the first resource state, the second resource state, the expected parameter and the historical target operation as the set of operation training samples corresponding to the set of migration records, to obtain the expected parameter corresponding to the migration process.

[0275] As an optional solution, the second obtaining module comprises:

[0276] The obtaining submodule is configured to obtain the total migration duration corresponding to the migration process and the migrated duration when the target operation is executed in the migration process.

[0277] The second determining submodule is configured to determine the result obtained by dividing the difference between the total migration duration and the migrated duration by the total migration duration as the migration efficiency parameter.

[0278] As an optional solution, the apparatus further comprises:

[0279] The third obtaining module is configured to obtain the expected parameter corresponding to each set of migration records and the target expected parameter corresponding to each set of migration records in the training process of the initialized second neural network model before determining the trained second neural network model as the operation decision model.

[0280] The eighth determining module is configured to determine the loss function value corresponding to the trained second neural network model according to the difference information between the target expected parameter corresponding to each set of migration records and the expected parameter corresponding to each set of migration records before determining the trained second neural network model as the operation decision model.

[0281] The specific examples in the embodiment can refer to the examples described in the above embodiments and exemplary embodiments, and the embodiment will not be described here again.

[0282] Those skilled in the art can clearly understand that the method according to the above-mentioned embodiments can be realized by means of software on a general hardware platform, and of course, can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the methods of the various embodiments of the present application.

[0283] It should be noted that the above-mentioned modules can be realized by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: all the modules are located in the same processor; or the modules are located in different processors in any combination.

[0284] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program, and the computer program is configured to execute the steps in any of the above-mentioned method embodiments when running.

[0285] In an example embodiment, the above-mentioned computer readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0286] The embodiments of the present application also provide an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor is configured to execute the computer program to execute the steps in any of the above-mentioned method embodiments.

[0287] In an example embodiment, the above-mentioned electronic device can also include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0288] The embodiments of the present application also provide a computer program product, which includes a non-volatile computer readable storage medium, the non-volatile computer readable storage medium stores a computer program product, and the computer program is executed by a processor to implement the steps in the method of the various embodiments of the present application.

[0289] The specific examples in the present embodiment can refer to the examples described in the above-mentioned embodiments and example embodiments, which will not be described herein again.

[0290] It should be apparent to those skilled in the art that the modules or steps of the application described above can be implemented with general computing devices, which can be centralized on a single computing device or distributed on a network of multiple computing devices, which can be implemented with program codes executable by the computing devices, so that they can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in different orders than shown, or made into individual integrated circuit modules, or made into a single integrated circuit module. Thus, the present application is not limited to any particular combination of hardware and software.

[0291] The preferred embodiments of the present application are only used to illustrate the technical solutions of the present application, and not used to limit the present application. Any modifications, equivalent replacements, improvements, and the like made within the principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for data migration of virtual machines, characterized in that, include: A first virtual machine whose resource load is higher than a first threshold is determined from a plurality of virtual machines, and at least one candidate virtual machine whose resource load is lower than a second threshold is determined from the plurality of virtual machines, wherein the first threshold is higher than the second threshold; Using the first resource data and service data of the first virtual machine, the second resource data of the at least one candidate virtual machine, and the network link data between the first virtual machine and the at least one candidate virtual machine, a second virtual machine for data migration is determined from the at least one candidate virtual machine; Transfer the data from the first virtual machine to the second virtual machine; In the process of transferring the data from the first virtual machine to the second virtual machine, the method further includes: Obtain the target running status data of the second virtual machine, and the target network link data between the first virtual machine and the second virtual machine; The target operating status data and the target network link data are input into a second decision model for operation prediction to obtain the target operation output by the second decision model. The second decision model is a model trained based on N sets of operation training samples corresponding to N sets of migration records. A set of migration records is used to indicate the first resource state of the historical virtual machine before the historical target operation is performed, the second resource state of the historical virtual machine after the historical target operation is performed, and the expected parameters corresponding to the migration process. The expected parameters are determined by weighted calculation based on the migration efficiency parameters, business impact parameters, and resource balancing parameters of the virtual machine after migration. The second decision model is used to calculate the reference values ​​of multiple reference operations based on the target operating status data and the target network link data. The reference values ​​are used to indicate the priority of the multiple reference operations as the target operation. The target operation is the operation with the highest reference value among the multiple reference operations. The target operating status data and the target network link data are determined as load reference data; If the load reference data meets the target load conditions, the target operation is executed.

2. The method according to claim 1, characterized in that, Before transferring the data from the first virtual machine to the second virtual machine, the method further includes: Using the first resource data and the service data, as well as the second resource data and the network link data, the data migration time for the data migration is determined; The step of transferring data from the first virtual machine to the second virtual machine includes: According to the data migration time, the data of the first virtual machine is transferred to the second virtual machine.

3. The method according to claim 2, characterized in that, Before transferring the data from the first virtual machine to the second virtual machine, the method further includes: The first resource data and the service data, as well as the second resource data and the network link data, are input into the first decision model to perform data migration prediction, thereby obtaining a prediction result for indicating the second virtual machine and the data migration time. The first decision model is a first neural network model trained using migration data samples of historical virtual machines collected over a historical time period. The migration data samples include resource data samples, service data samples, network link data samples, and data migration time samples of the historical virtual machines.

4. The method according to claim 3, characterized in that, The step of inputting the first resource data and the service data, as well as the second resource data and the network link data, into the first decision model to perform data migration prediction, and obtaining a prediction result for indicating the second virtual machine and the data migration time, includes: Using the first decision model, similarity calculations are performed on the first resource data and the service data, as well as the second resource data and the network link data, to obtain the adaptation value between the first virtual machine and each candidate virtual machine, wherein the adaptation value is used to indicate the priority of each candidate virtual machine in receiving data from the first virtual machine; The candidate virtual machine with the highest adaptation value is determined as the second virtual machine.

5. The method according to claim 1, characterized in that, The step of transferring data from the first virtual machine to the second virtual machine includes: Perform differential calculations on the memory data and disk data of the first virtual machine to generate a data difference file; The data difference file is transferred to the second virtual machine.

6. The method according to claim 5, characterized in that, The step of transferring the data difference file to the second virtual machine includes: The data difference file is transmitted to the second virtual machine at the first transmission rate; If, during the transmission of the data difference file, the network bandwidth utilization rate is detected to be greater than a third threshold, the first transmission rate is reduced to a second transmission rate, and the data difference file is transmitted to the second virtual machine at the second transmission rate.

7. The method according to claim 5, characterized in that, After transferring the data difference file to the second virtual machine, the method further includes: Perform data verification on the data difference file received by the second virtual machine; If the data verification result indicates that the data difference file has been lost during data transmission, the data difference file shall be retransmitted to the second virtual machine.

8. The method according to claim 1, characterized in that, The step of executing the target operation corresponding to the target load condition when the load reference data meets the target load condition further includes: If the load reference data meets the first load condition, reduce the data transmission rate from the first virtual machine to the second virtual machine. If the load reference data meets the second load condition, the data transmission from the first virtual machine to the second virtual machine is paused. If the load reference data meets the third load condition, a third virtual machine for data migration is determined from the plurality of virtual machines, and the data of the first virtual machine is transferred to the third virtual machine. Wherein, the load intensity indicated by the first load condition is lower than the load intensity indicated by the second load condition, and the load intensity indicated by the second load condition is lower than the load intensity indicated by the third load condition.

9. The method according to claim 8, characterized in that, Before executing the target operation corresponding to the target load condition, the method further includes: If the target running status data indicates that the resource load of the second virtual machine increases from the second threshold to the fourth threshold, or the target network link data indicates that the latency increase is higher than the first increase threshold, it is determined that the load reference data meets the first load condition. If the target running status data indicates that the resource load of the second virtual machine increases from the second threshold to the fifth threshold, or if the target network link data indicates that the latency increase is higher than the second increase threshold, it is determined that the load reference data meets the second load condition. If the target running status data indicates that the resource load of the second virtual machine increases from the second threshold to the sixth threshold, or the target network link data indicates that the latency increase is higher than the third increase threshold, it is determined that the load reference data meets the third load condition. Wherein, the sixth threshold is higher than the fifth threshold, the fifth threshold is higher than the fourth threshold, the third increase threshold is higher than the second increase threshold, and the second increase threshold is higher than the first increase threshold.

10. The method according to claim 1, characterized in that, Before inputting the target operational status data and the target network link data into the second decision model for operational prediction, the method further includes: Collect N sets of migration records for historical virtual machines over a historical time period, wherein each set of migration records is used to indicate the first resource state of the historical virtual machine before performing the historical target operation on the historical virtual machine during the migration process, the second resource state of the historical virtual machine after performing the historical target operation, and the expected parameters corresponding to the migration process; The first resource state, the second resource state, the expected parameters, and the historical target operation are determined as a set of operation training samples corresponding to the set of migration records; The initialized second neural network model is trained using the N sets of operation training samples corresponding to the N sets of migration records. If the loss function value of the trained second neural network model is less than a preset loss threshold, the training is determined to be complete, and the trained second neural network model is determined as the second decision model.

11. The method according to claim 10, characterized in that, Before determining the first resource state, the second resource state, the expected parameter, and the historical target operation as a set of operation training samples corresponding to the set of migration records, the method further includes: The migration efficiency parameter, the business impact parameter, and the resource balancing parameter of the migrated virtual machine are obtained corresponding to the migration process. The migration efficiency parameter is used to indicate the migration efficiency of the migration process, the business impact parameter is used to indicate the degree of business performance degradation caused by the migration process, the migrated virtual machine is the virtual machine that receives the migrated data during the migration process, and the resource balancing parameter is used to indicate the degree of difference between the resource utilization of the migrated virtual machine and the average resource utilization of the multiple virtual machines. The migration efficiency parameter, the business impact parameter, and the resource balancing parameter are weighted and calculated to obtain the expected parameters corresponding to the migration process.

12. The method according to claim 11, characterized in that, The step of obtaining the migration efficiency parameters corresponding to the migration process includes: Obtain the total migration time corresponding to the migration process, and obtain the migration time already completed when the target operation is executed during the migration process; The difference between the total migration time and the migration time already completed is divided by the total migration time, and the result is determined as the migration efficiency parameter.

13. The method according to claim 12, characterized in that, Before determining the trained second neural network model as the second decision model, the method further includes: During the training of the initialized second neural network model, the expected parameters corresponding to each set of transfer records and the target expected parameters corresponding to each set of transfer records are obtained. Based on the difference information between the target expected parameter corresponding to each group of transfer records and the expected parameter corresponding to each group of transfer records, the loss function value corresponding to the trained second neural network model is determined.

14. A data migration system for virtual machines, characterized in that, include: The resource monitoring module is used to continuously monitor the resource load of multiple virtual machines and identify a first virtual machine whose resource load exceeds a first threshold and at least one candidate virtual machine whose resource load is lower than a second threshold, wherein the first threshold is higher than the second threshold. The intelligent decision-making module is communicatively connected to the resource monitoring module and is used to receive the first resource data and service data of the first virtual machine, the second resource data of the at least one candidate virtual machine, and the network link data between the first virtual machine and the at least one candidate virtual machine. Through a machine learning algorithm, it determines the second virtual machine for data migration from the at least one candidate virtual machine. The data transmission module is communicatively connected to the intelligent decision-making module and is used to perform data transmission according to the selection of the second virtual machine indicated by the intelligent decision-making module, transmitting the data of the first virtual machine to the second virtual machine. The system is further configured to, during the process of transferring the data from the first virtual machine to the second virtual machine, acquire target running state data of the second virtual machine and target network link data between the first virtual machine and the second virtual machine; input the target running state data and the target network link data into a second decision model for operation prediction, and obtain the target operation output by the second decision model, wherein the second decision model is a model trained based on N sets of operation training samples corresponding to N sets of migration records, and a set of migration records is used to indicate the first resource state of the historical virtual machine before performing the historical target operation on the historical virtual machine during the migration process, and the resource state of the historical virtual machine after performing the historical target operation. The second resource status and the expected parameters corresponding to the migration process are determined by weighted calculation based on the migration efficiency parameters, business impact parameters, and resource balancing parameters of the migrated virtual machines. The second decision model is used to calculate the target running status data and the target network link data to obtain reference values ​​for multiple reference operations. The reference values ​​are used to indicate the priority of the multiple reference operations as the target operation, and the target operation is the operation with the highest reference value among the multiple reference operations. The target running status data and the target network link data are determined as load reference data. If the load reference data meets the target load conditions, the target operation is executed.

15. A data migration device for virtual machines, characterized in that, include: The first determining unit is configured to determine, from among a plurality of virtual machines, a first virtual machine whose resource load is higher than a first threshold, and to determine, from among a plurality of virtual machines, at least one candidate virtual machine whose resource load is lower than a second threshold, wherein the first threshold is higher than the second threshold. The second determining unit is used to determine a second virtual machine for data migration from at least one candidate virtual machine by utilizing the first resource data and service data of the first virtual machine, the second resource data of at least one candidate virtual machine, and the network link data between the first virtual machine and at least one candidate virtual machine. A migration unit is used to transfer data from the first virtual machine to the second virtual machine; The apparatus is further configured to, during the process of transmitting the data of the first virtual machine to the second virtual machine, acquire target running state data of the second virtual machine and target network link data between the first virtual machine and the second virtual machine; input the target running state data and the target network link data into a second decision model for operation prediction, and obtain the target operation output by the second decision model, wherein the second decision model is a model trained based on N sets of operation training samples corresponding to N sets of migration records, and a set of migration records is used to indicate the first resource state of the historical virtual machine before performing the historical target operation on the historical virtual machine during the migration process, and the resource state of the historical virtual machine after performing the historical target operation. The second resource status and the expected parameters corresponding to the migration process are determined by weighted calculation based on the migration efficiency parameters, business impact parameters, and resource balancing parameters of the migrated virtual machines. The second decision model is used to calculate the target running status data and the target network link data to obtain reference values ​​for multiple reference operations. The reference values ​​are used to indicate the priority of the multiple reference operations as the target operation, and the target operation is the operation with the highest reference value among the multiple reference operations. The target running status data and the target network link data are determined as load reference data. If the load reference data meets the target load conditions, the target operation is executed.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 13.

17. 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, it implements the steps of the method according to any one of claims 1 to 13.

18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Virtual machine scheduling method and device

    CN114546602A

  • Dynamic resource scheduling method and system based on data center and storage medium

    CN115373862A

  • Virtual machine cross-physical-machine data migration method and system

    CN118034860A

  • Thermal migration method and device, program product and medium

    CN118502885A

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

    CN119781899A