[go: up one dir, main page]

CN116257503A - Data migration processing method, device, equipment and storage medium - Google Patents

Data migration processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN116257503A
CN116257503A CN202310242942.XA CN202310242942A CN116257503A CN 116257503 A CN116257503 A CN 116257503A CN 202310242942 A CN202310242942 A CN 202310242942A CN 116257503 A CN116257503 A CN 116257503A
Authority
CN
China
Prior art keywords
data
temporary intermediate
database
system database
data migration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310242942.XA
Other languages
Chinese (zh)
Inventor
王休
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202310242942.XA priority Critical patent/CN116257503A/en
Publication of CN116257503A publication Critical patent/CN116257503A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a data migration processing method, a device, equipment and a storage medium, wherein a temporary intermediate original table with the same structure as an old system table is created in a new system, data is migrated on two intermediate tables according to a mapping relation, the data on the temporary intermediate tables are preprocessed, and finally data are synchronized to the database original table of the new system, so that possible data migration errors are isolated in the temporary intermediate table to solve the problem, the data errors are prevented from appearing on a line of the new system, and the technical problem that the data migration processing is difficult because the differences exist in the database types adopted by the new and old systems or the field structures of the database tables adopted by the new and old systems in the actual development process is solved.

Description

一种数据迁移处理方法、装置、设备及存储介质A data migration processing method, device, equipment and storage medium

技术领域technical field

本申请涉及数据迁移技术领域,尤其涉及一种数据迁移处理方法、装置、设备及存储介质。The present application relates to the technical field of data migration, and in particular to a data migration processing method, device, device, and storage medium.

背景技术Background technique

在软件开发领域,经常会对老系统进行重构升级,搭建一套新系统来取代老系统,并重新设计新系统独立使用的数据库表。In the field of software development, old systems are often refactored and upgraded, a new system is built to replace the old system, and the database tables used independently by the new system are redesigned.

在新系统搭建完成后需要逐渐废弃老系统,而为了让业务在新、老系统切回时能平滑地运行,需要进行老系统数据库到新系统数据库的数据迁移处理。After the new system is built, the old system needs to be gradually abandoned. In order to allow the business to run smoothly when the new and old systems are switched back, data migration from the old system database to the new system database is required.

在实际的开发过程中,新、老系统所采用的数据库类型可能存在差异,例如老系统采用oracle数据库,而新系统采用mysql数据库,或者新、老系统所采用的数据库表的字段结构存在差异,从而造成了数据迁移处理困难的技术问题。In the actual development process, there may be differences in the database types used by the new and old systems. For example, the old system uses the oracle database, while the new system uses the mysql database, or the field structures of the database tables used by the new and old systems are different. As a result, the technical problem of data migration processing is difficult.

发明内容Contents of the invention

本申请提供了一种数据迁移处理方法、装置、设备及存储介质,解决了由于实际的开发过程中,新、老系统所采用的数据库类型可能存在差异,或者新、老系统所采用的数据库表的字段结构存在差异,从而造成的数据迁移处理困难的技术问题。This application provides a data migration processing method, device, equipment, and storage medium, which solves the problem that the database types used by the new and old systems may be different in the actual development process, or the database tables used by the new and old systems may be different. There are differences in the field structure of the field, which causes technical problems in data migration processing difficulties.

有鉴于此,本申请第一方面提供了一种数据迁移处理方法,所述方法包括:In view of this, the first aspect of the present application provides a data migration processing method, the method comprising:

S1、创建与第一系统数据库的第一系统数据库原表的表结构相同的临时中间原表;S1. Create a temporary intermediate original table having the same table structure as the original table of the first system database of the first system database;

S2、创建与第二系统数据库的第二系统数据库原表的表结构相同的临时中间表;S2. Create a temporary intermediate table having the same table structure as the original table of the second system database of the second system database;

S3、将所述第一系统数据库的第一数据库原表中的数据导入至所述临时中间原表中;S3. Import the data in the first database original table of the first system database into the temporary intermediate original table;

S4、通过执行所述第一系统数据库与所述第二系统数据库的字段映射关系脚本,将所述临时中间原表中的数据迁移至所述临时中间表中;S4. Migrate the data in the temporary intermediate original table to the temporary intermediate table by executing the field mapping relationship script between the first system database and the second system database;

S5、对所述临时中间表进行预处理后,将所述临时中间表中的数据导入至所述第二系统数据库原表中。S5. After preprocessing the temporary intermediate table, import the data in the temporary intermediate table into the original table of the second system database.

可选地,所述步骤S4之前还包括:Optionally, before the step S4, it also includes:

S6、创建所述第一系统数据库与所述第二系统数据库的字段映射关系脚本。S6. Create a field mapping relationship script between the first system database and the second system database.

可选地,所述步骤S5中对所述临时中间表进行预处理具体为:Optionally, the preprocessing of the temporary intermediate table in the step S5 is specifically:

对所述临时中间表中的数据进行校验、清洗、修正预处理。Perform verification, cleaning, and correction preprocessing on the data in the temporary intermediate table.

可选地,所述步骤S6之后还包括:Optionally, after the step S6, it also includes:

