Data migration method and device

Through automated data migration methods and devices, in response to migration messages, create migration tasks and perform data comparisons, the problems of cumbersome data migration process and lack of automation in the existing technology are solved, and efficient and accurate data migration is achieved.

CN119938632APending Publication Date: 2025-05-06BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311451636.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-02
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The existing data migration plan has cumbersome processes and lacks automated migration methods, making it difficult to grasp the progress of data migration in real time.

Method used

Provide a data migration method and device. By responding to migration messages, determine migration scenarios and business categories, obtain pre-configured migration configuration information, create migration tasks, query data to be migrated and store in the database, transmit data according to preset conditions and compare them to obtain migration results.

Benefits of technology

An automated migration solution is realized, which reduces communication costs at the business level, can provide real-time feedback on migration progress, and improves the efficiency and accuracy of data migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938632A_ABST
    Figure CN119938632A_ABST
Patent Text Reader

Abstract

The invention discloses a data migration method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the following steps: in response to a received migration message, determining a migration scene and a service type corresponding to the migration message according to migration object description information; acquiring migration configuration information configured for the migration scene and the service category, and creating a migration task according to the migration configuration information and the migration message; querying to-be-migrated data of the migration task from an emigration party based on the migration object description information, and storing the queried to-be-migrated data in a database; transmitting the to-be-migrated data in the database to an immigration party in a preset format under the condition that the migration execution condition is met; and after the transmission is completed, comparing the data to be migrated between the database and the immigration party to obtain a migration result of the migration task. According to the embodiment, a universal automatic migration scheme considering factors such as migration scenes and service types can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data migration method and device. Background Art

[0002] Data migration is required in scenarios such as system integration, upgrade, and reconstruction to ensure data integrity. The existing data migration solution process is cumbersome. The data migration party and the data migration party need to conduct multiple combing of scenarios, businesses, and data before executing the migration. The migration method is mainly manual and lacks automated migration methods. In addition, it is difficult to grasp the migration progress of each data granularity in real time to optimize the data migration process. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a data migration method and device, which can implement a general automated migration solution that takes into account factors such as migration scenarios and business categories.

[0004] To achieve the above objective, according to one aspect of the present invention, a data migration method is provided.

[0005] The data migration method of the embodiment of the present invention includes: in response to receiving a migration message including an out-migrant identifier, an in-migrant identifier, and migration object description information, determining a migration scenario and a business category corresponding to the migration message according to the migration object description information; obtaining migration configuration information pre-configured for the migration scenario and the business category, and creating at least one migration task according to the migration configuration information and the migration message; querying the data to be migrated of the migration task from the out-migrant based on the migration object description information, and storing the queried data to be migrated in a preset database; transmitting the data to be migrated in the database to the in-migrant in a preset format when a preset migration execution condition is met; after the transmission is completed, performing a comparison of the data to be migrated between the database and the in-migrant to obtain a migration result of the migration task.

[0006] Optionally, the data to be migrated of the migration task includes: task data, detailed data subordinate to the task data and parameter data subordinate to the detailed data; and the queried data to be migrated is stored in a preset database, including: storing the task data in a first database table; storing the detailed data in a second database table; and storing the parameter data in a third database table.

[0007] Optionally, the migration message is issued by the master control end; the task data includes a task identifier and a task migration status, the detail data includes a task identifier, a detail identifier, a data record primary key and a detail migration status, and the parameter data includes a detail identifier, parameter detail data and a parameter migration status; and the method further includes: updating the task migration status of the task data in the first database table, the detail migration status of the detail data in the second database table, and the parameter migration status of the parameter data in the third database table according to the current migration progress; synchronizing the updated task migration status, detail migration status, parameter migration status and the migration result to the master control end.

[0008] Optionally, the migration configuration information includes: dependencies between the migration scenarios; and the method further includes: after creating multiple migration tasks, determining dependencies between the multiple migration tasks based on the dependencies between the migration scenarios, and determining the execution order of the multiple migration tasks using the determined dependencies between the multiple migration tasks.

[0009] Optionally, when preset migration execution conditions are met, transmitting the data to be migrated in the database to the migrating party in a preset format includes: when the current migration task has no dependent tasks that have not been successfully migrated, transmitting the data to be migrated of the current migration task to the migrating party.

