Data migration method, device, apparatus, and storage medium

By assigning target servers to data migration tasks and controlling them to directly migrate data, the problem of long migration cycles and low efficiency caused by the installation and debugging of components in existing technologies is solved, and efficient and low-error-rate data migration is achieved.

CN115658650BActive Publication Date: 2026-04-21JINZHUAN INFORMATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINZHUAN INFORMATION TECHNOLOGY CO LTD
Filing Date
2022-10-26
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies require the installation and debugging of components for different database types during data migration, resulting in long migration cycles, low efficiency, and a high risk of errors.

Method used

By acquiring data migration tasks, assigning target servers, and controlling the target servers to migrate directly from the source database to the target database, the separate installation and debugging of different types of databases is avoided.

Benefits of technology

It shortened the data migration cycle, improved migration efficiency, reduced the error rate, and simplified the data migration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658650B_ABST
    Figure CN115658650B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a data migration method, device and equipment, and a storage medium. The method comprises: obtaining a data migration task for migrating to-be-migrated data from a source database to a target database; assigning a target server for the data migration task from each candidate server; and controlling the target server to migrate the to-be-migrated data from the source database to the target database. The above technical solution solves the problem of a relatively complicated and long data migration process caused by the need to install and debug multiple components for implementing the data migration function of a data migration tool, thereby helping to improve the efficiency of the data migration process and reduce the error rate in the data migration process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to data storage technology, and more particularly to a data migration method, apparatus, device and storage medium. Background Technology

[0002] With the rapid development of distributed databases in recent years, the types of databases used in production environments both domestically and internationally have gradually migrated from centralized databases to distributed databases. Correspondingly, due to the complex and varied characteristics of different databases and the diverse migration scenarios, higher demands are placed on database migration technologies, especially those for heterogeneous databases.

[0003] In existing technologies, data migration requires installing and debugging corresponding components for different database types, which results in a long migration cycle, low efficiency, and a high risk of errors. Summary of the Invention

[0004] This invention provides a data migration method, apparatus, device, and storage medium to shorten the data migration process cycle, improve the efficiency of data migration, and reduce the error rate of the data migration process.

[0005] In a first aspect, embodiments of the present invention provide a data migration method, comprising:

[0006] Retrieve data migration tasks that migrate data from the source database to the target database;

[0007] Assign a target server to the data migration task from among the candidate servers;

[0008] Control the target server to migrate the data to be migrated from the source database to the target database.

[0009] Secondly, embodiments of the present invention provide a data migration apparatus, comprising:

[0010] The data migration task acquisition module is used to acquire data migration tasks that migrate data from the source database to the target database.

[0011] The target server allocation module is used to allocate a target server for the data migration task from among the candidate servers;

[0012] The data migration module is used to control the target server to migrate the data to be migrated from the source database to the target database.

[0013] Thirdly, embodiments of the present invention provide an electronic device, including:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform any of the data migration methods provided in the embodiments of the present invention.

[0017] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute any of the data migration methods provided in the embodiments of the present invention.

[0018] This invention provides a data migration task that involves migrating data from a source database to a target database. The task is then assigned a target server from among candidate servers. The target server is then controlled to migrate the data from the source database to the target database. This solution allows for targeted allocation of a specific target server to each data migration task, enabling the migration of data from the source database to the target database. This eliminates the need to install and debug multiple components for different types of databases during the data migration process. It solves the problem of complex and time-consuming data migration processes caused by the need to install and debug multiple components for data migration tools, thus improving efficiency and reducing error rates.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of a data migration method provided in Embodiment 1 of the present invention;

[0022] Figure 2 This is a flowchart of a data migration method provided in Embodiment 2 of the present invention;

[0023] Figure 3A This is a flowchart of a data migration method provided in Embodiment 3 of the present invention;

[0024] Figure 3B This is a system framework diagram of an integrated web console provided in Embodiment 3 of the present invention;