更新所述字段映射关系脚本中的时间条件,使得所述临时中间原表中的数据按照所述时间条件分时间段迁移至所述临时中间表。The time condition in the field mapping relationship script is updated, so that the data in the temporary intermediate original table is migrated to the temporary intermediate table in time periods according to the time condition.

本申请第二方面提供一种数据迁移处理装置,所述装置包括:The second aspect of the present application provides a data migration processing device, the device comprising:

第一创建单元,用于创建与第一系统数据库的第一系统数据库原表的表结构相同的临时中间原表;The first creation unit is used to create a temporary intermediate original table with the same table structure as the original table of the first system database of the first system database;

第二创建单元,用于创建与第二系统数据库的第二系统数据库原表的表结构相同的临时中间表;The second creation unit is used to create a temporary intermediate table with the same table structure as the original table of the second system database of the second system database;

第一同步单元,用于将所述第一系统数据库的第一数据库原表中的数据导入至所述临时中间原表中;The first synchronization unit is configured to import the data in the first database original table of the first system database into the temporary intermediate original table;

数据迁移单元,用于通过执行所述第一系统数据库与所述第二系统数据库的字段映射关系脚本,将所述临时中间原表中的数据迁移至所述临时中间表中;A data migration unit, configured to migrate the data in the temporary intermediate original table to the temporary intermediate table by executing the field mapping relationship script between the first system database and the second system database;

第二同步单元,用于对所述临时中间表进行预处理后,将所述临时中间表中的数据导入至所述第二系统数据库原表中。The second synchronization unit is configured to import the data in the temporary intermediate table into the original table of the second system database after preprocessing the temporary intermediate table.

可选地,还包括:Optionally, also include:

第三创建单元,用于创建所述第一系统数据库与所述第二系统数据库的字段映射关系脚本。A third creation unit, configured to create a field mapping relationship script between the first system database and the second system database.

可选地,所述对所述临时中间表进行预处理具体为:Optionally, the preprocessing of the temporary intermediate table is specifically:

对所述临时中间表中的数据进行校验、清洗、修正预处理。Perform verification, cleaning, and correction preprocessing on the data in the temporary intermediate table.

可选地,还包括:Optionally, also include:

更新单元,用于更新所述字段映射关系脚本中的时间条件,使得所述临时中间原表中的数据按照所述时间条件分时间段迁移至所述临时中间表。An update unit, configured to update the time conditions in the field mapping relationship script, so that the data in the temporary intermediate original table is migrated to the temporary intermediate table in time periods according to the time conditions.

本申请第三方面提供一种数据迁移处理设备,所述设备包括处理器以及存储器:The third aspect of the present application provides a data migration processing device, the device includes a processor and a memory:

所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;The memory is used to store program codes and transmit the program codes to the processor;

所述处理器用于根据所述程序代码中的指令,执行如上述第一方面所述的数据迁移处理的方法的步骤。The processor is configured to execute the steps of the method for data migration processing as described in the first aspect above according to the instructions in the program code.

本申请第四方面提供一种计算机可读存储介质,所述计算机可读存储介质用于存储程序代码,所述程序代码用于执行上述第一方面所述的方法。A fourth aspect of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store program code, and the program code is used to execute the method described in the first aspect above.

从以上技术方案可以看出,本申请实施例具有以下优点:It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

本申请中,提供了一种数据迁移处理方法、装置、设备及存储介质,通过在新系统中创建与老系统表结构相同的临时中间原表,与新系统表结构相同的临时中间表,根据映射关系先将数据在两个中间表上进行迁移,再对临时中间表上的数据进行预处理,最后同步数据到新系统的数据库原表中,将可能出现的数据迁移错误隔离在临时中间表来解决,避免数据错误出现在新系统的线上,解决了由于实际的开发过程中,新、老系统所采用的数据库类型可能存在差异,或者新、老系统所采用的数据库表的字段结构存在差异,从而造成的数据迁移处理困难的技术问题。In this application, a data migration processing method, device, equipment and storage medium are provided. By creating a temporary intermediate original table with the same structure as the old system table in the new system and a temporary intermediate table with the same structure as the new system table, according to The mapping relationship first migrates the data on the two intermediate tables, then preprocesses the data on the temporary intermediate table, and finally synchronizes the data to the original database table of the new system, and isolates possible data migration errors in the temporary intermediate table To solve, to avoid data errors appearing on the new system line, to solve the problem that due to the actual development process, the database types used by the new and old systems may be different, or the field structure of the database tables used by the new and old systems may exist. Differences, resulting in difficult technical issues for data migration to deal with.

附图说明Description of drawings

图1为本申请实施例中数据迁移处理方法的方法流程图;Fig. 1 is the method flowchart of the data migration processing method in the embodiment of the present application;

图2为本申请实施例中数据迁移处理装置的结构示意图;FIG. 2 is a schematic structural diagram of a data migration processing device in an embodiment of the present application;

图3为本申请实施例中数据迁移处理设备的结构示意图。FIG. 3 is a schematic structural diagram of a data migration processing device in an embodiment of the present application.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the drawings in the embodiment of the application. Obviously, the described embodiment is only It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

