Data migration method and device, equipment, storage medium and program product
By building the target virtual machine in cloud computing and virtualization technology and matching file identifiers in resource pools, the problem of traditional low data migration efficiency is solved, and the effect of reducing bandwidth and improving data migration efficiency is achieved.
Patent Information
- Application Number
- CN202510058701.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional physical to virtual machine technology and virtual machine to virtual machine technology have problems with low data conversion efficiency, resulting in high bandwidth waste and time costs when data migration is carried out in cloud computing and virtualization technologies.
By obtaining the configuration information of the source computer cluster, the target virtual machine is built, and the file identification of the disk data file is matched in the resource pool. If the matching fails, the disk data file will be synchronized to the target virtual machine and the resource pool will be updated for the next data migration.
It effectively reduces the amount of data migration between source computers and cloud platform servers, reduces bandwidth, improves data migration efficiency, and improves data matching success rate and data migration efficiency by updating resource pools in real time.
Smart Images

Figure CN119473514A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a data migration method, device, equipment, storage medium and program product. Background Art
[0002] With the development of cloud computing and virtualization technology, more and more enterprises and users choose to migrate physical computer resources to the cloud or migrate virtual computers from one cloud platform to another, avoiding users from redeploying and configuring cloud hosts in different locations, ensuring that users can manage computing resources more efficiently and reduce operation and maintenance costs.
[0003] Traditional physical to virtual (P2V) and virtual to virtual (V2V) technologies mainly mirror the entire disk data of the source computer and then convert it to the disk format of the virtual machine for full disk transmission. However, this method has the problem of low data conversion efficiency. Summary of the invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide a data migration method, apparatus, device, storage medium and program product that can effectively reduce the amount of data migrated between the source computer and the target server, reduce the bandwidth, and thus effectively improve the data migration efficiency.
[0005] In a first aspect, the present application provides a data migration method. The method comprises: Obtain configuration information of each source computer in the source computer cluster, and build a target virtual machine corresponding to each source computer according to the configuration information; Migrating data to each source computer in the source computer cluster in turn, and receiving the file identifier of the disk data file of each source computer, and matching it in the resource pool according to the file identifier; the resource pool includes the correspondence between different file identifiers and disk data files; If the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, the disk data file corresponding to the file identifier is requested, and the received disk data file is synchronized to the target virtual machine; The resource pool is updated according to the disk data file, so that the next source computer performs data migration according to the updated resource pool.
[0006] In combination with the first aspect, in a possible implementation manner, the data migration method further includes: if the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, storing the disk data file in the resource pool.
[0007] In combination with the first aspect, in a possible implementation method, the data migration method also includes: if the matching result is that a disk data file corresponding to the file identifier exists in the resource pool, then searching the resource pool for the disk data file corresponding to the file identifier, and synchronizing the disk data file corresponding to the file identifier to the target virtual machine.
[0008] In combination with the first aspect, in a possible implementation, the disk data file includes disk data and a file path, and synchronizing the disk data file to the target virtual machine includes: storing the disk data in the disk of the target virtual machine according to the file path.
[0009] In combination with the first aspect, in a possible implementation method, the disk data file includes an identifier of a source computer, and synchronizing the disk data file to a target virtual machine includes: constructing a mapping relationship between the source computer and the target virtual machine; determining the target virtual machine corresponding to the source computer based on the identifier of the source computer and the mapping relationship; and synchronizing the disk data file to the target virtual machine corresponding to the source computer.
[0010] In combination with the first aspect, in a possible implementation manner, the file identifier is a message digest algorithm characteristic value.
[0011] In a second aspect, the present application further provides a data migration system, which is applied to the method described in the first aspect, and the system includes a source computer cluster and a cloud platform server. The source computer cluster is used to send the configuration information of each source computer to the cloud platform server, and in response to the data migration request sent by the cloud platform server, send the file identifier of the disk data file of the source computer to the cloud platform server; and in response to the data request sent by the cloud platform server, send the disk data file corresponding to the file identifier to the cloud platform server; The cloud platform server is used to receive the configuration information of each source computer and build a target virtual machine corresponding to each source computer according to the configuration information; send a data migration request to the source computer, migrate data to each source computer in the source computer cluster in turn, and receive the file identifier of the disk data file of the source computer for each source computer, and match it in the resource pool according to the file identifier; the resource pool includes the correspondence between different file identifiers and disk data files; if the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, send a data request to the source computer, and synchronize the disk data file corresponding to the received file identifier to the target virtual machine; update the resource pool according to the disk data file, so that the next source computer performs data migration according to the updated resource pool.
[0012] In a third aspect, the present application also provides a data migration device. The device includes: A construction module is used to obtain configuration information of each source computer in the source computer cluster and to construct a target virtual machine corresponding to each source computer according to the configuration information; A matching module is used to sequentially migrate data for each source computer in the source computer cluster, and for each source computer, receive a file identifier of a disk data file of the source computer, and match it in a resource pool according to the file identifier; the resource pool includes a correspondence between different file identifiers and disk data files; A synchronization module, for requesting the disk data file corresponding to the file identifier if the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, and synchronizing the received disk data file to the target virtual machine; The update module is used to update the resource pool according to the disk data file, so that the next source computer performs data migration according to the updated resource pool.
[0013] In a fourth aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0014] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method described in the first aspect when executed by a processor.
[0015] In a sixth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0016] The embodiment of the present application provides a data migration method, device, equipment, storage medium and program product, which can obtain the configuration information of each source computer in the source computer cluster, and build the target virtual machine corresponding to each source computer according to the configuration information; then, data migration is performed on each source computer in the source computer cluster in turn, and for each source computer, the file identifier of the disk data file of the source computer is received, and the file identifier is matched in the resource pool. If the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, the disk data file corresponding to the file identifier is requested, and the received disk data file is synchronized to the target virtual machine; the resource pool is updated according to the disk data file, so that the next source computer performs data migration according to the updated resource pool. The embodiment of the present application can first determine whether there is data to be migrated locally according to the data identifier before the source computer performs data migration, and only perform data migration when it does not exist, thereby effectively reducing the amount of data migrated between the source computer and the cloud platform server, reducing bandwidth, and effectively improving data migration efficiency. Moreover, in the data migration process of the source computer cluster, the resource pool is updated in real time, and the data richness of the resource pool is continuously improved. Since the data of the source computers in the same cluster are highly repetitive, the data matching success rate of the source computers that perform data migration later is relatively higher than that of the source computers that perform data migration earlier. That is, the source computers that perform data migration later receive fewer data requests from the cloud platform server, and the amount of data transmitted to the cloud platform server is smaller, and the data migration efficiency is higher. Moreover, as the data migration process of the cluster proceeds and the data richness of the resource pool increases, the data migration efficiency gradually increases, achieving the overall high efficiency of computer cluster data migration. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings: Figure 1 A process environment diagram of a data migration method in one embodiment; Figure 2 is another flow chart of a data migration method in one embodiment; Figure 3 An environment diagram of a data migration method in an embodiment; Figure 4 is a structural block diagram of a data migration device in one embodiment; Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0018] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0019] It should be noted that, in the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. In addition, the term "and / or" herein is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of objects.
[0020] With the development of cloud computing and virtualization technology, more and more enterprises and users choose to migrate physical computer resources to the cloud or migrate virtual computers from one cloud platform to another, avoiding users from redeploying and configuring cloud hosts in different locations, ensuring that users can manage computing resources more efficiently and reduce operation and maintenance costs.
[0021] Traditional physical to virtual (P2V) and virtual to virtual (V2V) technologies mainly mirror the entire disk data of the source computer and then convert it to the disk format of the virtual machine for full disk transmission. However, this method has the problems of bandwidth waste and low data conversion efficiency. Especially when migrating data for computer clusters with a large amount of data (for example, all computers in a company), low data conversion efficiency will lead to high time cost.
[0022] In one embodiment, Figure 1 As shown, a data migration method is provided, and this embodiment applies this method to a system including a source computer cluster and a cloud platform server. The cloud platform server can be a server or a server cluster; the cloud platform server runs a target cloud platform, that is, the cloud platform to which the data of the source computer is to be migrated. In this embodiment, the method includes the following steps: Step 101: Obtain configuration information of each source computer in a source computer cluster, and construct a target virtual machine corresponding to each source computer according to the configuration information.
[0023] In the present application, the source-end computer cluster includes at least one source-end computer.
[0024] The source computer is a physical machine or a virtual machine.
[0025] In an embodiment of the present application, a user can configure relevant information of the target cloud platform and the cloud platform server, such as IP address, port number, etc., through the operation interface of the management computer in the source computer cluster to establish a connection between each source computer in the source computer cluster and the target cloud platform, as well as a connection between each source computer and the cloud platform server.
[0026] Then, the cloud platform server can obtain the configuration information of each source computer through the above established connection. The configuration information includes at least one of host configuration information, network configuration information and disk partition information. Host configuration information includes the number of CPUs, memory size, etc.; network configuration information includes IP address, subnet mask, gateway address, DNS address, etc.; disk partition information includes disk capacity, disk partition table, etc.
[0027] Next, the cloud platform server can build a corresponding target virtual machine based on the configuration information of the source computer. Specifically, the host configuration, network configuration and disk partition of the target virtual machine can be set based on the configuration information of the source computer, and the target virtual machine can be run based on the created or locally obtained iso image file.
[0028] In a possible implementation, after the target virtual machine is created, the disk partition information of the target virtual machine can be detected based on the disk partition information of the source computer to ensure the integrity and accuracy of the disk partition of the target virtual machine, thereby ensuring the accuracy of subsequent data migration.
[0029] Step 102: data is migrated to each source computer in the source computer cluster in turn, and for each source computer, a file identifier of a disk data file of the source computer is received, and matching is performed in a resource pool according to the file identifier.
[0030] The resource pool includes the correspondence between different file identifiers and disk data files.
[0031] In the embodiment of the present application, after the target virtual machine is created, the cloud platform server can send a data transmission instruction to the source computer cluster, instructing each source computer to perform data migration in sequence. For each source computer, after receiving the data transmission instruction, the source computer first sends the file identifier of each file in the disk to the cloud platform server in sequence.
[0032] After receiving the file identifier, the cloud platform server first searches and compares the file identifier with the file identifiers of each file in the local resource pool to determine whether there is a file identifier in the local resource pool that is identical to the file identifier sent by the source computer, that is, to determine whether there is a disk data file that the source computer is preparing to migrate in the local resource pool.
[0033] The file identifier may be a message digest algorithm (MD5) feature value of the disk data file, which is not limited in the present embodiment, as long as the disk data file can be uniquely represented.
[0034] Step 103: If the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, the disk data file corresponding to the file identifier is requested, and the received disk data file is synchronized to the target virtual machine.
[0035] In the embodiment of the present application, a match is performed in the resource pool according to the file identifier, and the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, then the source computer needs to send the disk data file corresponding to the file identifier to the local (cloud platform server). Therefore, a data request is sent to the source computer, instructing the source computer to send the disk data file corresponding to the file identifier, and after receiving the disk data file, the disk data file is stored in the corresponding position of the disk of the target virtual machine to complete data synchronization, that is, data migration.
[0036] The disk data file includes at least one of file size, file name, file absolute path, file MD5 feature value, and disk data.
[0037] Step 104: Update the resource pool according to the disk data file, so that the next source computer performs data migration according to the updated resource pool.
[0038] In an embodiment of the present application, if the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, then after receiving the disk data file sent by the source computer, the disk data file is stored in the resource pool to update the resource pool and improve the richness of file resources in the local resource pool. When the next source computer performs data migration, it can be matched in the updated resource pool according to the file identifier.
[0039] That is, during the data migration process of the source computer cluster, the resource pool is updated in real time, and the data richness of the resource pool is constantly improving. Moreover, the data of the source computers in the same cluster has a high degree of repetitiveness. Therefore, the data matching success rate of the source computers that perform data migration later is relatively higher than that of the source computers that perform data migration earlier. That is, the source computers that perform data migration later receive fewer data requests from the cloud platform server, and the amount of data transmitted to the cloud platform server is smaller, and the data migration efficiency is higher. Moreover, as the data migration process of the cluster proceeds and the data richness of the resource pool increases, the data migration efficiency gradually increases.
[0040] In addition, for data migration of a source computer, you can also first send the file identifier to the cloud platform server, and match it in the resource pool based on the file identifier. If the match is unsuccessful, send the disk data corresponding to the file identifier to the cloud platform server; if the match is successful, the cloud platform server directly synchronizes the disk data corresponding to the file identifier in the resource pool to the target virtual machine, which effectively reduces the amount of data transmitted and improves data migration efficiency.
[0041] In a possible implementation, if the matching result is that the disk data file corresponding to the file identifier exists in the resource pool, the disk data file corresponding to the file identifier is searched in the resource pool, and the disk data file corresponding to the file identifier is synchronized to the target virtual machine. That is, matching is performed in the resource pool according to the file identifier, and the matching result obtained is that the disk data file corresponding to the file identifier exists in the resource pool, then there is no need to request specific disk data from the source computer, and only the file path and other information of the disk data file need to be obtained, and the disk data file corresponding to the file identifier in the local resource pool can be directly stored in the storage location corresponding to the file path in the target virtual machine.
[0042] In one possible implementation, during the data migration process, the data offset of each disk data file can be recorded. When the data migration is interrupted (for example, the network is disconnected), the data offset of the last disk data file sent can be recorded. After the connection is restored, the next disk data file to be migrated is determined based on the recorded data offset, and the transfer is resumed.
[0043] The specific breakpoint resume can be realized through the heartbeat mechanism, that is, the source computer continuously sends heartbeat messages to the cloud platform server to determine whether the connection between the source computer and the cloud platform server is disconnected. When the connection is detected to be disconnected, the source computer stops sending disk data files to the cloud platform server and records the data offset of the last disk data file sent. After the connection is restored, the next disk data file to be migrated is determined according to the recorded data offset, and the breakpoint resume is performed.
[0044] In a possible implementation, the current data migration progress, such as the percentage of disk data files that have completed migration, may be recorded and displayed.
[0045] The data migration method provided by the embodiment of the present application can obtain the configuration information of each source computer in the source computer cluster, and construct the target virtual machine corresponding to each source computer according to the configuration information; then, perform data migration on each source computer in the source computer cluster in turn, and for each source computer, receive the file identifier of the disk data file of the source computer, match it in the resource pool according to the file identifier, if the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, then request the disk data file corresponding to the file identifier, and synchronize the received disk data file to the target virtual machine; update the resource pool according to the disk data file, so that the next source computer performs data migration according to the updated resource pool. The embodiment of the present application can first determine whether there is data to be migrated locally according to the data identifier before the source computer performs data migration, and only perform data migration when it does not exist, thereby effectively reducing the amount of data migrated between the source computer and the cloud platform server, reducing bandwidth, and effectively improving data migration efficiency. Moreover, in the data migration process of the source computer cluster of the present application, the resource pool is updated in real time, and the data richness of the resource pool is continuously improved. Since the data of the source computers in the same cluster are highly repetitive, the data matching success rate of the source computers that perform data migration later is relatively higher than that of the source computers that perform data migration earlier. That is, the source computers that perform data migration later receive fewer data requests from the cloud platform server, and the amount of data transmitted to the cloud platform server is smaller, and the data migration efficiency is higher. Moreover, as the data migration process of the cluster proceeds and the data richness of the resource pool increases, the data migration efficiency gradually increases, achieving the overall high efficiency of computer cluster data migration.
[0046] The above-mentioned embodiment provides a solution for synchronizing the disk data file corresponding to the file identifier to the target virtual machine. In another embodiment of the present application, data synchronization can be performed based on the file path. This embodiment includes the following steps: Store the disk data to the target virtual machine's disk according to the file path.
[0047] In the embodiment of the present application, the disk data file includes at least disk data and a file path. When performing data synchronization, the corresponding position in the disk of the target virtual machine is determined according to the file path, and the disk data is stored at the position to complete the data migration.
[0048] In one embodiment, considering the situation where disk data of multiple source computers (which may be in the same cluster or different clusters) are migrated at the same time, the server needs to establish a mapping relationship between the source computers and the target virtual machines to achieve accurate data migration. This embodiment includes the following: Figure 2 Steps shown: Step 201: Construct a mapping relationship between a source computer and a target virtual machine.
[0049] Step 202: Determine the target virtual machine corresponding to the source computer according to the identifier of the source computer and the mapping relationship.
[0050] Step 203: Synchronize the disk data file to the target virtual machine corresponding to the source computer.
[0051] In the embodiment of the present application, after the target virtual machine is constructed based on the configuration information of the source computer, a mapping relationship between the source computer and the target virtual machine can be established according to the identification of the source computer and the identification of the target virtual machine. Before synchronizing the disk data file to the target virtual machine, the target virtual machine can be determined according to the identification of the source computer corresponding to the disk data file and the mapping relationship, and then the disk data file can be stored in the target virtual machine.
[0052] When the disk data of multiple source computers are migrated simultaneously by the method provided in the embodiment of the present application, the disk data files can be transferred based on the mapping relationship between the source computers and the target virtual machines, thereby effectively improving the accuracy of the disk data file migration.
[0053] In one embodiment, Figure 3 As shown, a data migration system is provided, which is applied to the data migration method described in the above embodiment, and the data migration system includes a source computer cluster 10 and a cloud platform server 20. The source computer cluster is used to send the configuration information of each source computer to the cloud platform server, and in response to the data migration request sent by the cloud platform server, send the file identifier of the disk data file of the source computer to the cloud platform server; and in response to the data request sent by the cloud platform server, send the disk data file corresponding to the file identifier to the cloud platform server. A cloud platform server is used to receive configuration information of each source computer and build a target virtual machine corresponding to each source computer according to the configuration information; send a data migration request to a source computer cluster, migrate data to each source computer in the source computer cluster in turn, and receive the file identifier of the disk data file of the source computer for each source computer, and match it in a resource pool according to the file identifier; the resource pool includes the correspondence between different file identifiers and disk data files; if the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, send a data request to the source computer, and synchronize the disk data file corresponding to the received file identifier to the target virtual machine; update the resource pool according to the disk data file, so that the next source computer performs data migration according to the updated resource pool.
[0054] In an embodiment of the present application, a user can configure relevant information of the target cloud platform and the cloud platform server, such as IP address, port number, etc., through the operation interface of the management computer in the source computer cluster to establish a connection between the source computer and the target cloud platform, as well as a connection between each source computer and the cloud platform server.
[0055] Then, the cloud platform server can obtain the configuration information of each source computer through the above established connection. The configuration information includes at least one of host configuration information, network configuration information and disk partition information. Host configuration information includes the number of CPUs, memory size, etc.; network configuration information includes IP address, subnet mask, gateway address, DNS address, etc.; disk partition information includes disk capacity, disk partition table, etc.
[0056] Next, the cloud platform server can build a corresponding target virtual machine based on the configuration information of the source computer. Specifically, the host configuration, network configuration and disk partition of the target virtual machine can be set based on the configuration information of the source computer, and the target virtual machine can be run based on the created or locally obtained iso image file.
[0057] After the target virtual machine is created, a data transfer instruction can be sent to the source computer cluster to instruct each source computer in the source computer cluster to start data migration in turn. For each source computer, after receiving the data transfer instruction, the source computer first sends the file identifiers of each file in the disk to the cloud platform server in turn.
[0058] After receiving the file identifier, the cloud platform server first searches and compares the file identifier with the file identifiers of each file in the local resource pool to determine whether there is a file identifier in the local resource pool that is identical to the file identifier sent by the source computer, that is, to determine whether there is a disk data file that the source computer is preparing to migrate in the local resource pool.
[0059] The file identifier may be a message digest algorithm (MD5) feature value of the disk data file, which is not limited in the present embodiment, as long as the disk data file can be uniquely represented.
[0060] According to the file identifier, a match is performed in the resource pool. If the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, the source computer needs to send the disk data file corresponding to the file identifier to the local (cloud platform server). Therefore, a data request is sent to the source computer, instructing the source computer to send the disk data file corresponding to the file identifier, and after receiving the disk data file, the disk data file is stored in the corresponding position of the disk of the target virtual machine to complete data synchronization, that is, data migration.
[0061] The disk data file includes at least one of file size, file name, file absolute path, file MD5 feature value, and disk data.
[0062] In an embodiment of the present application, if the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, then after receiving the disk data file sent by the source computer, the disk data file is stored in the resource pool to update the resource pool and improve the richness of file resources in the local resource pool. When the next source computer performs data migration, it can be matched in the updated resource pool according to the file identifier.
[0063] That is, during the data migration process of the source computer cluster, the resource pool is updated in real time, and the data richness of the resource pool is constantly improving. Moreover, the data of the source computers in the same cluster has a high degree of repetitiveness. Therefore, the data matching success rate of the source computers that perform data migration later is relatively higher than that of the source computers that perform data migration earlier. That is, the source computers that perform data migration later receive fewer data requests from the cloud platform server, and the amount of data transmitted to the cloud platform server is smaller, and the data migration efficiency is higher. Moreover, as the data migration process of the cluster proceeds and the data richness of the resource pool increases, the data migration efficiency gradually increases.
[0064] In addition, for data migration of a source computer, you can also first send the file identifier to the cloud platform server, and match it in the resource pool based on the file identifier. If the match is unsuccessful, send the disk data corresponding to the file identifier to the cloud platform server; if the match is successful, the cloud platform server directly synchronizes the disk data corresponding to the file identifier in the resource pool to the target virtual machine, which effectively reduces the amount of data transmitted and improves data migration efficiency.
[0065] In a possible implementation, if the matching result is that the disk data file corresponding to the file identifier exists in the resource pool, the disk data file corresponding to the file identifier is searched in the resource pool, and the disk data file corresponding to the file identifier is synchronized to the target virtual machine. That is, matching is performed in the resource pool according to the file identifier, and the matching result obtained is that the disk data file corresponding to the file identifier exists in the resource pool, then there is no need to request specific disk data from the source computer, and only the file path and other information of the disk data file need to be obtained, and the disk data file corresponding to the file identifier in the local resource pool can be directly stored in the storage location corresponding to the file path in the target virtual machine.
[0066] In one possible implementation, during the data migration process, the data offset of each disk data file can be recorded. When the data migration is interrupted (for example, the network is disconnected), the data offset of the last disk data file sent can be recorded. After the connection is restored, the next disk data file to be migrated is determined based on the recorded data offset, and the transfer is resumed.
[0067] The specific breakpoint resume can be realized through the heartbeat mechanism, that is, the source computer continuously sends heartbeat messages to the cloud platform server to determine whether the connection between the source computer and the cloud platform server is disconnected. When the connection is detected to be disconnected, the source computer stops sending disk data files to the cloud platform server and records the data offset of the last disk data file sent. After the connection is restored, the next disk data file to be migrated is determined according to the recorded data offset, and the breakpoint resume is performed.
[0068] In a possible implementation, the current data migration progress, such as the percentage of disk data files that have completed migration, may be recorded and displayed.
[0069] In the data migration system provided by the embodiment of the present application, the cloud platform server can obtain the configuration information of each source computer in the source computer cluster, and build the target virtual machine corresponding to each source computer according to the configuration information; then, data migration is performed on each source computer in the source computer cluster in turn, and for each source computer, the file identifier of the disk data file of the source computer is received, and the file identifier is matched in the resource pool. If the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, the disk data file corresponding to the file identifier is requested, and the received disk data file is synchronized to the target virtual machine; the resource pool is updated according to the disk data file, so that the next source computer performs data migration according to the updated resource pool. The embodiment of the present application can first determine whether there is data to be migrated locally according to the data identifier before the source computer performs data migration. If it does not exist, data migration is performed, thereby effectively reducing the amount of data migrated between the source computer and the cloud platform server, reducing bandwidth, and effectively improving data migration efficiency. Moreover, in the data migration process of the source computer cluster, the resource pool is updated in real time, and the data richness of the resource pool is continuously improved. Since the data of the source computers in the same cluster are highly repetitive, the data matching success rate of the source computers that perform data migration later is relatively higher than that of the source computers that perform data migration earlier. That is, the source computers that perform data migration later receive fewer data requests from the cloud platform server, and the amount of data transmitted to the cloud platform server is smaller, and the data migration efficiency is higher. Moreover, as the data migration process of the cluster proceeds and the data richness of the resource pool increases, the data migration efficiency gradually increases, achieving the overall high efficiency of computer cluster data migration.
[0070] It should be noted that although the operations of the method of the present invention are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0071] In one embodiment, Figure 4 As shown, a data migration device is provided, including: a construction module 301, a matching module 302 and a synchronization module 303, wherein: The construction module 301 is used to obtain the configuration information of each source computer in the source computer cluster, and to construct a target virtual machine corresponding to each source computer according to the configuration information.
[0072] The matching module 302 is used to migrate data for each of the source computers in the source computer cluster in turn, and for each of the source computers, receive the file identifier of the disk data file of the source computer, and match it in the resource pool according to the file identifier; the resource pool includes the correspondence between different file identifiers and disk data files.
[0073] The synchronization module 303 is used to request the disk data file corresponding to the file identifier if the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, and synchronize the received disk data file to the target virtual machine; The updating module 304 is used to update the resource pool according to the disk data file, so that the next source computer performs data migration according to the updated resource pool.
[0074] In one embodiment, the data migration device also includes a search module for searching the disk data file corresponding to the file identifier in the resource pool if the matching result is that a disk data file corresponding to the file identifier exists in the resource pool, and synchronizing the disk data file corresponding to the file identifier to the target virtual machine.
[0075] In one embodiment, the disk data file includes disk data and a file path, and the synchronization module 303 is specifically configured to store the disk data in the disk of the target virtual machine according to the file path.
[0076] In one embodiment, the disk data file includes an identifier of the source computer, and the synchronization module 303 is also used to construct a mapping relationship between the source computer and the target virtual machine; determine the target virtual machine corresponding to the source computer based on the identifier of the source computer and the mapping relationship; and synchronize the disk data file to the target virtual machine corresponding to the source computer.
[0077] In one embodiment, the file identifier is a message digest algorithm characteristic value.
[0078] It should be understood that the units or modules described in the data migration device are similar to those described in the reference Figure 1 The various steps in the described method correspond to each other. Therefore, the operations and features described above for the method are also applicable to the data migration device and the units contained therein, and will not be repeated here. The data migration device can be pre-implemented in the browser or other security applications of the electronic device, and can also be loaded into the browser or its security application of the electronic device by downloading or other means. The corresponding units in the data migration device can cooperate with the units in the electronic device to implement the solution of the embodiment of the present application.
[0079] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 400 of a terminal device or server suitable for implementing an embodiment of the present application.
[0080] like Figure 5 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage part 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the system 400 are also stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0081] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
[0082] In particular, according to the embodiments of the present disclosure, the above reference Figure 1 The described processes may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising a computer program for executing Figure 1 In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 409 and / or installed from the removable medium 411.
[0083] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium such as a computer-readable storage medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0084] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a different order from the order marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0085] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be arranged in a processor. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.
[0086] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the computer device described in the above embodiment, or may exist independently without being installed in the computer device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the method described in the present application. For example, it can be executed Figure 1 The individual steps of the method are shown.
[0087] The present application embodiment provides a computer program product, which includes instructions. When the instructions are executed, the method described in the present application embodiment is executed. For example, Figure 1 The individual steps of the method are shown.
[0088] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0089] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.
Claims
1. A data migration method, characterized in that: The method comprises: Obtaining configuration information of each source computer in the source computer cluster, and building a target virtual machine corresponding to each source computer according to the configuration information; Performing data migration on each of the source computers in the source computer cluster in turn, and receiving a file identifier of a disk data file of each source computer, and matching the file identifier in a resource pool according to the file identifier; the resource pool includes a correspondence between different file identifiers and disk data files; If the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, requesting the disk data file corresponding to the file identifier, and synchronizing the received disk data file to the target virtual machine; The resource pool is updated according to the disk data file, so that the next source computer performs data migration according to the updated resource pool.
2. The method according to claim 1, characterized in that The method further comprises: If the matching result is that the disk data file corresponding to the file identifier exists in the resource pool, the disk data file corresponding to the file identifier is searched in the resource pool, and the disk data file corresponding to the file identifier is synchronized to the target virtual machine.
3. The method according to claim 1 or 2, characterized in that: The disk data file includes disk data and a file path, and synchronizing the disk data file to the target virtual machine includes: The disk data is stored in the disk of the target virtual machine according to the file path.
4. The method according to claim 1 or 2, characterized in that: The disk data file includes an identifier of a source computer, and synchronizing the disk data file to the target virtual machine includes: Construct a mapping relationship between the source computer and the target virtual machine; Determining a target virtual machine corresponding to the source computer according to the identifier of the source computer and the mapping relationship; The disk data file is synchronized to the target virtual machine corresponding to the source computer.
5. The method according to claim 1, characterized in that The file identifier is a message digest algorithm characteristic value.
6. A data migration system, characterized in that: The data migration method according to any one of claims 1 to 5 is applied, wherein the system comprises a source-end computer cluster and a cloud platform server, The source computer cluster is used to send the configuration information of each source computer to the cloud platform server, and in response to the data migration request sent by the cloud platform server, send the file identifier of the disk data file of the source computer to the cloud platform server; and in response to the data request sent by the cloud platform server, send the disk data file corresponding to the file identifier to the cloud platform server; The cloud platform server is used to receive configuration information of each of the source computers, and build a target virtual machine corresponding to each of the source computers according to the configuration information; send a data migration request to the source computer cluster, perform data migration on each of the source computers in the source computer cluster in turn, and receive a file identifier of a disk data file of the source computer for each of the source computers, and perform matching in a resource pool according to the file identifier; the resource pool includes a correspondence between different file identifiers and disk data files; if the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, send a data request to the source computer, and synchronize the disk data file corresponding to the received file identifier to the target virtual machine; The resource pool is updated according to the disk data file, so that the next source computer performs data migration according to the updated resource pool.
7. A data migration device, characterized in that: The device comprises: A construction module, used to obtain configuration information of each source computer in the source computer cluster, and to construct a target virtual machine corresponding to each source computer according to the configuration information; A matching module, used to sequentially perform data migration on each of the source computers in the source computer cluster, and for each of the source computers, receive a file identifier of a disk data file of the source computer, and perform matching in a resource pool according to the file identifier; the resource pool includes a correspondence between different file identifiers and disk data files; a synchronization module, configured to request the disk data file corresponding to the file identifier if the matching result is that the disk data file corresponding to the file identifier does not exist in the resource pool, and synchronize the received disk data file to the target virtual machine; The updating module is used to update the resource pool according to the disk data file, so that the next source computer performs data migration according to the updated resource pool.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Cross-cloud platform virtual machine migration method and device, storage medium and electronic device
CN113835822A
Cross-cloud platform application migration system and method and disaster recovery method
CN114691290A
Virtual machine migration method and device, readable storage medium and computer equipment
CN114860389A
Virtual machine disk file migration method and system, storage medium and equipment
CN116560581A
Virtual-machine cold migration method and apparatus, electronic device and storage medium
US20230144949A1