[0010] Optionally, performing the comparison of the data to be migrated between the database and the migrating party includes: converting the data to be migrated in the database into first-category data in a standard comparison format, converting the data to be migrated of the migrating party into second-category data in a standard comparison format, and using a preset data object comparison tool to compare the first-category data with the second-category data.

[0011] To achieve the above objective, according to another aspect of the present invention, a data migration device is provided.

[0012] The data migration device of the embodiment of the present invention includes: a preprocessing unit, which is used to: in response to receiving a migration message including an out-migrant identifier, an in-migrant identifier, and migration object description information, determine the migration scenario and business category corresponding to the migration message according to the migration object description information; a creation unit, which is used to obtain migration configuration information pre-configured for the migration scenario and the business category, and create at least one migration task according to the migration configuration information and the migration message; query the data to be migrated of the migration task from the out-migrant based on the migration object description information, and store the queried data to be migrated in a preset database; an execution unit, which is used to: when a preset migration execution condition is met, transmit the data to be migrated in the database to the in-migrant in a preset format; after the transmission is completed, perform a comparison of the data to be migrated between the database and the in-migrant to obtain a migration result of the migration task.

[0013] Optionally, the data to be migrated of the migration task includes: task data, detailed data subordinate to the task data, and parameter data subordinate to the detailed data; and the creation unit is further used to: store the task data in a first database table, store the detailed data in a second database table, and store the parameter data in a third database table.

[0014] To achieve the above objective, according to another aspect of the present invention, an electronic device is provided.

[0015] An electronic device of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the data migration method provided by the present invention.

[0016] To achieve the above objective, according to yet another aspect of the present invention, a computer-readable storage medium is provided.

[0017] A computer-readable storage medium of the present invention stores a computer program, which implements the data migration method provided by the present invention when executed by a processor.

[0018] According to the technical solution of the present invention, the embodiments of the above invention have the following advantages or beneficial effects:

[0019] After receiving the migration message sent by the master control end, the data migration component determines the migration scenario and business category corresponding to the migration message according to the migration object description information therein, creates a migration task using the migration configuration information and migration message pre-configured for the migration scenario and business category, and queries the data to be migrated of the migration task from the emigrant party based on the migration object description information, and stores the queried data to be migrated in the preset database. After that, if the preset migration execution conditions are met, the data migration component transfers the data to be migrated in the database to the emigrant party in a preset format; after the transmission is completed, the data migration component performs a comparison of the data to be migrated between the database and the emigrant party, and then obtains the migration result of the migration task. Through the above steps, the communication cost of the data migration participants at the business level is avoided or reduced, and a general automated migration solution considering factors such as migration scenarios and business categories is realized. The new migration job only needs to send a migration message to the master control end to complete the entire data migration process through the preset corresponding migration steps, and execute the migration steps at multiple granularities of task data, detailed data and parameter data, and feedback the migration progress to the master control end in real time, so that the staff can grasp the current migration progress in a timely manner.

[0020] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0022] Figure 1 Schematic diagram of main steps of the data migration method in an embodiment of the present invention;

[0023] Figure 2 is a schematic diagram of the overall process of the data migration method in an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of a migration task creation process according to an embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of a migration task preparation process according to an embodiment of the present invention;

[0026] Figure 5 is a schematic diagram of a migration task execution process according to an embodiment of the present invention;

[0027] Figure 6 is a schematic diagram of a migration task comparison process according to an embodiment of the present invention;

[0028] Figure 7 It is a schematic diagram of components of a data migration device in an embodiment of the present invention;

[0029] Figure 8is an exemplary system architecture diagram in which embodiments of the present invention may be applied;

[0030] Fig. 9 It is a schematic diagram of the structure of an electronic device used to implement the data migration method in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0032] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.

[0033] Figure 1 Schematic diagram of main steps of a data migration method according to an embodiment of the present invention.

[0034] like Figure 1 As shown, the data migration method of the embodiment of the present invention can be specifically performed according to the following steps:

[0035] Step S101: in response to receiving a migration message including a migrating party identifier, a migrating party identifier, and migration object description information, determining a migration scenario and a service category corresponding to the migration message according to the migration object description information.

[0036] In this step, the migration object description information refers to the information describing and locating the data to be migrated, and the migration scenario refers to the execution scenario for the migration job, such as user migration scenario, merchant migration scenario, store migration scenario, order migration scenario, product migration scenario, etc. Business category, i.e. business line, refers to the category of data migration at the business level. In actual applications, the data migration component obtains the above migration messages from the master control end.