[0025] Figure 4 This is a schematic diagram of the structure of a data migration device provided in Embodiment 4 of the present invention;

[0026] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "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 series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] Example 1

[0030] Figure 1 This is a flowchart illustrating a data migration method according to Embodiment 1 of the present invention. This embodiment is applicable to scenarios involving data migration in heterogeneous databases. The method can be executed by a data migration device, implemented in software and / or hardware, and can be configured in an electronic device. (See reference...) Figure 1 As shown, the method specifically includes the following steps:

[0031] S110. Obtain the data migration task that will migrate the data to be migrated from the source database to the target database.

[0032] The data to be migrated can be data from the source database that needs to be migrated to the target database. The source and target databases can be centralized or distributed databases; no specific limitations are imposed here. The task information corresponding to the data migration task may include the source database type, target database type, database table information corresponding to the data to be migrated, and configuration information for the data migration task. The configuration information for the data migration task may include account information with data query permissions for the source database and account information with data write permissions for the target database. The source and target database types can be one of Oracle, MySQL, or SQL Server, etc. Account information may include username and password.

[0033] Specifically, the operator can select the corresponding source database, target database, and data tables corresponding to the data to be migrated through the task console, and then fill in the relevant configuration information to obtain the corresponding data migration task. The task console can be the interface for creating data migration tasks within a preset data migration platform. The preset data migration platform can be a pre-configured control platform for data migration, such as an integrated World Wide Web (WWW) console.

[0034] S120. Assign a target server to the data migration task from among the candidate servers.

[0035] The candidate servers can be pre-configured servers available for data migration. Information about each candidate server can be stored in the machine resource library of the corresponding pre-defined data migration platform. The machine resource library can be a resource library that provides servers available for data migration for the corresponding data migration task. The target server can be at least one candidate server used to execute the corresponding data migration task.

[0036] Specifically, a mapping relationship between corresponding data migration tasks and corresponding target servers can be established in advance. Accordingly, based on this mapping relationship, the acquired data migration tasks can be matched with each candidate server, and the matched server can be used as the target server for the data migration task.

[0037] S130. Control the target server to migrate the data to be migrated from the source database to the target database.

[0038] Specifically, the source database, target database, and data to be migrated in the source database can be determined from the acquired data migration task. Correspondingly, based on the configuration information corresponding to the data migration task, the data to be migrated can be obtained by querying the database tables in the source database. Furthermore, by leveraging the pre-established mapping relationship between the source database, target database, and corresponding data migration process control policies, the control policy corresponding to the data migration task can be matched according to the determined source and target databases to control the target server to migrate the data from the source database to the target database.

[0039] This invention provides a data migration task that involves migrating data from a source database to a target database. The task is then assigned a target server from among candidate servers. The target server is then controlled to migrate the data from the source database to the target database. This solution allows for targeted allocation of a specific target server to each data migration task, enabling the migration of data from the source database to the target database. This eliminates the need to install and debug multiple components for different types of databases during the data migration process. It solves the problem of complex and time-consuming data migration processes caused by the need to install and debug multiple components for data migration tools, thus improving efficiency and reducing error rates.

[0040] Example 2

[0041] Figure 2 This is a flowchart of a data migration method provided in Embodiment 2 of the present invention. This embodiment is based on the above embodiment and has been further optimized. It should be noted that parts not described in detail in this embodiment can be referred to the relevant descriptions in other embodiments.

[0042] Furthermore, the operation of "assigning a target server for the data migration task from each candidate server" is refined to "assigning a target server for the data migration task from each candidate server according to the high availability weight of the data migration task and the resource status parameters of each candidate server", so as to improve the allocation mechanism of the corresponding target server.

[0043] refer to Figure 2 As shown, the method specifically includes the following steps:

[0044] S210. Obtain the data migration task that will migrate the data to be migrated from the source database to the target database.

