Data migration method, system and device, storage medium and program product
By mapping and processing data in the migration workspace, combining preset verification rules and migration scripts, the complexity and inefficiency of traditional data migration methods are solved, and an efficient and reliable data migration process is achieved.
Patent Information
- Application Number
- CN202411670633.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-28
AI Technical Summary
Traditional data migration methods rely on manual operations or simple automation tools, resulting in slow development speed, high complexity, poor user experience and long waiting time.
Provide a data migration method. By responding to data migration requests, the original data in the source database is mapped into data to be migrated in the migration workspace, the initial migration data is determined based on the preset verification rules, and the preset migration script is executed in the migration workspace to migrate the data to the target database.
Through automated data processing processes, reduce manual intervention, improve data migration efficiency, ensure data quality, reduce migration complexity and risks, and provide data backing capabilities to deal with abnormal situations.
Smart Images

Figure CN119537348A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of business data processing technology, can be applied to the financial field, and more specifically to a data migration method, system, device, storage medium and program product. Background Art
[0002] In the information system of modern enterprises, data migration is an important task in information technology management. With the development of business, the old business system can no longer meet the needs of customers, and the replacement of the new system is imperative. Enterprises often need to migrate data from one system to another to optimize data storage, improve system performance or upgrade the system. However, in the process of iteratively updating the old and new systems, it is inevitable to face the problem of migrating old data.
[0003] Traditional data migration methods rely on manual operations or simple automated tools, often directly importing code to migrate compensatory data, resulting in slower development speeds. When new systems are iterated again, operations and maintenance become more cumbersome, thus increasing the complexity of data migration.
[0004] In addition, in the traditional data migration process, user operations usually need to strictly follow the predetermined steps. This process design makes the user experience poor, and when the amount of data is large, the migration process may require a long waiting time, which further reduces the efficiency of the execution level. Summary of the invention
[0005] In view of the above problems, the present disclosure provides a data migration method, system, device, storage medium and program product.
[0006] According to a first aspect of the present disclosure, a data migration method is provided, comprising: in response to a data migration request, in a data migration workspace corresponding to the type of data migration, mapping original data in a source database into data to be migrated; based on a preset verification rule, determining initial migration data in the data to be migrated; in the data migration workspace, executing a preset migration script to migrate target migration data in the initial migration data to a target table in a target database.
[0007] According to an embodiment of the present disclosure, verification rules can be constructed according to configuration information of data migration and stored in a tool database.
[0008] According to an embodiment of the present disclosure, initial migration data in the data to be migrated is determined based on preset verification rules, including: checking the data to be migrated according to the preset verification rules to obtain a data verification result; when the data verification result is problem data, exporting the problem data; when the data verification result is processable data, determining the processable data as the initial migration data.
[0009] According to an embodiment of the present disclosure, in a data migration workspace, a preset migration script is executed to migrate the target migration data in the initial migration data to a target table in a target database. It also includes: based on preset business rules, the initial migration data is processed to generate target migration data and stored in a backup database.
[0010] According to an embodiment of the present disclosure, the initial migration data is processed based on preset business rules to generate target migration data, including: configuring the initial migration data to be inserted into a target table according to the preset business rules; and configuring the initial migration data to be rolled back to a target table according to the preset business rules.
[0011] According to an embodiment of the present disclosure, in a data migration workspace, a preset migration script is executed to migrate the target migration data in the initial migration data to the target table in the target database, and also includes: obtaining the result of the data migration; when the result of the data migration is abnormal, executing a preset rollback script to reprocess the initial migration data.
[0012] According to an embodiment of the present disclosure, a migration script can be constructed in the form of a business configuration and stored in a tool database.
[0013] A second aspect of the present disclosure provides a data migration system, including: a data migration request response module, used to respond to a data migration request, in a data migration workspace corresponding to the type of data migration, map the original data in the source database into data to be migrated; an initial migration data determination module, used to determine the initial migration data in the data to be migrated based on a preset verification rule; a data migration module, used to execute a preset migration script in the data migration workspace, and migrate the target migration data in the initial migration data to a target table in the target database.
[0014] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0015] The fourth aspect of the present disclosure further provides a computer-readable storage medium on which a computer program or instruction is stored, and when the computer program or instruction is executed by a processor, the steps of the above method are implemented.
[0016] The fifth aspect of the present disclosure also provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the computer program or instructions are executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above contents and other purposes, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0018] Figure 1 The application scenario diagram of the data migration method according to the embodiment of the present disclosure is schematically shown;
[0019] Figure 2 A flowchart of a data migration method according to an embodiment of the present disclosure is schematically shown;
[0020] Figure 3 A flowchart for determining initial migration data in the data to be migrated according to an embodiment of the present disclosure is schematically shown;
[0021] Figure 4 A flowchart of target migration data generation according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 5 A flowchart schematically shows a process for processing when a data migration result is abnormal according to an embodiment of the present disclosure;
[0023] Figure 6 A structural block diagram of a data migration system according to an embodiment of the present disclosure is schematically shown; and
[0024] Figure 7 A block diagram of an electronic device suitable for implementing a data migration method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0026] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0027] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0028] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0029] An embodiment of the present disclosure provides a data migration method, including: in response to a data migration request, in a data migration workspace corresponding to the type of data migration, mapping original data in a source database into data to be migrated; based on a preset verification rule, determining initial migration data in the data to be migrated; in the data migration workspace, executing a preset migration script to migrate target migration data in the initial migration data to a target table in a target database.
[0030] Through the embodiments of the present disclosure, during the migration process, the method checks the data to be migrated through preset verification rules, can effectively identify and export problem data, ensure the data quality in the target database, and thus avoid business problems caused by inconsistent or incomplete data. Through the automated data processing process, manual intervention is reduced and the efficiency of data migration is improved; using migration scripts and business configurations, the initial migration data can be quickly and accurately processed into target migration data, and the migration from the source database to the target database can be completed. By storing the data before and after processing in a backup database, the traceability of the data migration process is provided; at the same time, exception handling can effectively process the initial migration data into target migration data that meets the requirements of the target database, and at the same time has the ability to roll back data to deal with problems that may arise during the data migration process. This method ensures the accuracy and reliability of data migration.
[0031] In addition, the method can also dynamically build and adjust verification rules and business rules according to different migration types and business needs, making the method highly flexible and adaptable to various complex data migration scenarios. Through the corresponding business configuration execution, multiple data migrations of the same type can be achieved, and in the iterative scenario of large data volumes, there is no need to perform cumbersome data migration procedures, effectively reducing the risk of migrating data online.
[0032] Figure 1 The application scenario diagram of the data migration method according to the embodiment of the present disclosure is schematically shown.
[0033] like Figure 1 As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0034] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0035] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0036] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0037] It should be noted that the data migration method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the data migration system provided in the embodiment of the present disclosure can generally be set in the server 105. The data migration method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the data migration system provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0038] It should be understood that Figure 1 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 implementation requirements.
[0039] The following will be based on Figure 1 The scene described by Figure 2~Figure 5 The data migration method of the disclosed embodiment is described in detail.
[0040] Figure 2 The flowchart of the data migration method according to the embodiment of the present disclosure is schematically shown.
[0041] like Figure 2 As shown, the data migration method may further include operations S210 to S230.
[0042] In operation S210 , in response to a data migration request, original data in a source database is mapped into data to be migrated in a data migration workspace corresponding to the type of data migration.
[0043] Specifically, a data migration request is issued by a business person, user or business system when a business system is replaced or upgraded. Specifically, a data migration request may include basic information of the old business system to be migrated and basic information of the migration target system (i.e., the new business system), such as system name, address, etc. Therefore, after receiving the data migration request, the current data to be migrated (i.e., the original data in the source database) can be determined based on the basic information of the old and new business systems to be migrated.
[0044] It should be noted that when performing data migration, in order to distinguish the business function types corresponding to the current data to be migrated, such as contract migration, general reimbursement form migration, provisional estimate form migration and supplier migration, the data migration workspace is divided in this embodiment. Normally, one workspace corresponds to one copy of the data to be migrated.
[0045] In addition, in order to convert the original data in the source database into a format acceptable to the target database, the original data in the source database is mapped into the data to be migrated in the corresponding data migration workspace.
[0046] Exemplarily, the source database and the target database structures are first determined, and then the data mapping relationship is defined, the original data in the source database is extracted, the extracted data records are traversed, and the original data in the source database is converted into the data to be migrated according to the mapping relationship. For example, the original data is mapped into a database table.
[0047] Through the embodiments of the present disclosure, in a data migration workspace corresponding to the type of data migration, original data in a source database is mapped to data to be migrated, which can effectively ensure the accuracy and integrity of data in a subsequent data migration process.
[0048] In operation S220, initial migration data in the data to be migrated is determined based on a preset verification rule.
[0049] Figure 3 A flowchart for determining initial migration data in the data to be migrated according to an embodiment of the present disclosure is schematically shown.
[0050] like Figure 3 As shown, in the embodiment of the present disclosure, determining the initial migration data in the data to be migrated based on a preset verification rule may further include operations S310 to S330.
[0051] In operation S310, the data to be migrated is checked according to a preset verification rule to obtain a data verification result.
[0052] Specifically, before starting data migration, you first need to set a series of verification rules. These rules may include data format check, field integrity check, data consistency check, etc. For example, according to the preset data verification rules, the data to be migrated is checked for data format, data length, interval range, default value, integrity and consistency to obtain the data verification results.
[0053] In an embodiment of the present disclosure, verification rules can be constructed according to configuration information of data migration and stored in a tool database.
[0054] For example, the migration data accuracy verification rules are constructed in a business configurable form. For example, through the interface basic configuration non-empty verification, for a user data table, the verification rules may include: the user name cannot be empty, the email format must conform to the regular expression, the age field must be a positive integer, etc.
[0055] Therefore, the verification rules can be dynamically constructed and adjusted according to different migration types and business needs. It has strong flexibility and can adapt to various complex data migration scenarios.
[0056] In operation S320, when the data verification result is problematic data, the problematic data is exported.
[0057] Specifically, the data sets to be migrated are verified one by one. In this step, each data record is checked one by one to see if it meets the preset verification rules, and the verification results are generated. The verification results are divided into two categories: problem data and processable data. Problem data refers to data records that do not meet the verification rules, and processable data refers to data records that meet all rules.
[0058] Furthermore, based on the verification results, all problematic data will be automatically marked. These data may be identified as problematic data due to format errors, missing information, or logical inconsistency.
[0059] Furthermore, all data records marked as problems are exported into a file to facilitate subsequent review and correction.
[0060] The export file should contain necessary information, including problem type, error description and original data, to facilitate subsequent analysis and processing.
[0061] In operation S330 , when the data verification result is processable data, the processable data is determined to be initial migration data.
[0062] Specifically, after the export of the problem data is completed, the process of processing the processable data will continue. All data records that are not marked as problems will be considered processable data. These processable data will be marked as initial migration data in preparation for subsequent migration operations. The system will create a new data set containing all verified and qualified data records.
[0063] Furthermore, in an embodiment of the present disclosure, before migration, a final confirmation is performed on the initial migration data to ensure that no records are missed and that the integrity and accuracy of the data are guaranteed.
[0064] Through the embodiments of the present disclosure, during the data migration process, the data to be migrated is strictly checked by preset verification rules, problematic data is exported for correction, and processable data is determined as initial migration data, which can effectively improve the success rate of data migration and ensure the quality and reliability of data in the final system.
[0065] In operation S230, a preset migration script is executed in the data migration workspace to migrate the target migration data in the initial migration data to a target table in the target database.
[0066] Specifically, ensure that the target database has been created and the target table has been defined, check and confirm whether the format and content of the target migration data match the structure of the target table, and then execute the prepared migration script to perform the migration operation and migrate the target migration data in the initial migration data to the target table in the target database.
[0067] In an embodiment of the present disclosure, the migration script can be constructed in the form of business configuration and stored in a tool database. That is, when connecting to a target database for migration, the migration script is called and executed in the tool database.
[0068] In an embodiment of the present disclosure, a preset migration script is executed in a data migration workspace to migrate the target migration data in the initial migration data to a target table in a target database. It also includes: based on preset business rules, the initial migration data is processed to generate target migration data and stored in a backup database.
[0069] Figure 4 The flowchart of target migration data generation according to an embodiment of the present disclosure is schematically shown.
[0070] like Figure 4 As shown, in an embodiment of the present disclosure, based on a preset business rule, processing the initial migration data to generate target migration data may further include operations S410 to S420.
[0071] In operation S410, the initial migration data is configured for insertion into a target table according to a preset business rule.
[0072] In operation S420, according to preset business rules, a target table rollback configuration is performed on the initial migration data.
[0073] Specifically, in the process of executing the migration script, business rules are also constructed in the form of business configuration. When executing the business rules, the initial migration data is traversed, each initial migration data is inserted into the target table configuration in the target database, and the corresponding script is executed, so that the target migration data that meets the requirements of the target database can be obtained for subsequent data migration.
[0074] By processing the initial migration data to generate target migration data and storing it in the backup database, the data migration process is more standardized, the complexity of data processing is reduced, and the data processing process is optimized.
[0075] It should be noted that in the embodiment of the present disclosure, the target migration data in the initial migration data is migrated to the target table in the target database. During this data migration process, the data migration result is also verified, as described in detail below.
[0076] Figure 5 The flowchart of processing when the data migration result is abnormal according to an embodiment of the present disclosure is schematically shown.
[0077] like Figure 5 As shown, in an embodiment of the present disclosure, when the target migration data in the initial migration data is migrated to the target table in the target database and the data migration result is abnormal, operations S510 to S520 may be further included.
[0078] In operation S510, a result of data migration is obtained.
[0079] In operation S520, when the result of the data migration is abnormal, a preset rollback script is executed to reprocess the initial migration data.
[0080] Specifically, if data errors or non-compliance with preset business rules are found during the migration process, the target table rollback configuration is performed for each initial migration data, and the corresponding script is executed to roll back certain records and reprocess them. An exception handling mechanism is introduced during the data migration process. When an exception occurs in the migration result, the rollback script can be automatically executed to ensure the security and integrity of the data.
[0081] Through the embodiments of the present disclosure, by supporting personalized configuration according to business rules, users can flexibly adjust data migration strategies to adapt to different business needs. Through the execution of automated scripts, the need for manual operations is reduced, thereby reducing the risk of errors caused by human factors and saving labor costs. It not only optimizes the data migration process, improves the efficiency and security of data processing, but also enhances the flexibility and adaptability of the system, meeting the needs of modern enterprises for data management.
[0082] Based on the above data migration method, the initial migration data can be effectively processed into the target migration data that meets the requirements of the target database, and at the same time, the data rollback capability is available to deal with problems that may arise during the data migration process. This approach ensures the accuracy and reliability of data migration. In addition, through the execution of corresponding business configurations, this method can achieve multiple data migrations of the same type, and in the iterative scenario of large data volumes, there is no need to perform cumbersome data migration procedures, effectively reducing the risk of migration data going online.
[0083] Based on the above data migration method, the present disclosure also provides a data migration system. Figure 6 The system is described in detail.
[0084] Figure 6 The structural block diagram of the data migration system according to the embodiment of the present disclosure is schematically shown.
[0085] like Figure 6 As shown, the data migration system 600 of this embodiment includes a data migration request response module 610 , an initial migration data determination module 620 and a data migration module 630 .
[0086] The data migration request response module 610 is used to respond to the data migration request and map the original data in the source database into the data to be migrated in the data migration workspace corresponding to the type of data migration. In one embodiment, the data migration request response module 610 can be used to perform the operation S210 described above, which will not be repeated here.
[0087] The initial migration data determination module 620 is used to determine the initial migration data in the data to be migrated based on a preset verification rule. In one embodiment, the initial migration data determination module 620 can be used to perform the operation S220 described above, which will not be described in detail here.
[0088] The data migration module 630 is used to execute a preset migration script in the data migration workspace to migrate the target migration data in the initial migration data to the target table in the target database. In one embodiment, the data migration module 630 can be used to execute the operation S230 described above, which will not be described in detail here.
[0089] For example, the business in the system is executed according to the configured workspace. After confirming that the data to be migrated is correct, you can click one button to confirm the execution of the corresponding configuration, that is, start executing the script to migrate the data. The advantage of completing the migration task with one click is that it avoids the risk problems that are easy to occur in the process of manual SQL operation.
[0090] According to an embodiment of the present disclosure, any multiple modules of the data migration request response module 610, the initial migration data determination module 620, and the data migration module 630 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the data migration request response module 610, the initial migration data determination module 620, and the data migration module 630 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the data migration request response module 610 , the initial migration data determination module 620 , and the data migration module 630 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
[0091] Figure 7 A block diagram of an electronic device suitable for implementing a data migration method according to an embodiment of the present disclosure is schematically shown.
[0092] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 707 to a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0093] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0094] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 707 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 707 as needed.
[0095] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0096] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0097] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present disclosure.
[0098] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0099] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0100] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0101] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0102] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. 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.
[0103] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0104] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A data migration method, characterized in that: The method comprises: In response to a data migration request, in a data migration workspace corresponding to the type of data migration, original data in a source database is mapped into data to be migrated; Determining initial migration data in the data to be migrated based on a preset verification rule; In the data migration workspace, a preset migration script is executed to migrate the target migration data in the initial migration data to a target table in a target database.
2. The data migration method according to claim 1, characterized in that: The verification rules can be constructed according to the configuration information of the data migration and stored in a tool database.
3. The data migration method according to claim 1 or 2, characterized in that: The determining, based on a preset verification rule, the initial migration data in the data to be migrated includes: According to a preset verification rule, the data to be migrated is checked to obtain a data verification result; When the data verification result is problematic data, exporting the problematic data; When the data verification result is processable data, the processable data is determined to be initial migration data.
4. The data migration method according to claim 1, characterized in that: The method further includes executing a preset migration script in the data migration workspace to migrate the target migration data in the initial migration data to a target table in the target database: Based on preset business rules, the initial migration data is processed to generate target migration data and stored in a backup database.
5. The data migration method according to claim 4, characterized in that: The processing of the initial migration data based on the preset business rules to generate target migration data includes: According to preset business rules, inserting the initial migration data into the target table is configured; and According to preset business rules, the target table rollback configuration is performed on the initial migration data.
6. The data migration method according to claim 4 or 5, characterized in that: The method further includes executing a preset migration script in the data migration workspace to migrate the target migration data in the initial migration data to a target table in the target database: Obtaining a result of the data migration; When the result of the data migration is abnormal, a preset rollback script is executed to reprocess the initial migration data.
7. The data migration method according to claim 6, characterized in that: The migration script can be constructed in the form of business configuration and stored in the tool database.
8. A data migration system, characterized in that: The system comprises: A data migration request response module, configured to respond to a data migration request and map original data in a source database into data to be migrated in a data migration workspace corresponding to the type of data migration; An initial migration data determination module, used to determine the initial migration data in the data to be migrated based on a preset verification rule; The data migration module is used to execute a preset migration script in the data migration workspace to migrate the target migration data in the initial migration data to a target table in a target database.
9. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.