[0037] Step S102: obtaining migration configuration information pre-configured for the migration scenario and the business category, creating at least one migration task based on the migration configuration information and the migration message; querying the data to be migrated of the migration task from the migrating party based on the migration object description information, and storing the queried data to be migrated in a preset database.

[0038] In this step, the data migration component obtains the migration configuration information pre-configured for the above migration scenarios and the above business categories from the configuration end (which can be implemented based on a cache such as Redis). Exemplarily, the migration configuration information may include the dependency between the migration scenarios and the migration speed corresponding to the migration scenario and business category (for example, the amount of data used as a unit to perform the migration). Thereafter, the data migration component creates at least one migration task based on the migration configuration information and the migration message to master the entire data migration process, and queries the data to be migrated of the migration task from the emigrant party based on the migration object description information, and stores the queried data to be migrated in a preset database.

[0039] As a preferred solution, the data to be migrated of the above migration task may include: task data, detailed data subordinate to the task data, and parameter data subordinate to the detailed data. The storage step of the above data to be migrated may be as follows: the data migration component stores the task data in a first database table, the detailed data in a second database table, and the parameter data in a third database table.

[0040] Preferably, after creating multiple migration tasks, the data migration component can determine the dependencies between the multiple migration tasks based on the dependencies between the migration scenarios, and use the determined dependencies between the multiple migration tasks to determine the execution order of the multiple migration tasks. For example, the dependencies between migration tasks are that the merchant data can only be migrated after the user data migration is completed, so the merchant migration task depends on the user migration task.

[0041] Step S103: When the preset migration execution conditions are met, the data to be migrated in the database is transmitted to the migrating party in a preset format; after the transmission is completed, the data to be migrated is compared between the database and the migrating party to obtain the migration result of the migration task.

[0042] In actual applications, when there is no dependent task that has not been successfully migrated for the current migration task, the data migration component can transfer the data to be migrated of the current migration task to the migrating party. After the transfer is completed, the data migration component can perform a comparison of the data to be migrated between the database and the migrating party. Optionally, the data migration component can convert the data to be migrated in the database into a first type of data in a standard comparison format, convert the data to be migrated of the migrating party into a second type of data in a standard comparison format, and use a preset data object comparison tool to compare the first type of data with the second type of data. After the above comparison, the migration result of the migration task is finally obtained.

[0043] In particular, the task data includes a task identifier and a task migration status, the detailed data includes a task identifier, a detail identifier, a data record primary key, and a detail migration status, and the parameter data includes a detail identifier, parameter details data, and a parameter migration status. In actual scenarios, the data migration component can update the task migration status of the task data in the first database table, the detail migration status of the detail data in the second database table, and the parameter migration status of the parameter data in the third database table according to the current migration progress, and synchronize the updated task migration status, detail migration status, parameter migration status, and the migration results to the master control end, so as to enable the master control end to grasp the entire data migration process and the migration progress of each data granularity.

[0044] A specific embodiment of the present invention is described below. Figures 2 to 6 . Figure 2 is a schematic diagram of the overall process of the data migration method in an embodiment of the present invention, Figure 3 is a schematic diagram of a migration task creation process according to an embodiment of the present invention. Figure 4 is a schematic diagram of a migration task preparation process according to an embodiment of the present invention, Figure 5 is a schematic diagram of the migration task execution process of an embodiment of the present invention, Figure 6 It is a schematic diagram of the migration task comparison process according to an embodiment of the present invention.

[0045] This embodiment adopts task-driven migration, including migration task creation, migration task preparation, migration task execution and migration task comparison (see Figure 2 ), and issues tasks and collects migration results through the master control. Compared with the prior art, this embodiment does not focus on task flow, has fixed migration steps, and only needs to focus on what needs to be migrated, where to migrate, and which fields need to be compared during the migration process. It only focuses on its own migration business and supports the access of multiple modules.

[0046] First, create a migration task

[0047] See also Figure 3 In this embodiment, the master control terminal is used to uniformly manage the overall progress of the migration, and the migration message is sent to the data migration component. The data migration component will create different tasks according to the dynamic configuration of the module and business line, and support the creation of parallel tasks and serial tasks for task migration. The specific steps are as follows.

[0048] Step 1: Use the master control terminal to globally control the migration process, and the master control terminal sends the migration message.

[0049] Step 2: The task creation module receives the MQ (message queue) message sent by the master control end, identifies and filters the messages of the current migration scenario.