[0045] S220. Based on the high availability weight of the data migration task and the resource status parameters of each candidate server, allocate a target server for the data migration task from each candidate server.

[0046] Among them, the high availability weight can be a parameter that characterizes the degree of high availability of the execution process of the corresponding data migration task. The resource status parameters can be parameter information that characterizes the status of each resource in the corresponding server, such as at least one of the following: operating system information, central processing unit (CPU) information, memory information, disk size information, and disk read / write performance information of the corresponding server.

[0047] Specifically, a mapping relationship can be pre-established between corresponding high availability weights, resource status parameters of each candidate server, and target servers. Accordingly, based on this mapping relationship, corresponding candidate servers can be matched according to the corresponding high availability weights and resource status parameters of each candidate server, and the matched candidate servers can be used as the target servers for the corresponding data migration tasks.

[0048] For example, the high availability weight may include a high watermark value and a low watermark value; correspondingly, according to the high availability weight of the data migration task and the resource status parameters of each candidate server, allocating a target server for the data migration task from each candidate server may include: determining whether the candidate server can be used to execute the data migration task according to the resource status parameters; if so, then using the candidate server as an available server; selecting at least two available servers as the target server; wherein the number of available servers included in the target server is not less than the high watermark value.

[0049] The high-water mark represents the minimum number of available target servers when the corresponding data migration task executes normally without alarms. The low-water mark represents the maximum number of available target servers when the corresponding data migration task fails to execute. Available servers can be candidate servers capable of executing the corresponding data migration task normally.

[0050] Specifically, appropriate judgment criteria can be pre-set for the corresponding resource status parameters as needed. This allows for the determination of whether a candidate server is suitable for performing a data migration task, based on these criteria and the resource status parameters of each candidate server. The judgment criteria can be set as needed and are not specifically limited here. Correspondingly, each candidate server deemed suitable for performing the data migration task can be designated as an available server for that task, and at least two of these available servers can be selected as the target servers for that task. The number of available servers included in the target server set can be set as needed, provided it is not less than the corresponding high-water mark value; no specific limitation is imposed here.

[0051] It is understood that, based on the resource status parameters, it is determined whether the candidate server can be used to execute the data migration task; if so, the candidate server is designated as an available server; at least two available servers are selected as the target servers; wherein the number of available servers included in the target servers is not less than the high-water mark. This technical solution ensures the normal execution of the corresponding data migration task by selecting a number of available servers not less than the corresponding high-water mark when allocating target servers for the corresponding data migration task. This avoids situations where the data migration task cannot be executed normally and / or alarms are generated due to an insufficient number of allocated target servers, thereby helping to improve the high availability of the corresponding data migration task.

[0052] S230. Control the target server to migrate the data to be migrated from the source database to the target database.

[0053] Typically, when migrating data between different databases, it is necessary to install multiple components for each database in the corresponding data migration tool and debug these components to achieve the data migration.

[0054] However, the data migration process described above is complex, resulting in a long migration cycle, low efficiency, and a high risk of errors. Therefore, the necessary execution functions for the data migration task itself can be introduced to simplify the subsequent data migration process. Accordingly, in one optional implementation, controlling the target server to migrate the data from the source database to the target database may include: determining the software to be installed based on the pre-defined execution functions required for the data migration task; installing the software on the target server, thereby controlling the target server to migrate the data from the source database to the target database based on the software to be installed.

[0055] The execution functions can be any of the functions required to perform the data migration task. The software to be installed can be the software that provides the corresponding execution functions.

[0056] Specifically, a mapping relationship can be pre-established between corresponding data migration tasks, execution functions, and software to be installed. Based on this mapping relationship, the corresponding execution function can be matched according to the acquired data migration task, and the corresponding software to be installed can be determined based on the execution function. The corresponding software to be installed is selected from the functional software library in the corresponding pre-set data migration platform and installed on the target server, so that the target server can migrate the data to be migrated from the source database to the target database according to the software to be installed. The functional software library can be a pre-set software library containing different types of software to be installed.

