A data migration task execution method, a storage medium and an electronic device

By working together with the data migration platform and the task scheduling platform, the execution scripts of the dependencies are generated and executed, which solves the problem of data inaccuracy during the data migration process and achieves higher data migration accuracy and business service accuracy.

CN118885456BActive Publication Date: 2026-05-08MOBILE TECH COMPANY CHINA TRAVELSKY HLDG
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MOBILE TECH COMPANY CHINA TRAVELSKY HLDG
Filing Date
2024-07-05
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

During the data migration process, the database data is updated according to certain preset conditions, resulting in inaccurate data being migrated in, which affects the accuracy of business services.

Method used

By working together with the data migration platform and the task scheduling platform, the execution scripts of the dependencies are generated and executed. Data migration is carried out using offline synchronization tools for heterogeneous data sources, ensuring that data migration is performed when the dependency conditions are met.

Benefits of technology

This improved the accuracy of data migration and ensured the accuracy of business services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885456B_ABST
    Figure CN118885456B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data migration, and particularly relates to a data migration task execution method, a storage medium and an electronic device. The method comprises the following steps: a data migration middle platform generates a corresponding execution script according to obtained data migration information and sends the execution script to a task scheduling platform. The data migration middle platform generates a dependency relationship execution instruction corresponding to a new task ID according to the new task ID and task dependency configuration information, and sends the dependency relationship execution instruction to the task scheduling platform. The task scheduling platform runs the execution script to call a corresponding heterogeneous data source offline synchronization tool to perform data migration work when a corresponding dependency condition is reached according to the dependency relationship execution instruction. In the present application, corresponding dependency relationships can be added in any newly created data migration task, so as to more accurately and meticulously limit the execution conditions of the task, and finally the accuracy of the data obtained during data migration can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data migration, and in particular to a method for performing data migration tasks, a storage medium, and an electronic device. Background Technology

[0002] In existing technologies, when developing applications for specific business scenarios, engineers often encounter the issue of storing the business data. They typically choose different storage components based on factors such as project requirements, technology stack, performance requirements, cost budget, and team familiarity. For scenarios requiring transactional consistency and complex query capabilities, storage components suitable for storing structured data, such as MySQL, PostgreSQL, Oracle, and SQL Server, are chosen. For scenarios storing large amounts of unstructured data, such as images, videos, and backup files, storage components such as Amazon S3 and Azure Blob Storage can be selected.

[0003] Given this situation, when one business needs to use data from another, technical personnel typically need to use the corresponding storage components and develop corresponding programs to read and process the data before storing it in their own database for use—that is, data migration. However, because some databases update data according to certain preset conditions, the data obtained during the data migration process is the data before the update, leading to a certain degree of inaccuracy in the migrated data and ultimately resulting in inaccuracy in the corresponding business services. Summary of the Invention

[0004] To address the aforementioned technical problems, the technical solution adopted by this invention is as follows:

[0005] According to one aspect of the present invention, a method for executing a data migration task is provided, applied to a data migration system, the data migration system including a data migration platform and a task scheduling platform. The data migration platform and the task scheduling platform are connected in communication.

[0006] The method includes the following steps:

[0007] The data migration platform retrieves migration task configuration information. This configuration information includes data migration details and task dependency settings.

[0008] The data migration platform generates execution scripts for the data migration tasks based on the acquired data migration information. These execution scripts are used to invoke the corresponding heterogeneous data source offline synchronization tools to perform the data migration.

[0009] The data migration platform will send the execution script to the task scheduling platform.

[0010] The task scheduling platform performs compliance checks on the executed scripts and generates compliance results.

[0011] If the compliance result is that the inspection is passed, the task scheduling platform generates a new task ID for the data migration task corresponding to the migration task configuration information and sends it to the data migration platform.

[0012] The data migration platform generates the dependency execution instructions for the data migration task corresponding to the new task ID based on the new task ID and task dependency configuration information, and sends them to the task scheduling platform.

[0013] The task scheduling platform executes instructions based on dependencies. When the corresponding dependency conditions are met, it runs the execution script to call the corresponding heterogeneous data source offline synchronization tool to perform data migration.

[0014] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the above-described method for executing a data migration task.