本申请设计了一种数据迁移处理方法、装置、设备及存储介质,解决了由于实际的开发过程中,新、老系统所采用的数据库类型可能存在差异,或者新、老系统所采用的数据库表的字段结构存在差异,从而造成的数据迁移处理困难的技术问题。This application designs a data migration processing method, device, equipment, and storage medium, which solves the problem that due to the actual development process, the database types used by the new and old systems may be different, or the database tables used by the new and old systems may be different. There are differences in the field structure of the field, which causes technical problems in data migration processing difficulties.

为了便于理解,请参阅图1,图1为本申请实施例中数据迁移处理方法的方法流程图,如图1所示,具体为:For ease of understanding, please refer to Figure 1. Figure 1 is a flow chart of the data migration processing method in the embodiment of the present application, as shown in Figure 1, specifically:

S1、创建与第一系统数据库的第一系统数据库原表的表结构相同的临时中间原表;S1. Create a temporary intermediate original table having the same table structure as the original table of the first system database of the first system database;

需要说明的是,数据迁移之前,首先需要在新的数据库中,创建与旧数据库的数据库原表的表结构相同的临时中间原表。临时中间原表与旧数据库的数据库原表表字段结构相同,但没有数据。It should be noted that before data migration, it is first necessary to create a temporary intermediate original table in the new database that has the same table structure as the original database table of the old database. The temporary intermediate original table has the same field structure as the original database table of the old database, but there is no data.

S2、创建与第二系统数据库的第二系统数据库原表的表结构相同的临时中间表;S2. Create a temporary intermediate table having the same table structure as the original table of the second system database of the second system database;

需要说明的是,数据迁移之前,还需要在新的数据库中,创建与新数据库的数据库原表的表结构相同的临时中间表,即新表的备份,临时中间表与新数据库的数据库原表的表结构相同,但没有数据。It should be noted that before the data migration, it is necessary to create a temporary intermediate table in the new database with the same table structure as the original database table of the new database, that is, the backup of the new table, and the temporary intermediate table and the original database table of the new database The table structure is the same, but without the data.

S3、将第一系统数据库的第一数据库原表中的数据导入至临时中间原表中;S3. Import the data in the original table of the first database of the first system database into the temporary intermediate original table;

需要说明的是,首先将旧数据库的数据库原表中的数据导入至临时中间原表中。It should be noted that, firstly, the data in the original database table of the old database is imported into the temporary intermediate original table.

S4、通过执行第一系统数据库与第二系统数据库的字段映射关系脚本,将临时中间原表中的数据迁移至临时中间表中;S4. Migrate the data in the temporary intermediate original table to the temporary intermediate table by executing the field mapping relationship script between the first system database and the second system database;

需要说明的是,在新数据库中执行第一系统数据库与第二系统数据库的字段映射关系脚本,从而将临时中间原表中的数据迁移至临时中间表中。It should be noted that the field mapping relationship script between the first system database and the second system database is executed in the new database, so as to migrate the data in the temporary intermediate original table to the temporary intermediate table.

S5、对临时中间表进行预处理后,将临时中间表中的数据导入至第二系统数据库原表中。S5. After the temporary intermediate table is preprocessed, the data in the temporary intermediate table is imported into the original table of the second system database.

需要说明的是,对临时中间表中的数据进行预处理,确保最终数据的准确性,再将临时中间表中的数据导入至新数据库的数据库原表中。It should be noted that the data in the temporary intermediate table is preprocessed to ensure the accuracy of the final data, and then the data in the temporary intermediate table is imported into the original database table of the new database.

可以理解的是,通过使用“临时中间原表”的方式先解决了跨机器、跨数据库系统的问题,将问题简化成同一个数据库系统内不同数据表之间数据迁移问题。It is understandable that the problem of cross-machine and cross-database systems is first solved by using the "temporary intermediate original table", and the problem is simplified to the problem of data migration between different data tables in the same database system.

由于新老数据表的表字段结构不同,映射关系复杂,迁移过程容易出错。本文提出先在新系统上创建新表的备份(和新表表字段结构相同,没有数据)“临时中间表”。后续根据映射关系先在两个中间表上进行迁移,再在“临时中间表”上进行数据校验、修正的预处理,最后同步数据到对应的原表。通过这种方式将可能出现的数据转换迁移错误隔离在“临时中间表”中解决,避免数据问题出现新系统线上。Due to the different table field structures of the new and old data tables, the mapping relationship is complex, and the migration process is prone to errors. This paper proposes to first create a backup of the new table (with the same field structure as the new table, without data) "temporary intermediate table" on the new system. Follow-up migration is performed on the two intermediate tables according to the mapping relationship, and then preprocessing of data verification and correction is performed on the "temporary intermediate table", and finally the data is synchronized to the corresponding original table. In this way, possible data conversion and migration errors are isolated and solved in the "temporary intermediate table" to avoid data problems from appearing on the new system line.

通过编写映射关系sql的方式维护新老系统表字段的映射关系,迁移时直接执行sql即可,不需要手工录入,能极大地提高效率和减少错误。发现数据错误时,也不需要对数据进行逐一修改,直接修改映射关系sql并重新执行即可,便于数据的快速修正和维护。Maintain the mapping relationship between the old and new system table fields by writing the mapping relationship sql, and execute the sql directly during migration without manual entry, which can greatly improve efficiency and reduce errors. When a data error is found, there is no need to modify the data one by one, just directly modify the mapping relationship sql and execute it again, which facilitates rapid data correction and maintenance.