[0050] Step 3: The task creation module dynamically obtains the business line migration configuration through the configuration end and clarifies the steps required to migrate the objects under the current business line.

[0051] Step 4: The task creation module creates corresponding migration tasks according to the migration configuration and migration message in the configuration center, and saves the relevant data to the database; if there is a serial dependency between multiple tasks, the execution order can be calibrated.

[0052] Step 5: The task creation module sends an MQ message to automatically trigger the task preparation phase.

[0053] Second, prepare for the migration task

[0054] The task preparation module is responsible for receiving messages sent by the task creation module, splitting the task data into detailed data, and storing the specific data required for migration in each detail. This module focuses on processing the data of the migration party and supports the generation of multiple details and multiple data. The specific steps are:

[0055] Step 1: The task preparation module receives the MQ message of task preparation.

[0056] Step 2: The task preparation module verifies the task information and prepares the task details data.

[0057] Step 3: The task preparation module queries the data of the outgoing party based on the task detail dimension, assembles and builds the migration parameters (i.e. the parameter data that needs to be migrated) through data mapping conversion, and saves the detail data and parameter data in the database. In actual applications, the task preparation module can obtain the source data of the outgoing party based on different business scenarios and different detail types.

[0058] Step 4: If an abnormal situation occurs, the task preparation module needs to retry. The number of retries is configured by the configuration end. If the number of retries exceeds the threshold, the task preparation fails and the relevant message is sent back to the master control end.

[0059] Step 5: If the current task is a serial execution task and there is a predecessor dependent task that has not been successfully migrated, the task preparation module will pause the task and wait for the predecessor dependent task to be successfully migrated before executing the next step.

[0060] Third, migration task execution

[0061] The task migration module receives the task preparation completion message and is responsible for migrating the detailed data and parameter data into the corresponding system. In addition, this embodiment also supports asynchronous uploading of pictures, migration retry, etc.

[0062] Step 1: The task migration module receives the task migration MQ message.

[0063] Step 2: The task migration module queries the detailed data and parameter data of the current task and converts the data format.

[0064] Step 3: The task migration module obtains the migration input parameters, calls the migration-in side interface to execute the migration, and records the result output parameters; if files such as pictures are involved, the task migration module can send messages for asynchronous upload.

[0065] Step 4: If an abnormal situation occurs, the task migration module can be retried. The number of retries is determined by the configuration end. If the number of retries exceeds the threshold, the task execution fails and the relevant message is returned to the master control.

[0066] Step 5: The task migration module sends a message to trigger the task comparison phase.

[0067] Fourth, migration task comparison

[0068] The task comparison module is responsible for receiving the task migration completion message, performing quality inspection on the migration completion task, and confirming whether the migration is correct through data comparison. This embodiment adds the configuration of comparison of different modules in different business lines to achieve flexibility and controllability, and after the task comparison is completed, the next dependent task can be automatically triggered to achieve the purpose of automatic flow of multiple tasks.

[0069] Step 1: The task comparison module receives the task comparison MQ message.

[0070] Step 2: The task comparison module queries the task details and detail parameters, obtains the migration input parameters, and converts them into a comparison format.

[0071] Step 3: The task comparison module queries the information of the migrating party and converts it into a comparison format.

[0072] Step 4: The task comparison module uses the Java diff object comparison tool to compare the attributes of the migration input parameters and the query information. If they are all consistent, the comparison is successful. Otherwise, the task comparison fails and the general control related message is returned. In actual applications, the data of the migrated party may generate some default values ​​according to the business logic, so the comparison can be performed according to the logic of different business lines to ensure the accuracy of the comparison results.

[0073] Step 5: If the current task is a serial execution task and there are subsequent tasks, the task comparison module sends a message to trigger the preparation phase of the subsequent tasks. Otherwise, this link ends and reports the success of the master control object migration.