[0057] It is understood that by determining the software to be installed based on the pre-defined execution functions required for the data migration task, and installing the software on the target server, the target server is controlled to migrate the data to be migrated from the source database to the target database according to the software to be installed. This technical solution enables the migration of data from the source database to the target database during the data migration process by selecting the software to be installed that corresponds to the execution functions required for the corresponding data migration task. This avoids the need to install and debug corresponding components separately for different types of databases in the data migration tool, thereby simplifying the data migration process, shortening the migration cycle, and improving the efficiency of the data migration process.

[0058] This invention allocates a target server for a data migration task from among the candidate servers based on the high availability weight of the data migration task and the resource status parameters of each candidate server. By introducing a reference to the high availability weight of the corresponding data migration task and the resource status parameters of each candidate server when allocating a target server for the data migration task, the above technical solution ensures that the target server allocated to the corresponding data migration task meets the high availability requirements. This helps to avoid data migration failure due to server malfunctions, thereby improving the high availability of the corresponding data migration task.

[0059] Example 3

[0060] Figure 3A This is a flowchart of a data migration method provided in Embodiment 3 of the present invention. This embodiment is based on the above embodiments and has been further optimized. It should be noted that for parts not described in detail in this embodiment, please refer to the relevant descriptions in other embodiments.

[0061] Furthermore, the feature "the number of target servers is at least two" and the operation "identify abnormal servers among the target servers; repair the abnormal servers according to the high availability weight of the data migration task and the resource status parameters of each target server" are added to achieve the repair of target servers that are abnormal during the data migration process.

[0062] refer to Figure 3A As shown, the method specifically includes the following steps:

[0063] S310. Obtain the data migration task that migrates the data to be migrated from the source database to the target database.

[0064] S320. Assign a target server to the data migration task from each candidate server; wherein the number of target servers is at least two.

[0065] S330. Control the target server to migrate the data to be migrated from the source database to the target database.

[0066] S340. Identify the abnormal servers among the target servers.

[0067] An abnormal server can be a target server that is unable to perform the corresponding data migration task normally.

[0068] Specifically, based on the resource status parameters of the target server, pre-defined criteria can be established for determining whether a target server is abnormal. These criteria can be set as needed and are not specifically limited here. Accordingly, based on these criteria, the resource status parameters of the corresponding target server can be used to determine whether it is an abnormal server, thus enabling the identification of abnormal servers among the target servers.

[0069] S350. Repair the abnormal server according to the high availability weight of the data migration task and the resource status parameters of each target server.

[0070] Specifically, a mapping relationship can be pre-established between the high availability weight of the corresponding data migration task, the resource status parameters of each target server, and the determination result of whether abnormal servers need to be repaired. Accordingly, based on this mapping relationship, it can be determined whether abnormal servers need to be repaired based on the obtained high availability weight of the data migration task and the resource status parameters of each target server. If so, the abnormal servers are repaired; otherwise, they are not.

[0071] For example, repairing the abnormal server based on the high availability weight of the data migration task and the resource status parameters of each target server may include: determining the high availability parameter value of the data migration task based on the resource status parameters of each target server; and repairing the abnormal server based on the high availability weight of the data migration task and the high availability parameter value of the data migration task.

[0072] Among them, the high availability parameter value can be a parameter value that represents the number of available servers in each target server.

[0073] Specifically, a mapping relationship can be pre-established between the high availability weights and high availability parameter values ​​of the corresponding data migration tasks and the determination results of whether or not abnormal servers need to be repaired. Accordingly, based on this mapping relationship, it can be determined whether or not abnormal servers need to be repaired according to the obtained high availability weights and high availability parameter values ​​of the data migration tasks. If so, the abnormal servers are repaired; otherwise, they are not.