进一步地,步骤S4之前还包括:Further, before step S4, it also includes:

S6、创建第一系统数据库与第二系统数据库的字段映射关系脚本。S6. Create a field mapping relationship script between the first system database and the second system database.

进一步地,步骤S5中对临时中间表进行预处理具体为:Further, the preprocessing of the temporary intermediate table in step S5 is specifically:

对临时中间表中的数据进行校验、清洗、修正预处理。Perform verification, cleaning, and correction preprocessing on the data in the temporary intermediate table.

进一步地,步骤S6之后还包括:Further, after step S6, it also includes:

更新字段映射关系脚本中的时间条件,使得临时中间原表中的数据按照时间条件分时间段迁移至临时中间表。Update the time conditions in the field mapping relationship script, so that the data in the temporary intermediate original table is migrated to the temporary intermediate table in time periods according to the time conditions.

需要说明的是,在新老系统并行,需要分阶段数据迁移的场景,通过修改或更新字段映射关系脚本中的时间条件,也很容易进行分阶段的数据迁移。It should be noted that, in the scenario where the old and new systems are running side by side and phased data migration is required, it is also easy to perform phased data migration by modifying or updating the time conditions in the field mapping relationship script.

请参阅图2,图2为本申请实施例中数据迁移处理装置的结构示意图,如图2所示,具体为:Please refer to Figure 2, Figure 2 is a schematic structural diagram of the data migration processing device in the embodiment of the present application, as shown in Figure 2, specifically:

第一创建单元201,用于创建与第一系统数据库的第一系统数据库原表的表结构相同的临时中间原表;The first creating unit 201 is configured to create a temporary intermediate original table having the same table structure as the original table of the first system database of the first system database;

需要说明的是,数据迁移之前,首先需要在新的数据库中,创建与旧数据库的数据库原表的表结构相同的临时中间原表。临时中间原表与旧数据库的数据库原表表字段结构相同,但没有数据。It should be noted that before data migration, it is first necessary to create a temporary intermediate original table in the new database that has the same table structure as the original database table of the old database. The temporary intermediate original table has the same field structure as the original database table of the old database, but there is no data.

第二创建单元202,用于创建与第二系统数据库的第二系统数据库原表的表结构相同的临时中间表;The second creating unit 202 is configured to create a temporary intermediate table having the same table structure as the original table of the second system database of the second system database;

需要说明的是,数据迁移之前,还需要在新的数据库中,创建与新数据库的数据库原表的表结构相同的临时中间表,即新表的备份,临时中间表与新数据库的数据库原表的表结构相同,但没有数据。It should be noted that before the data migration, it is necessary to create a temporary intermediate table in the new database with the same table structure as the original database table of the new database, that is, the backup of the new table, and the temporary intermediate table and the original database table of the new database The table structure is the same, but without the data.

第一同步单元203,用于将第一系统数据库的第一数据库原表中的数据导入至临时中间原表中;The first synchronization unit 203 is configured to import the data in the first database original table of the first system database into the temporary intermediate original table;

需要说明的是,首先将旧数据库的数据库原表中的数据导入至临时中间原表中。It should be noted that, firstly, the data in the original database table of the old database is imported into the temporary intermediate original table.

数据迁移单元204,用于通过执行第一系统数据库与第二系统数据库的字段映射关系脚本,将临时中间原表中的数据迁移至临时中间表中;The data migration unit 204 is configured to migrate the data in the temporary intermediate original table to the temporary intermediate table by executing the field mapping relationship script between the first system database and the second system database;

需要说明的是,在新数据库中执行第一系统数据库与第二系统数据库的字段映射关系脚本,从而将临时中间原表中的数据迁移至临时中间表中。It should be noted that the field mapping relationship script between the first system database and the second system database is executed in the new database, so as to migrate the data in the temporary intermediate original table to the temporary intermediate table.

第二同步单元205,用于对临时中间表进行预处理后,将临时中间表中的数据导入至第二系统数据库原表中。The second synchronization unit 205 is configured to import the data in the temporary intermediate table into the original table of the second system database after preprocessing the temporary intermediate table.

需要说明的是,对临时中间表中的数据进行预处理,确保最终数据的准确性,再将临时中间表中的数据导入至新数据库的数据库原表中。It should be noted that the data in the temporary intermediate table is preprocessed to ensure the accuracy of the final data, and then the data in the temporary intermediate table is imported into the original database table of the new database.

可以理解的是,通过使用“临时中间原表”的方式先解决了跨机器、跨数据库系统的问题,将问题简化成同一个数据库系统内不同数据表之间数据迁移问题。It is understandable that the problem of cross-machine and cross-database systems is first solved by using the "temporary intermediate original table", and the problem is simplified to the problem of data migration between different data tables in the same database system.

由于新老数据表的表字段结构不同,映射关系复杂,迁移过程容易出错。本文提出先在新系统上创建新表的备份(和新表表字段结构相同,没有数据)“临时中间表”。后续根据映射关系先在两个中间表上进行迁移,再在“临时中间表”上进行数据校验、修正的预处理,最后同步数据到对应的原表。通过这种方式将可能出现的数据转换迁移错误隔离在“临时中间表”中解决,避免数据问题出现新系统线上。Due to the different table field structures of the new and old data tables, the mapping relationship is complex, and the migration process is prone to errors. This paper proposes to first create a backup of the new table (with the same field structure as the new table, without data) "temporary intermediate table" on the new system. Follow-up migration is performed on the two intermediate tables according to the mapping relationship, and then preprocessing of data verification and correction is performed on the "temporary intermediate table", and finally the data is synchronized to the corresponding original table. In this way, possible data conversion and migration errors are isolated and solved in the "temporary intermediate table" to avoid data problems from appearing on the new system line.