[0074] Through the above settings, functions such as automated migration, format conversion and data comparison are realized, which greatly improves the efficiency and accuracy of data migration. To access new business scenarios, data can be migrated by simply writing task details and parameter modules according to the migration rules, without the need for tedious communication and coordination, further reducing communication and labor costs. The overall progress of migration is observed through the master control, and the automation program is equipped with monitoring, logging and alarm functions to ensure the reliability and stability of data migration. The overall system is flexible and configurable, and can be dynamically adjusted while the system is running, which is convenient for operation and maintenance personnel to flexibly configure and manage according to actual conditions. At the same time, by monitoring and tuning the message middleware and cache system, the controllability and performance of the system can be further improved, ensuring smooth system migration and reducing risks and costs during the migration process; finally, the configuration center is used to dynamically configure processes and data for different business scenarios to reduce maintenance costs and improve the reliability and stability of system operation; the MQ message center is used to control message flow and some asynchronous task processing, improve the system's concurrency and scalability, and at the same time ensure the reliability and sequence of message transmission, and ensure the consistency and integrity of system data; the use of redis cache technology in many places can effectively improve the system's reading speed, reduce the pressure on the back-end database and interface, and realize distributed caching, improving the scalability and availability of the system; the java diff comparison tool is used for data comparison, which can more easily identify and analyze the differences and similarities between objects, help quickly locate and solve problems, and improve development efficiency and product quality.

[0075] In the technical solution of the embodiment of the present invention, after receiving the migration message sent by the master control end, the data migration component determines the migration scenario and business category corresponding to the migration message according to the migration object description information therein, creates a migration task by using the migration configuration information and the migration message pre-configured for the migration scenario and business category, and queries the data to be migrated of the migration task from the migration-out party based on the migration object description information, and stores the queried data to be migrated in a preset database. Thereafter, if the preset migration execution conditions are met, the data migration component transmits the data to be migrated in the database to the migration-in party in a preset format; after the transmission is completed, the data migration component performs a comparison of the data to be migrated between the database and the migration-in party, and then obtains the migration result of the migration task. Through the above steps, the communication cost of the data migration participants at the business level is avoided or reduced, and a general automated migration solution considering factors such as migration scenarios and business categories is realized. The new migration job only needs to send a migration message at the master control end to complete the entire data migration process through the preset corresponding migration steps, and execute the migration steps at multiple granularities of task data, detailed data and parameter data, and feedback the migration progress to the master control end in real time, so that the staff can grasp the current migration progress in time.

[0076] It should be noted that the collection, collection, update, analysis, processing, use, transmission, storage and other aspects of user personal information that may be involved in the technical solution of the present invention are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0077] For the above-mentioned method embodiments, for the convenience of description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the order of the actions described, and some steps can actually be performed in other orders or simultaneously. In addition, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily necessary to implement the present invention.

[0078] In order to better implement the above-mentioned solution of the embodiment of the present invention, relevant devices for implementing the above-mentioned solution are also provided below.

[0079] See also Figure 7 As shown, the data migration device 700 provided in the embodiment of the present invention may include: a pre-processing unit 701 , a creating unit 702 and an executing unit 703 .

[0080] Among them, the preprocessing unit 701 can be used to: in response to receiving a migration message containing an out-migrant identifier, an in-migrant identifier, and migration object description information, determine the migration scenario and business category corresponding to the migration message according to the migration object description information; the creation unit 702 can be used to obtain migration configuration information pre-configured for the migration scenario and the business category, and create at least one migration task based on the migration configuration information and the migration message; based on the migration object description information, query the data to be migrated of the migration task from the out-migrant, and store the queried data to be migrated in a preset database; the execution unit 703 can be used to: when a preset migration execution condition is met, transmit the data to be migrated in the database to the in-migrant in a preset format; after the transmission is completed, perform a comparison of the data to be migrated between the database and the in-migrant to obtain the migration result of the migration task.

[0081] In an embodiment of the present invention, the data to be migrated of the migration task includes: task data, detailed data subordinate to the task data, and parameter data subordinate to the detailed data; and the creation unit is further used to: store the task data in a first database table, store the detailed data in a second database table, and store the parameter data in a third database table.

[0082] In a specific application, the migration message is issued by the master control end; the task data includes a task identifier and a task migration status, the detail data includes a task identifier, a detail identifier, a data record primary key and a detail migration status, and the parameter data includes a detail identifier, parameter details data and a parameter migration status; and the creation unit 702 is used to: update the task migration status of the task data in the first database table, the detail migration status of the detail data in the second database table, and the parameter migration status of the parameter data in the third database table according to the current migration progress; and synchronize the updated task migration status, detail migration status, parameter migration status and the migration result to the master control end.

[0083] In actual applications, the migration configuration information includes: the dependencies between the migration scenarios; and the creation unit 702 is used to: after creating multiple migration tasks, determine the dependencies between the multiple migration tasks based on the dependencies between the migration scenarios, and determine the execution order of the multiple migration tasks using the determined dependencies between the multiple migration tasks.

[0084] As a preferred solution, the execution unit 703 is used to: when the current migration task does not have any dependent tasks that have not been successfully migrated, transmit the to-be-migrated data of the current migration task to the migrating party.

[0085] In addition, in an embodiment of the present invention, the execution unit 703 is used to: convert the data to be migrated in the database into first-category data in a standard comparison format, convert the data to be migrated of the migrating party into second-category data in a standard comparison format, and use a preset data object comparison tool to compare the first-category data with the second-category data.

[0086] According to the technical solution of the embodiment of the present invention, after receiving the migration message sent by the master control end, the data migration component determines the migration scenario and business category corresponding to the migration message according to the migration object description information therein, creates a migration task by using the migration configuration information and the migration message pre-configured for the migration scenario and business category, and queries the data to be migrated of the migration task from the migration-out party based on the migration object description information, and stores the queried data to be migrated in a preset database. Thereafter, if the preset migration execution conditions are met, the data migration component transmits the data to be migrated in the database to the migration-in party in a preset format; after the transmission is completed, the data migration component performs a comparison of the data to be migrated between the database and the migration-in party, and then obtains the migration result of the migration task. Through the above steps, the communication cost of the data migration participants at the business level is avoided or reduced, and a general automated migration solution considering factors such as migration scenarios and business categories is realized. The new migration job only needs to send a migration message at the master control end to complete the entire data migration process through the preset corresponding migration steps, and execute the migration steps at multiple granularities of task data, detailed data and parameter data, and feedback the migration progress to the master control end in real time, so that the staff can grasp the current migration progress in a timely manner.

[0087] Figure 8 An exemplary system architecture 800 is shown to which the data migration method or data migration apparatus according to the embodiment of the present invention can be applied.

[0088] like Figure 8 As shown, the system architecture 800 may include terminal devices 801, 802, 803, a network 804 and a server 805 (this architecture is only an example, and the components included in the specific architecture may be adjusted according to the specific application). The network 804 is used to provide a medium for a communication link between the terminal devices 801, 802, 803 and the server 805. The network 804 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0089] The user can use the terminal devices 801, 802, 803 to interact with the server 805 through the network 804 to receive or send messages, etc. Various client applications can be installed on the terminal devices 801, 802, 803, such as a data migration application (only an example).

[0090] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0091] The server 805 may be a server that provides various services, such as a background server (only an example) that supports the data migration application operated by the user using the terminal devices 801, 802, and 803. The background server may process the received data migration request and feed back the processing result (such as the migration result - only an example) to the terminal devices 801, 802, and 803.

[0092] It should be noted that the data migration method provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the data migration device is generally disposed in the server 805 .

[0093] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0094] The present invention also provides an electronic device. The electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the data migration method provided by the present invention.

[0095] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of an electronic device suitable for implementing an embodiment of the present invention. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0096] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the computer system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0097] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read therefrom is installed into the storage section 908 as needed.

[0098] In particular, according to the embodiments disclosed in the present invention, the process described in the main step diagram above can be implemented as a computer software program. For example, the embodiments of the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the main step diagram. In the above embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit 901, the above functions defined in the system of the present invention are executed.

[0099] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0100] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0101] The units involved in the embodiments of the present invention may be implemented in software or hardware. The units described may also be provided in a processor, for example, may be described as: a processor including a preprocessing unit, a creation unit, and an execution unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the preprocessing unit may also be described as "a unit that provides migration scenarios and business categories to the creation unit".

[0102] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the device, the steps executed by the device include: in response to receiving a migration message containing an out-migrator identifier, an in-migrator identifier, and migration object description information, determining the migration scenario and service category corresponding to the migration message according to the migration object description information; obtaining migration configuration information pre-configured for the migration scenario and the service category, and creating at least one migration task according to the migration configuration information and the migration message; querying the data to be migrated of the migration task from the out-migrator based on the migration object description information, and storing the queried data to be migrated in a preset database; transmitting the data to be migrated in the database to the in-migrator in a preset format when the preset migration execution condition is met; after the transmission is completed, performing a comparison between the data to be migrated and the in-migrator to obtain the migration result of the migration task.

[0103] In the technical solution of the embodiment of the present invention, after receiving the migration message sent by the master control end, the data migration component determines the migration scenario and business category corresponding to the migration message according to the migration object description information therein, creates a migration task by using the migration configuration information and the migration message pre-configured for the migration scenario and business category, and queries the data to be migrated of the migration task from the migration-out party based on the migration object description information, and stores the queried data to be migrated in a preset database. Thereafter, if the preset migration execution conditions are met, the data migration component transmits the data to be migrated in the database to the migration-in party in a preset format; after the transmission is completed, the data migration component performs a comparison of the data to be migrated between the database and the migration-in party, and then obtains the migration result of the migration task. Through the above steps, the communication cost of the data migration participants at the business level is avoided or reduced, and a general automated migration solution considering factors such as migration scenarios and business categories is realized. The new migration job only needs to send a migration message at the master control end to complete the entire data migration process through the preset corresponding migration steps, and execute the migration steps at multiple granularities of task data, detailed data and parameter data, and feedback the migration progress to the master control end in real time, so that the staff can grasp the current migration progress in time.

[0104] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A data migration method, characterized in that: include: In response to receiving a migration message including a migrating party identifier, a migrating party identifier, and migration object description information, determining a migration scenario and a service category corresponding to the migration message according to the migration object description information; Acquire migration configuration information pre-configured for the migration scenario and the service category, and create at least one migration task according to the migration configuration information and the migration message; querying the to-be-migrated data of the migration task from the migrating party based on the migration object description information, and storing the queryed to-be-migrated data in a preset database; When a preset migration execution condition is met, transmitting the data to be migrated in the database to the migrating party in a preset format; After the transmission is completed, a comparison of the data to be migrated is performed between the database and the migrate-in party to obtain a migration result of the migration task.

2. The method according to claim 1, characterized in that The data to be migrated of the migration task includes: task data, detailed data subordinate to the task data, and parameter data subordinate to the detailed data; and storing the queried data to be migrated in a preset database includes: Storing the task data in a first database table; Storing the detailed data in a second database table; The parameter data is stored in a third database table.

3. The method according to claim 2, characterized in that The migration message is sent by the master control terminal; the task data includes a task identifier and a task migration status, the detail data includes a task identifier, a detail identifier, a data record primary key and a detail migration status, and the parameter data includes a detail identifier, parameter details data and a parameter migration status; And, the method further comprises: Update the task migration status of the task data in the first database table, the detail migration status of the detail data in the second database table, and the parameter migration status of the parameter data in the third database table according to the current migration progress; The updated task migration status, detailed migration status, parameter migration status and the migration result are synchronized to the master control end.

4. The method according to claim 1, characterized in that The migration configuration information includes: dependencies between the migration scenarios; and the method further includes: After creating the multiple migration tasks, the dependencies between the multiple migration tasks are determined according to the dependencies between the migration scenarios, and the execution order of the multiple migration tasks is determined using the determined dependencies between the multiple migration tasks.

5. The method according to claim 4, characterized in that The step of transmitting the data to be migrated in the database to the migrating party in a preset format when the preset migration execution condition is met includes: When the current migration task does not have any dependent tasks that have not been successfully migrated, the to-be-migrated data of the current migration task is transmitted to the migration-in party.

6. The method according to claim 1, characterized in that The comparing the data to be migrated between the database and the migrate-in party includes: The data to be migrated in the database is converted into first-category data in a standard comparison format, the data to be migrated of the migrating party is converted into second-category data in a standard comparison format, and the first-category data is compared with the second-category data using a preset data object comparison tool.

7. A data migration device, characterized in that: include: A preprocessing unit, configured to: in response to receiving a migration message including an out-migrator identifier, an in-migrator identifier, and migration object description information, determine a migration scenario and a service category corresponding to the migration message according to the migration object description information; A creating unit, configured to obtain migration configuration information pre-configured for the migration scenario and the service category, and create at least one migration task according to the migration configuration information and the migration message; querying the to-be-migrated data of the migration task from the migrating party based on the migration object description information, and storing the queryed to-be-migrated data in a preset database; An execution unit, configured to: when a preset migration execution condition is met, transmit the data to be migrated in the database to the migrating party in a preset format; After the transmission is completed, a comparison of the data to be migrated is performed between the database and the migrate-in party to obtain a migration result of the migration task.

8. The device according to claim 7, characterized in that The data to be migrated of the migration task includes: task data, detailed data subordinate to the task data and parameter data subordinate to the detailed data; and the creation unit is further used to: store the task data in a first database table, store the detailed data in a second database table, and store the parameter data in a third database table.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.