[0074] It is understood that the high availability parameter values ​​for the data migration task are determined based on the resource status parameters of each target server; and the abnormal servers are repaired based on the high availability weight and the high availability parameter values ​​of the data migration task. The above technical solution introduces a reference to the corresponding high availability parameter values ​​during the repair process of abnormal servers, improving the mechanism for repairing abnormal servers and avoiding situations where the repair of abnormal servers is not timely due to a lack of consideration for the number of available servers among the target servers. While ensuring the self-healing capability of servers failing during the data migration process, it also helps to improve the timeliness of repairing abnormal servers during the data migration process.

[0075] For example, the high availability weight may include a high watermark value and a low watermark value; repairing the abnormal server based on the high availability weight of the data migration task and the high availability parameter value of the data migration task may include: if the high availability parameter value is between the high watermark value and the low watermark value, then execute the data migration task and repair the abnormal server; if the high availability parameter value is less than the low watermark value, then suspend the execution of the data migration task and repair the abnormal server.

[0076] Specifically, based on the pre-set high availability weight of the data migration task, a high-water mark and a low-water mark corresponding to that high availability weight can be determined. These high-water mark and low-water mark values ​​are then compared with the determined high availability parameter values ​​for the corresponding data migration task. Based on the comparison result, the corresponding abnormal server is repaired. Specifically, if the comparison result shows the corresponding high availability parameter value is between the high-water mark and the low-water mark, the corresponding data migration task is executed normally while the abnormal server is repaired. If the comparison result shows the corresponding high availability parameter value is less than the low-water mark, the execution of the corresponding data migration task needs to be paused while the abnormal server is repaired. If the comparison result shows the corresponding high availability parameter value is greater than the high-water mark, the corresponding data migration task can be executed normally, and the abnormal server does not need to be repaired temporarily. Furthermore, before repairing the abnormal server, corresponding alarm information can be generated, allowing the backend to call the corresponding program code based on the alarm information to attempt to repair the abnormal server.

[0077] It is understood that when the high availability parameter value is between the high watermark value and the low watermark value, the data migration task is executed normally, and the abnormal server is repaired; when the high availability parameter value is less than the low watermark value, the data migration task is paused, and the abnormal server is repaired. The above technical solution, in the process of repairing abnormal servers, introduces the relationship between the high availability parameter value of the corresponding data migration task and the high watermark and low watermark values ​​included in the high availability weight, thereby more precisely defining the conditions for repairing the corresponding abnormal server, and thus helping to improve the precision of the repair process.

[0078] For example, after repairing the abnormal server, the method may further include: if the repair of the abnormal server fails, selecting a replacement server from the candidate servers other than the target server to replace the abnormal server in the target server.

[0079] The alternative server can be an available server among the candidate servers that can replace the abnormal server.

[0080] Specifically, if the faulty server is successfully repaired, the corresponding data migration task can continue to execute normally; if the faulty server fails to be repaired, a replacement server needs to be selected from all candidate servers other than the target server. This replacement server can replace the faulty server in the target server and participate in the execution of the corresponding data migration task.

[0081] It is understood that, when the repair of the abnormal server fails, a replacement server is selected from the candidate servers other than the target server to replace the abnormal server in the target server. This technical solution, when the repair of an abnormal server fails, can select a corresponding replacement server to replace the abnormal server, avoiding the situation where the corresponding data migration task cannot be executed normally due to the failure to repair the abnormal server, thereby helping to improve the self-healing and high availability of the corresponding data migration process.

[0082] This invention identifies abnormal servers among the target servers and repairs them based on the high availability weight of the data migration task and the resource status parameters of each target server. This technical solution can identify abnormal servers among the target servers and, by combining the high availability weight of the corresponding data migration task and the resource status parameters of each target server, repair the corresponding abnormal servers. This allows for timely and accurate repair of abnormal servers during the data migration process, preventing the normal execution of the data migration task from being affected by target server anomalies, thereby improving the self-healing and high availability of the data migration process.