通过编写映射关系sql的方式维护新老系统表字段的映射关系,迁移时直接执行sql即可,不需要手工录入,能极大地提高效率和减少错误。发现数据错误时,也不需要对数据进行逐一修改,直接修改映射关系sql并重新执行即可,便于数据的快速修正和维护。Maintain the mapping relationship between the old and new system table fields by writing the mapping relationship sql, and execute the sql directly during migration without manual entry, which can greatly improve efficiency and reduce errors. When a data error is found, there is no need to modify the data one by one, just directly modify the mapping relationship sql and execute it again, which facilitates rapid data correction and maintenance.

进一步地,还包括:Further, it also includes:

第三创建单元,用于创建第一系统数据库与第二系统数据库的字段映射关系脚本。The third creation unit is configured to create a field mapping relationship script between the first system database and the second system database.

进一步地,对临时中间表进行预处理具体为:Further, the preprocessing of the temporary intermediate table is specifically as follows:

对临时中间表中的数据进行校验、清洗、修正预处理。Perform verification, cleaning, and correction preprocessing on the data in the temporary intermediate table.

进一步地,还包括:Further, it also includes:

更新单元,用于更新字段映射关系脚本中的时间条件,使得临时中间原表中的数据按照时间条件分时间段迁移至临时中间表。The update unit is used to update the time condition in the field mapping relationship script, so that the data in the temporary intermediate original table is migrated to the temporary intermediate table in time periods according to the time condition.

需要说明的是,在新老系统并行,需要分阶段数据迁移的场景,通过修改或更新字段映射关系脚本中的时间条件,也很容易进行分阶段的数据迁移。It should be noted that, in the scenario where the old and new systems are running side by side and phased data migration is required, it is also easy to perform phased data migration by modifying or updating the time conditions in the field mapping relationship script.

本申请实施例还提供了另一种数据迁移处理设备,如图3所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该终端可以为包括手机、平板电脑、个人数字助理(英文全称:PersonalDigitalAssistant,英文缩写:PDA)、销售终端(英文全称:Point ofSales,英文缩写:POS)、车载电脑等任意终端设备,以终端为手机为例:The embodiment of the present application also provides another data migration processing device, as shown in Figure 3, for the convenience of description, only the parts related to the embodiment of the present application are shown, and the specific technical details are not disclosed, please refer to the implementation of the present application Example methods section. The terminal can be any terminal device including mobile phone, tablet computer, personal digital assistant (English full name: Personal Digital Assistant, English abbreviation: PDA), sales terminal (English full name: Point of Sales, English abbreviation: POS), vehicle-mounted computer, etc. Take mobile phone as an example:

图3示出的是与本申请实施例提供的终端相关的手机的部分结构的框图。参考图3,手机包括:射频(英文全称:Radio Frequency,英文缩写:RF)电路1010、存储器1020、输入单元1030、显示单元1040、传感器1050、音频电路1060、无线保真(英文全称:wirelessfidelity,英文缩写:WiFi)模块1070、处理器1080、以及电源1090等部件。本领域技术人员可以理解,图3中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 3 shows a block diagram of a partial structure of a mobile phone related to the terminal provided by the embodiment of the present application. Referring to Fig. 3, the mobile phone includes: radio frequency (English full name: Radio Frequency, English abbreviation: RF) circuit 1010, memory 1020, input unit 1030, display unit 1040, sensor 1050, audio circuit 1060, wireless fidelity (English full name: wirelessfidelity, English abbreviation: WiFi module 1070 , processor 1080 , power supply 1090 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 3 does not constitute a limitation to the mobile phone, and may include more or less components than shown in the figure, or combine some components, or arrange different components.

下面结合图3对手机的各个构成部件进行具体的介绍:The following is a specific introduction to each component of the mobile phone in conjunction with Figure 3:

RF电路1010可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器1080处理;另外,将设计上行的数据发送给基站。通常,RF电路1010包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(英文全称:LowNoiseAmplifier,英文缩写:LNA)、双工器等。此外,RF电路1010还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(英文全称:Global System ofMobile communication,英文缩写:GSM)、通用分组无线服务(英文全称:GeneralPacket Radio Service,GPRS)、码分多址(英文全称:CodeDivision Multiple Access,英文缩写:CDMA)、宽带码分多址(英文全称:Wideband CodeDivisionMultipleAccess,英文缩写:WCDMA)、长期演进(英文全称:Long TermEvolution,英文缩写:LTE)、电子邮件、短消息服务(英文全称:ShortMessaging Service,SMS)等。The RF circuit 1010 can be used for sending and receiving information or receiving and sending signals during a call. In particular, after receiving the downlink information from the base station, it is processed by the processor 1080; in addition, it sends the designed uplink data to the base station. Generally, the RF circuit 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (English full name: LowNoiseAmplifier, English abbreviation: LNA), a duplexer, and the like. In addition, RF circuitry 1010 may also communicate with networks and other devices via wireless communications. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communication (English full name: Global System of Mobile communication, English abbreviation: GSM), General Packet Radio Service (English full name: General Packet Radio Service, GPRS), Code Division Multiple Access (English full name: CodeDivision Multiple Access, English abbreviation: CDMA), Wideband Code Division Multiple Access (English full name: Wideband CodeDivisionMultiple Access, English abbreviation: WCDMA), Long Term Evolution (English full name: Long TermEvolution, English abbreviation: LTE) , email, short message service (English full name: ShortMessaging Service, SMS), etc.

存储器1020可用于存储软件程序以及模块,处理器1080通过运行存储在存储器1020的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器1020可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器1020可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 1020 can be used to store software programs and modules, and the processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020 . The memory 1020 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of mobile phones (such as audio data, phonebook, etc.), etc. In addition, the memory 1020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

输入单元1030可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元1030可包括触控面板1031以及其他输入设备1032。触控面板1031,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1031上或在触控面板1031附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1031可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1080,并能接收处理器1080发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1031。除了触控面板1031,输入单元1030还可以包括其他输入设备1032。具体地,其他输入设备1032可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 1030 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032 . The touch panel 1031, also referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger or a stylus on the touch panel 1031 or near the touch panel 1031). operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 1031 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1031 , the input unit 1030 may also include other input devices 1032 . Specifically, other input devices 1032 may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.