[0015] According to a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method for performing a data migration task.

[0016] The present invention has at least the following beneficial effects:

[0017] In this invention, the execution script and dependency execution instructions corresponding to a new data migration task can be imported into a task scheduling platform. The task scheduling platform then executes the instructions according to the dependency relationships. When the corresponding dependency conditions are met, the execution script runs and calls the corresponding heterogeneous data source offline synchronization tool to perform the data migration. Therefore, this embodiment allows adding corresponding dependencies to any newly created data migration task, enabling more accurate and detailed restrictions on the task's execution conditions. Ultimately, this improves the accuracy of the data obtained during data migration, thereby enhancing the accuracy of the corresponding business services. Attached Figure Description

[0018] 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.

[0019] Figure 1 This is a flowchart of a multi-database data migration method provided in an embodiment of the present invention.

[0020] Figure 2 This is a flowchart illustrating a data migration task execution method provided in an embodiment of the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.

[0022] As one possible embodiment of the present invention, such as Figure 1 As shown, a multi-database data migration method is provided, applied to a data migration system. The data migration system includes multiple databases and corresponding storage components for each database. The multiple databases are used to store different business data, and the databases differ in type. Each database includes multiple data tables.

[0023] The multi-database data migration method in this embodiment can be the specific method for the task information acquisition module in the data migration system. It is mainly used to quickly and conveniently establish the migration task information corresponding to the data migration based on the simple and necessary parameters of the migration task input by the user, so as to facilitate the execution of the subsequent migration task. Specifically, the method includes the following steps:

[0024] S100: Data Retrieval Command. This command is entered by the user based on their specific needs. Typically, this command indicates which fields in the existing database the user requires data from, i.e., specifying the fields to be migrated.

[0025] Typically, the fields to be migrated can be fields contained in a table within a database, or they can be new fields created by processing multiple different fields. Of course, these fields can also come from different tables within the same database.

[0026] Specifically, when the data reading instruction is an SQL operation instruction, multiple different fields can be processed to form new fields, thereby increasing the richness of the acquired data and thus improving the availability of the data.

[0027] The following steps, S200 to S400, describe the methods for determining the fields to be migrated when the data read instruction is an SQL operation instruction:

[0028] S200: If the data read instruction is an SQL operation instruction, the Druid library is used to parse the SQL operation instruction and generate a parsing result. The parsing result includes the operation result field and the storage location information corresponding to the data supply field. The storage location information includes the storage table name and the storage field name. The SQL operation instruction is used to indicate the preset operation to be performed after reading the value of the corresponding data supply field in the database.

[0029] The SQL operation commands mentioned above can be customized by the user according to their own needs. SQL (Structured Query Language) is a standard language for managing relational databases, capable of representing and executing various database operations. The Druid library, an open-source tool from Alibaba, provides a powerful SQL parsing module that can parse SQL statements into an Abstract Syntax Tree (AST), which is extremely useful for tasks such as SQL statement analysis, optimization, and rewriting. Using the Druid library for SQL parsing in this step allows for more accurate determination of various user-defined operation fields (i.e., operation result fields) and the corresponding storage locations of the data supply fields.

[0030] Specifically, let's take the SQL operation command for adding different fields in two different tables as an example for SQL parsing:

[0031] The SQL operation commands entered are as follows:

[0032] SELECT

[0033] TableA.common_field,(TableA.field1+TableB.field2)AS sum_of_fields

[0034] FROM

[0035] TableA

[0036] INNER JOIN

[0037] TableB ON TableA.common_field=TableB.common_field;

[0038] In this example:

[0039] INNER JOIN is used to link TableA and TableB based on the common_field field.

[0040] TableA.field1+TableB.field2 calculates the sum of these two fields in each row of the linked records.

[0041] AS sum_of_fields assigns an alias to the calculated sum, making it easier to identify in the query results.

[0042] In practical applications, users need to adjust the above SQL operation commands according to the specific table structure and relationship logic. This allows users to more flexibly analyze and process existing data, generating new data that is more meaningful and applicable.

[0043] S300: Verify SQL operation commands based on storage location information.

[0044] Verification processing includes:

[0045] S301: Use the corresponding storage component to retrieve the original field set corresponding to the table name stored in the database. The database can be a Hive, MySQL, Oracle, or Doris database.

[0046] S302: If the stored field name is a subset of the original field set, the validation passes.

[0047] S303: If the intersection of the stored field name and the original field set is empty, a default error message will be generated indicating that there is an error in the generated SQL operation command.

[0048] S400: If the verification passes, the operation result field will be used as the field to be migrated.

[0049] S300 performs SQL operation command verification based on the field attribution relationship. Since SQL operation commands are user-written commands, they may contain errors. Therefore, S300 verification can ensure the accuracy of the fields to be migrated subsequently obtained.

[0050] In addition, when the data read instruction is for locating data table information, the original standard fields in the data table can be quickly extracted by following the steps in S210 to S230, so that users can perform corresponding add or delete operations according to their own needs.

[0051] S210: If the data read instruction is data table location information, which includes database ID and data table ID, then the corresponding storage component is called according to the database ID to read the data table to be migrated corresponding to the data table ID, and the original field set of the data table to be migrated corresponding to the data table ID is generated.

[0052] To retrieve all field information from an existing table in a database, you would typically use an SQL query or a database management tool. The storage component in this step is for database management tasks.

[0053] Most database management tools (such as MySQL Workbench, Oracle SQL Developer, SQL Server Management Studio, etc.) provide a graphical interface that allows you to directly view the structure of database tables, including all field names, data types, lengths, and whether null values ​​are allowed. Simply connect to the database, select the target database and table, and you can usually see this detailed information under tabs such as "Design" or "Table Information".

[0054] S220: In response to field add / delete commands, perform add / delete operations on the corresponding fields in the original field set.

[0055] S230: Use the remaining fields as fields to be migrated.

[0056] S500: Based on the data write command, retrieve the target receiving field corresponding to the data to be written to the database. The database to be written to can be a Hive database, a MySQL database, an Oracle database, a Doris database, an HDFS database, or an Elasticsearch database.

[0057] The S500 includes:

[0058] S501: Obtain the data table location information corresponding to the target received data table. The data table location information includes: database ID and data table ID.

[0059] S502: Based on the database ID, call the corresponding storage component to read the target receiving data table corresponding to the data table ID, and generate the original field set of the target receiving data table corresponding to the data table ID.

[0060] S503: In response to field add / delete commands, perform add / delete operations on the corresponding fields in the original field set.

[0061] S504: Use the remaining fields as the target receive fields.

[0062] Since in actual data migration, it is generally not necessary to modify the data in the target receiving data table, only the fields that need to be imported need to be determined. Therefore, this process can be the same as the steps in S210 to S230.

[0063] S600: Establish a mapping relationship between the field to be migrated and the target receiving field, and perform data migration based on the mapping relationship.

[0064] The S600 includes:

[0065] S601: Get task dependency configuration information.

[0066] S602: When the conditions restricted by the task dependency configuration information are met, data migration is performed according to the mapping relationship.

[0067] Task dependency configuration information can be used to limit the execution conditions of corresponding data migration tasks. Since data migration requires retrieving data from corresponding data tables, and some data tables are updated in real time, data migration is usually performed after the data tables are updated to ensure data accuracy. These conditions constitute the task dependencies. Therefore, the following example is provided to better execute data migration tasks based on dependencies.

[0068] As another possible embodiment of the present invention, such as Figure 2 As shown, a method for executing data migration tasks is also provided, applied to a data migration system. The data migration system also includes a data migration platform and a task scheduling platform. Communication is established between the data migration platform and the task scheduling platform. The task scheduling platform is the Apache DolphinScheduler task scheduling platform.

[0069] Apache DolphinScheduler is a distributed, scalable, and visual DAG workflow task scheduling open-source system. Suitable for enterprise-level scenarios, it provides a solution for visually managing tasks, workflows, and the entire lifecycle of data processing. Apache DolphinScheduler aims to resolve complex big data task dependencies and provide applications with data and relationships in various OPS orchestrations. It addresses the problem of complex ETL (Extract, Transform, Load) dependencies in data development, making it difficult to monitor task health. DolphinScheduler assembles tasks in a DAG (Directed Acyclic Graph) streaming manner, enabling real-time monitoring of task execution status and supporting operations such as retrying, resuming failed tasks at specified nodes, pausing, resuming, and terminating tasks.

[0070] The data migration task execution method includes the following steps:

[0071] W100: The data migration platform obtains migration task configuration information. This configuration information includes data migration information and task dependency configuration information. In this embodiment, the data migration information refers to the mapping relationship established between the fields to be migrated and the target receiving fields in the previous embodiment.

[0072] The migration task configuration information is the information obtained from the above embodiments.

[0073] Specifically, the task dependency configuration information includes the dependent task ID.

[0074] W101: Obtain the task ID as follows:

[0075] W102: Obtain the dependency task ID corresponding to each newly created data migration task through the task scheduling platform.

[0076] The task scheduling platform in this implementation manages multiple tasks, including established data migration tasks and other tasks such as database data update tasks. These existing tasks typically carry dependency hints. Therefore, when a new data migration task needs to use the data from these tasks, the corresponding task dependency configuration information can be written based on the dependency hints.

[0077] Since the newly created data migration task has not yet been processed by the task scheduling platform, it has not been assigned a corresponding new task ID. Therefore, the task dependency configuration information is currently missing the new task ID.

[0078] W200: The data migration platform generates execution scripts for data migration tasks based on the acquired data migration information. These scripts then call the corresponding heterogeneous data source offline synchronization tool to perform the data migration. The heterogeneous data source offline synchronization tool is DataX. DataX is an open-source heterogeneous data source offline synchronization tool from Alibaba, dedicated to achieving stable and efficient data synchronization between various heterogeneous data sources, including relational databases (MySQL, Oracle, etc.), HDFS, Hive, ODPS, HBase, and FTP.

[0079] Since the basic data migration configuration information in the migration task configuration information is complete, an execution script can be generated from this information. This script is used by heterogeneous data source offline synchronization tools (such as DataX) to migrate and synchronize data between different databases according to the existing data migration information.

[0080] W300: The data migration platform will send the execution script to the task scheduling platform.

[0081] W400: The task scheduling platform performs compliance checks on the executed scripts and generates compliance results.

[0082] W500: If the compliance result is that the verification is passed, the task scheduling platform will generate a new task ID for the data migration task corresponding to the migration task configuration information and send it to the data migration platform.

[0083] After generating compliance results, the method also includes:

[0084] W501: If the compliance result is a failure to pass the inspection, the task scheduling platform will generate a preset alarm message for the data migration task corresponding to the migration task configuration information and send it to the data migration platform. This preset alarm message is used to indicate that there is a problem with the corresponding execution script, which needs to be corrected and then uploaded again.

[0085] In the data migration system of this embodiment, the task scheduling platform ultimately manages these newly created data migration tasks. Therefore, the generated execution scripts need to be sent to the task scheduling platform for subsequent scheduling. Of course, in this embodiment, the task scheduling platform itself also needs to check the compliance of the execution scripts to ensure that each execution script stored on it is a normally functioning script, thus guaranteeing the normal startup of subsequent tasks. Simultaneously, if the execution script is compliant, a new task ID is generated to uniquely represent the task corresponding to that execution script, and this new task ID is returned to the data migration platform.

[0086] W600: The data migration platform generates the dependency execution instructions for the data migration task corresponding to the new task ID based on the new task ID and task dependency configuration information, and sends them to the task scheduling platform.

[0087] After receiving a new task ID, the data migration platform can use this new task ID to complete the original task dependency configuration information that contains missing information. Specifically, the new task ID is entered into the location where the ID needs to be changed in the task dependency configuration information. Then, based on the completed task dependency configuration information, the corresponding dependency execution instructions can be generated.

[0088] W700: The task scheduling platform executes instructions based on dependencies. When the corresponding dependency conditions are met, it runs the execution script to call the corresponding heterogeneous data source offline synchronization tool to perform data migration.

[0089] In this embodiment, the execution script and dependency execution instructions corresponding to the new data migration task can be imported into the task scheduling platform. The task scheduling platform then executes the instructions according to the dependency relationships. When the corresponding dependency conditions are met, the execution script runs to call the corresponding heterogeneous data source offline synchronization tool to perform the data migration. Therefore, this embodiment can add corresponding dependencies to any newly created data migration task, so as to more accurately and meticulously restrict the execution conditions of the task, ultimately improving the accuracy of the data obtained during data migration.

[0090] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0091] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0092] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.

[0093] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuits,” “modules,” or “systems.”

[0094] An electronic device according to this embodiment of the invention. The electronic device is merely an example and should not be construed as limiting the functionality or scope of the embodiments of the invention.

[0095] Electronic devices are manifested in the form of general-purpose computing devices. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and buses connecting different system components (including memory and processor).

[0096] The memory stores program code that can be executed by a processor, causing the processor to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of the present invention.

[0097] The storage may include readable media in the form of volatile storage, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).

[0098] The storage may also include programs / utilities having a set (at least one) of program modules, including but not limited to: an operating system, one or more applications, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0099] A bus can represent one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of the various bus architectures.

[0100] The electronic device can also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication can be performed via input / output (I / O) interfaces. Furthermore, the electronic device can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. The network adapter communicates with other modules of the electronic device via a bus. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0101] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the embodiments of this disclosure.

[0102] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the present invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the present invention described in the "Exemplary Methods" section above.

[0103] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0104] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0105] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0106] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0107] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0108] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0109] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for executing a data migration task, characterized in that, The system is applied to a data migration system, which includes a data migration platform and a task scheduling platform; the data migration platform and the task scheduling platform are connected in communication. The data migration platform acquires migration task configuration information; the migration task configuration information includes data migration information and task dependency configuration information. The data migration platform generates an execution script corresponding to the data migration task based on the acquired data migration information. The execution script is used to call the corresponding heterogeneous data source offline synchronization tool to perform data migration. The data migration platform will send the execution script to the task scheduling platform; The task scheduling platform performs compliance checks on the executed scripts and generates compliance results. If the compliance result is that the verification is passed, the task scheduling platform generates a new task ID for the data migration task corresponding to the migration task configuration information and sends it to the data migration platform. The data migration platform generates the dependency execution instructions for the data migration task corresponding to the new task ID based on the new task ID and the task dependency configuration information, and sends them to the task scheduling platform. The task scheduling platform executes instructions according to the dependency relationship. When the corresponding dependency condition is met, the execution script is run to call the corresponding heterogeneous data source offline synchronization tool to perform data migration. The data migration information is obtained using the following method: Obtain data read instructions; If the data reading instruction is an SQL operation instruction, the Druid library is used to perform SQL parsing on the SQL operation instruction to generate a parsing result. The parsing result includes the storage location information corresponding to the operation result field and the data supply field. The storage location information includes the storage table name and the storage field name. The SQL operation instruction is used to indicate that a preset operation is performed after reading the value of the corresponding data supply field in the database. The SQL operation command is validated based on the storage location information. If the verification passes, the operation result field will be used as the field to be migrated. Based on the data write command, obtain the target receiving field corresponding to be written to the database.

2. The method according to claim 1, characterized in that, The task scheduling platform is the Apache DolphinScheduler task scheduling platform.

3. The method according to claim 1, characterized in that, The heterogeneous data source offline synchronization tool is the DataX heterogeneous data source offline synchronization tool.

4. The method according to claim 1, characterized in that, The task dependency configuration information includes the dependent task ID; The dependent task ID is obtained according to the following steps: The task scheduling platform is used to obtain the dependency task ID corresponding to each newly created data migration task.

5. The method according to claim 1, characterized in that, After generating compliance results, the method further includes: If the compliance result is that the inspection fails, the task scheduling platform generates a preset alarm message for the data migration task corresponding to the migration task configuration information and sends it to the data migration platform.

6. The method according to claim 1, characterized in that, After obtaining the original field set corresponding to the table name stored in the database, the method further includes: If the intersection of the stored field name and the original field set is empty, a preset prompt message indicating an error will be generated for the SQL operation instruction.

7. A non-transitory computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements a method for executing a data migration task as described in any one of claims 1 to 6.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a method for executing a data migration task as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Program script migration method and device, computer equipment and storage medium

    CN113296835A

  • Data synchronization system, method and device and storage medium

    CN118069609A