[0083] The following description, using a pre-defined data migration platform as an integrated web console as an example, will illustrate the system framework of the corresponding pre-defined data migration platform with reference to the accompanying drawings. It should be noted that the settings related to this integrated web console are for illustrative purposes only and should not be construed as limiting the specific scope of the invention. For example... Figure 3B The diagram shown is a system framework diagram of an all-in-one web console. See further details. Figure 3BIt is understood that this integrated web console may include a machine resource library, a functional software library, a task console, and system configuration. The machine resource library may contain candidate servers and display their resource status parameters. For example, the machine resource library may include Server 1 and Server 2, and display at least one of their operating system information, CPU information, memory information, and disk information. Both Server 1 and Server 2 can be candidate servers. The functional software library may contain software packages with different execution functions and display the execution functions corresponding to each package. For example, the functional software library may include Package 1 and Package 2, where Package 1 supports collecting Oracle data and Package 2 supports replaying MySQL data. The software packages can be software to be installed. The task console can be used to create and issue corresponding data migration tasks. For example, a data migration task named "task1" can be created through the task console. The source database type can be set to Oracle, the target database type to MySQL, and the high availability weights to high 3 and low 1. The source database type can be the type of the source database; the target database type can be the type of the target database; and the high and low watermarks correspond to the high and low watermark values. The corresponding system configuration can include at least one of the following: system version, system upgrade check, and high availability configuration of the console itself.

[0084] Example 4

[0085] Figure 4 This is a schematic diagram of a data migration device according to Embodiment 4 of the present invention. This embodiment is applicable to scenarios involving data migration in heterogeneous databases. The device can be implemented in software and / or hardware and can be configured in an electronic device. (See reference...) Figure 4 As shown, the device includes:

[0086] The data migration task acquisition module 410 is used to acquire data migration tasks that migrate data from the source database to the target database.

[0087] The target server allocation module 420 is used to allocate a target server for the data migration task from among the candidate servers.

[0088] The data migration module 430 is used to control the target server to migrate the data to be migrated from the source database to the target database.

[0089] This invention provides a data migration task that involves migrating data from a source database to a target database. The task is then assigned a target server from among candidate servers. The target server is then controlled to migrate the data from the source database to the target database. This solution allows for targeted allocation of a specific target server to each data migration task, enabling the migration of data from the source database to the target database. This eliminates the need to install and debug multiple components for different types of databases during the data migration process. It solves the problem of complex and time-consuming data migration processes caused by the need to install and debug multiple components for data migration tools, thus improving efficiency and reducing error rates.

[0090] Optionally, the target server allocation module may include:

[0091] The target server allocation unit is used to allocate a target server for the data migration task from among the candidate servers according to the high availability weight of the data migration task and the resource status parameters of each candidate server.

[0092] Optionally, the number of target servers can be at least two; the apparatus may further include:

[0093] An abnormal server identification module is used to identify abnormal servers among the target servers.

[0094] The abnormal server repair module is used to repair the abnormal server based on the high availability weight of the data migration task and the resource status parameters of each target server.

[0095] Optionally, the abnormal server repair module may include:

[0096] A high availability parameter value determination unit is used to determine the high availability parameter value of the data migration task based on the resource status parameters of each target server.

[0097] An abnormal server repair unit is used to repair the abnormal server based on the high availability weight of the data migration task and the high availability parameter value of the data migration task.

[0098] Optionally, the high availability weight may include a high watermark value and a low watermark value; the abnormal server repair unit may include:

[0099] The first subunit for repairing abnormal servers is used to perform the data migration task and repair the abnormal server if the high availability parameter value is between the high watermark value and the low watermark value.

[0100] The abnormal server repair second sub-unit is used to suspend the data migration task and repair the abnormal server if the high availability parameter value is less than the low watermark value.

[0101] Optionally, after repairing the malfunctioning server, the apparatus may further include:

[0102] An abnormal server replacement module is used to select a replacement server from the candidate servers other than the target server to replace the abnormal server in the target server if the repair of the abnormal server fails.

[0103] Optionally, the data migration module may include:

[0104] The software to be installed determination unit is used to determine the software to be installed based on the pre-set execution functions required by the data migration task.

[0105] The data migration module is used to install the software to be installed into the target server, so as to control the target server to migrate the data to be migrated from the source database to the target database according to the software to be installed.

[0106] The data migration apparatus provided in this embodiment can execute any of the data migration methods provided in this embodiment, and has the corresponding functional modules and beneficial effects for executing the data migration method. For parts not described in detail in this embodiment, please refer to the relevant descriptions in other embodiments.

[0107] Example 5

[0108] Figure 5 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0109] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0110] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0111] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as data migration methods.

[0112] In some embodiments, the data migration method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data migration method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the data migration method by any other suitable means (e.g., by means of firmware).

[0113] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0114] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0115] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0117] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0118] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0119] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and no limitation is imposed herein.

[0120] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A data migration method, characterized in that, include: Retrieve data migration tasks that migrate data from the source database to the target database; Assign a target server to the data migration task from among the candidate servers; Control the target server to migrate the data to be migrated from the source database to the target database; The number of target servers is at least two; the method further includes: Identify the abnormal servers among the target servers; Based on the resource status parameters of each target server, determine the high availability parameter value for the data migration task; The abnormal server is repaired based on the high availability weight and high availability parameter value of the data migration task; wherein, the high availability weight of the data migration task is a parameter characterizing the high availability level corresponding to the execution process of the data migration task.

2. The method according to claim 1, characterized in that, The process of allocating a target server for the data migration task from among the candidate servers includes: Based on the high availability weight of the data migration task and the resource status parameters of each candidate server, a target server is assigned to the data migration task from each candidate server.

3. The method according to claim 1, characterized in that, The high availability weight includes a high watermark value and a low watermark value; the step of repairing the abnormal server based on the high availability weight of the data migration task and the high availability parameter value of the data migration task includes: If the high availability parameter value is between the high watermark value and the low watermark value, then the data migration task is executed, and the abnormal server is repaired. If the high availability parameter value is less than the low watermark value, the data migration task is suspended and the abnormal server is repaired.

4. The method according to any one of claims 1 and 3, characterized in that, After repairing the abnormal server, the method further includes: If the repair of the abnormal server fails, a replacement server is selected from the candidate servers other than the target server to replace the abnormal server in the target server.

5. The method according to claim 1, characterized in that, The step of controlling the target server to migrate the data to be migrated from the source database to the target database includes: Based on the pre-defined execution functions required for the data migration task, determine the software to be installed; The software to be installed is installed on the target server so that the target server can control the data to be migrated from the source database to the target database according to the software to be installed.

6. A data migration device, characterized in that, include: The data migration task acquisition module is used to acquire data migration tasks that migrate data from the source database to the target database. The target server allocation module is used to allocate a target server for the data migration task from among the candidate servers; The data migration module is used to control the target server to migrate the data to be migrated from the source database to the target database; The number of target servers is at least two; the device further includes: An abnormal server identification module is used to identify abnormal servers among the target servers. An abnormal server repair module is used to repair the abnormal server according to the high availability weight of the data migration task and the resource status parameters of each target server; wherein, the high availability weight of the data migration task is a parameter characterizing the high availability level corresponding to the execution process of the data migration task; The abnormal server repair module includes: A high availability parameter value determination unit is used to determine the high availability parameter value of the data migration task based on the resource status parameters of each of the target servers. An abnormal server repair unit is used to repair the abnormal server based on the high availability weight of the data migration task and the high availability parameter value of the data migration task.

7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the data migration method according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the data migration method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Database migration method and device

    CN110737717A