显示单元1040可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元1040可包括显示面板1041,可选的,可以采用液晶显示器(英文全称:Liquid Crystal Display,英文缩写:LCD)、有机发光二极管(英文全称:Organic Light-Emitting Diode,英文缩写:OLED)等形式来配置显示面板1041。进一步的,触控面板1031可覆盖显示面板1041,当触控面板1031检测到在其上或附近的触摸操作后,传送给处理器1080以确定触摸事件的类型,随后处理器1080根据触摸事件的类型在显示面板1041上提供相应的视觉输出。虽然在图3中,触控面板1031与显示面板1041是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板1031与显示面板1041集成而实现手机的输入和输出功能。The display unit 1040 may be used to display information input by or provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. Optionally, a liquid crystal display (English full name: Liquid Crystal Display, English abbreviation: LCD), an organic light-emitting diode (English full name: Organic Light-Emitting Diode, English abbreviation: OLED) etc. may be used. form to configure the display panel 1041 . Furthermore, the touch panel 1031 can cover the display panel 1041, and when the touch panel 1031 detects a touch operation on or near it, it sends it to the processor 1080 to determine the type of the touch event, and then the processor 1080 determines the type of the touch event according to the The type provides a corresponding visual output on the display panel 1041 . Although in FIG. 3 , the touch panel 1031 and the display panel 1041 are used as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to form a mobile phone. Realize the input and output functions of the mobile phone.

手机还可包括至少一种传感器1050,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1041的亮度,接近传感器可在手机移动到耳边时,关闭显示面板1041和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor can include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1041 and/or when the mobile phone is moved to the ear. or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used for applications that recognize the posture of mobile phones (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. repeat.

音频电路1060、扬声器1061,传声器1062可提供用户与手机之间的音频接口。音频电路1060可将接收到的音频数据转换后的电信号,传输到扬声器1061,由扬声器1061转换为声音信号输出;另一方面,传声器1062将收集的声音信号转换为电信号,由音频电路1060接收后转换为音频数据,再将音频数据输出处理器1080处理后,经RF电路1010以发送给比如另一手机,或者将音频数据输出至存储器1020以便进一步处理。The audio circuit 1060, the speaker 1061, and the microphone 1062 can provide an audio interface between the user and the mobile phone. The audio circuit 1060 can transmit the electrical signal converted from the received audio data to the speaker 1061, and the speaker 1061 converts it into an audio signal for output; After being received, it is converted into audio data, and then the audio data is processed by the output processor 1080, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for further processing.

WiFi属于短距离无线传输技术,手机通过WiFi模块1070可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图3示出了WiFi模块1070,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1070, which provides users with wireless broadband Internet access. Although Fig. 3 shows the WiFi module 1070, it can be understood that it is not an essential component of the mobile phone, and can be completely omitted as required without changing the essence of the invention.

处理器1080是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1020内的软件程序和/或模块,以及调用存储在存储器1020内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器1080可包括一个或多个处理单元;优选的,处理器1080可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1080中。The processor 1080 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and/or modules stored in the memory 1020, and calling data stored in the memory 1020, execution Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole. Optionally, the processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 1080 .

手机还包括给各个部件供电的电源1090(比如电池),优选的,电源可以通过电源管理系统与处理器1080逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power supply 1090 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1080 through the power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system.

尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be repeated here.

在本申请实施例中,该终端所包括的处理器1080还具有以下功能:In this embodiment of the application, the processor 1080 included in the terminal also has the following functions:

S1、创建与第一系统数据库的第一系统数据库原表的表结构相同的临时中间原表;S1. Create a temporary intermediate original table having the same table structure as the original table of the first system database of the first system database;

S2、创建与第二系统数据库的第二系统数据库原表的表结构相同的临时中间表;S2. Create a temporary intermediate table having the same table structure as the original table of the second system database of the second system database;

S3、将第一系统数据库的第一数据库原表中的数据导入至临时中间原表中;S3. Import the data in the original table of the first database of the first system database into the temporary intermediate original table;

S4、通过执行第一系统数据库与第二系统数据库的字段映射关系脚本,将临时中间原表中的数据迁移至临时中间表中;S4. Migrate the data in the temporary intermediate original table to the temporary intermediate table by executing the field mapping relationship script between the first system database and the second system database;

S5、对临时中间表进行预处理后,将临时中间表中的数据导入至第二系统数据库原表中。S5. After the temporary intermediate table is preprocessed, the data in the temporary intermediate table is imported into the original table of the second system database.

本申请实施例还提供一种计算机可读存储介质,用于存储程序代码,该程序代码用于执行前述各个实施例所述的一种数据迁移处理方法中的任意一种实施方式。The embodiment of the present application further provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute any one implementation manner in the data migration processing method described in the foregoing embodiments.

本申请实施例中,提供了一种数据迁移处理方法、装置、设备及存储介质,通过在新系统中创建与老系统表结构相同的临时中间原表,与新系统表结构相同的临时中间表,根据映射关系先将数据在两个中间表上进行迁移,再对临时中间表上的数据进行预处理,最后同步数据到新系统的数据库原表中,将可能出现的数据迁移错误隔离在临时中间表来解决,避免数据错误出现在新系统的线上,解决了由于实际的开发过程中,新、老系统所采用的数据库类型可能存在差异,或者新、老系统所采用的数据库表的字段结构存在差异,从而造成的数据迁移处理困难的技术问题。In the embodiment of the present application, a data migration processing method, device, device, and storage medium are provided. By creating a temporary intermediate original table with the same structure as the old system table in the new system, the temporary intermediate table with the same structure as the new system table According to the mapping relationship, the data is first migrated on the two intermediate tables, and then the data on the temporary intermediate table is preprocessed, and finally the data is synchronized to the original database table of the new system, and possible data migration errors are isolated in the temporary The intermediate table is used to solve the problem, avoiding data errors appearing on the new system line, and solving the problem that in the actual development process, there may be differences in the database types used by the new and old systems, or the fields of the database tables used by the new and old systems There are differences in the structure, resulting in difficult technical problems in data migration.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

本申请的说明书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description of the present application and the above drawings are used to distinguish similar objects and not necessarily to describe specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein, for example, can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that in this application, "at least one (item)" means one or more, and "multiple" means two or more. "And/or" is used to describe the association relationship of associated objects, indicating that there can be three types of relationships, for example, "A and/or B" can mean: only A exists, only B exists, and A and B exist at the same time , where A and B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c ", where a, b, c can be single or multiple.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(英文全称:Read-OnlyMemory,英文缩写:ROM)、随机存取存储器(英文全称:RandomAccess Memory,英文缩写:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English full name: Read-OnlyMemory, English abbreviation: ROM), random access memory (English full name: RandomAccess Memory, English abbreviation: RAM), magnetic disk or CDs and other media that can store program codes.

以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still understand the foregoing The technical solutions described in each embodiment are modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the application.

Claims (10)

1. A data migration processing method, comprising:
s1, creating a temporary intermediate original table with the same table structure as a first system database original table of a first system database;
s2, creating a temporary intermediate table with the same table structure as the original table of the second system database;
s3, importing data in a first database original table of the first system database into the temporary intermediate original table;
s4, migrating the data in the temporary intermediate original table to the temporary intermediate table by executing a field mapping relation script of the first system database and the second system database;
s5, after preprocessing the temporary intermediate table, importing the data in the temporary intermediate table into the original table of the second system database.
2. The data migration processing method according to claim 1, further comprising, before the step S4:
s6, creating a field mapping relation script of the first system database and the second system database.
3. The data migration processing method according to claim 1, wherein the preprocessing of the temporary intermediate table in step S5 specifically includes:
and checking, cleaning and correcting the data in the temporary intermediate table.
4. The data migration processing method according to claim 1, wherein after the step S6, further comprising:
and updating the time condition in the field mapping relation script, so that the data in the temporary intermediate original table is migrated to the temporary intermediate table according to the time condition in a time period.
5. A data migration processing apparatus, comprising:
a first creation unit configured to create a temporary intermediate original table having the same table structure as the first system database original table of the first system database;
a second creating unit for creating a temporary intermediate table having the same table structure as the original table of the second system database;
the first synchronization unit is used for importing the data in the first database original table of the first system database into the temporary intermediate original table;
the data migration unit is used for migrating the data in the temporary intermediate original table to the temporary intermediate table by executing the field mapping relation script of the first system database and the second system database;
and the second synchronization unit is used for importing the data in the temporary intermediate table into the original table of the second system database after preprocessing the temporary intermediate table.
6. The data migration processing apparatus according to claim 5, further comprising:
and the third creating unit is used for creating a field mapping relation script of the first system database and the second system database.
7. The data migration processing apparatus according to claim 5, wherein the preprocessing of the temporary intermediate table is specifically:
and checking, cleaning and correcting the data in the temporary intermediate table.
8. The data migration processing apparatus according to claim 5, further comprising:
and the updating unit is used for updating the time condition in the field mapping relation script so that the data in the temporary intermediate original table is migrated to the temporary intermediate table according to the time condition in a time period.
9. A data migration processing apparatus, the apparatus comprising a processor and a memory:
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is configured to perform the data migration processing method according to any one of claims 1-4 according to instructions in the program code.
10. A computer-readable storage medium storing a program code for executing the data migration processing method according to any one of claims 1 to 4.
CN202310242942.XA 2023-03-14 2023-03-14 Data migration processing method, device, equipment and storage medium Pending CN116257503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310242942.XA CN116257503A (en) 2023-03-14 2023-03-14 Data migration processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310242942.XA CN116257503A (en) 2023-03-14 2023-03-14 Data migration processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116257503A true CN116257503A (en) 2023-06-13

Family

ID=86686097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310242942.XA Pending CN116257503A (en) 2023-03-14 2023-03-14 Data migration processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116257503A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117216036A (en) * 2023-09-26 2023-12-12 中国建设银行股份有限公司 Data migration method and system, equipment, medium and product thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7548898B1 (en) * 2001-02-28 2009-06-16 Teradata Us, Inc. Parallel migration of data between systems
CN108536822A (en) * 2018-04-09 2018-09-14 平安普惠企业管理有限公司 Data migration method, device, system and storage medium
CN112306994A (en) * 2020-11-10 2021-02-02 北京沃东天骏信息技术有限公司 Database data migration method and device and storage medium
WO2021218142A1 (en) * 2020-04-30 2021-11-04 平安科技(深圳)有限公司 Data migration method and apparatus, and electronic device and computer readable storage medium
US20220092040A1 (en) * 2020-09-18 2022-03-24 Armiq Co., Ltd. Method and system for selective transfer of organizational data in case of divestiture
CN114528272A (en) * 2022-01-07 2022-05-24 南方电网深圳数字电网研究院有限公司 Intelligent implementation method and device for data migration
CN115080540A (en) * 2022-06-16 2022-09-20 金蝶软件(中国)有限公司 Data migration method and device, computer equipment and storage medium
CN115454964A (en) * 2022-09-07 2022-12-09 浩云科技股份有限公司 Data migration method and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7548898B1 (en) * 2001-02-28 2009-06-16 Teradata Us, Inc. Parallel migration of data between systems
CN108536822A (en) * 2018-04-09 2018-09-14 平安普惠企业管理有限公司 Data migration method, device, system and storage medium
WO2021218142A1 (en) * 2020-04-30 2021-11-04 平安科技(深圳)有限公司 Data migration method and apparatus, and electronic device and computer readable storage medium
US20220092040A1 (en) * 2020-09-18 2022-03-24 Armiq Co., Ltd. Method and system for selective transfer of organizational data in case of divestiture
CN112306994A (en) * 2020-11-10 2021-02-02 北京沃东天骏信息技术有限公司 Database data migration method and device and storage medium
CN114528272A (en) * 2022-01-07 2022-05-24 南方电网深圳数字电网研究院有限公司 Intelligent implementation method and device for data migration
CN115080540A (en) * 2022-06-16 2022-09-20 金蝶软件(中国)有限公司 Data migration method and device, computer equipment and storage medium
CN115454964A (en) * 2022-09-07 2022-12-09 浩云科技股份有限公司 Data migration method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117216036A (en) * 2023-09-26 2023-12-12 中国建设银行股份有限公司 Data migration method and system, equipment, medium and product thereof

Similar Documents

Publication Publication Date Title
CN111142711B (en) Firmware configuration method and device, storage medium and mobile terminal
CN104765591A (en) Method and system for updating software configuration parameter, and terminal server
WO2018120905A1 (en) Message reminding method for terminal, and terminal
CN106488391B (en) A data migration method and terminal device
WO2015035947A1 (en) Method for realizing cellphone without card, cellphone and server
CN110830127B (en) Radio frequency parameter processing method and device, mobile terminal and storage medium
CN106658353A (en) A data migration method and terminal equipment
CN106445739B (en) Data migration method and terminal equipment
CN106484563B (en) Data migration method and terminal equipment
CN105792299A (en) Optimal use method, device and mobile terminal of 3G network
WO2023160250A1 (en) Display brightness control method, apparatus, electronic device, and storage medium
CN116257503A (en) Data migration processing method, device, equipment and storage medium
KR20210142734A (en) Reporting method, configuration method, terminal and network device
CN111104186A (en) Bluetooth configuration file loading method and device, storage medium and terminal equipment
CN112099830A (en) System updating method, equipment and computer readable storage medium
CN116881143A (en) Data object copying abnormality investigation method, device, equipment and storage medium
US10110720B2 (en) Dialing method for user terminal and user terminal
CN107979688A (en) The management method and mobile terminal of a kind of application program
CN106487649A (en) Group message prompt control method and terminal device
CN114488928A (en) A PLC program frame generation method, system, device and storage medium
CN106453845A (en) Data transmission method and equipment
CN106230647A (en) A message processing method, device, server and message processing system
KR20210092288A (en) Time information acquisition method, transmission method, terminal and network device
CN105279175B (en) Data transmission method and device
CN112416582B (en) BSP system self-adaption method, client, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination