Data migration method, device, medium and product of database system

By obtaining the object information to be migrated and parsing log files in the database system, flexible data migration is achieved, solving the problem of insufficient flexibility in the traditional complete downtime migration method, and improving the flexibility of data migration and the stability of business operations.

CN119782278APending Publication Date: 2025-04-08CETC JINCANG (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411783100.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The data migration method of traditional database systems requires complete downtime, resulting in inflexible data migration and affecting database business operations.

Method used

By obtaining pre-configured information about migration, migrating stock data between the source database and the target database, and obtaining the source database based on the log file, and gradually performing corresponding operations on the target database, thereby achieving flexible data migration.

Benefits of technology

It realizes data migration while maintaining external services of the source database, improves the flexibility of database data migration, and reduces the impact of data migration on business operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782278A_ABST
    Figure CN119782278A_ABST
Patent Text Reader

Abstract

The present invention provides a data migration method, device, medium and product for a database system. The data migration method for a database system includes: obtaining pre-configured information of objects to be migrated; migrating stock data between a source database and a target database according to the information of objects to be migrated; detecting that the migration of stock data is completed, obtaining a log file of the source database according to the information of objects to be migrated; parsing the log file to obtain operations on the source database; and executing operations on the target database. Data migration can be selectively performed between the source database and the target database by configuring the information of objects to be migrated, and the external services of the source database can be maintained during the data migration process. Therefore, this solution can improve the flexibility of database data migration work while reducing the impact of data migration on business operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] During the operation of the database system, due to business expansion or optimization of the technical architecture, the current database may not be able to meet the needs. At this time, it is necessary to build a new database and migrate the data of the original database to the new database. The original database is also called the source database, and the new database is also called the target database. The traditional data migration method usually uses a complete shutdown to complete the data migration. Generally speaking, when the data migration starts, the external service of the original database is stopped, and then all the data of the original database is migrated to the new database. After the migration is completed, it is directly switched to the new database to restart the external service. Because the migration process completely stops the external service and there is no data modification, the complete shutdown method can better ensure the data consistency between the new database and the original database, but the data migration is not flexible enough and has an adverse impact on the business operation of the database. Summary of the invention

[0003] An object of the present invention is to provide a data migration method, device, medium and product for a database system that makes data migration more flexible.

[0004] In particular, the present invention provides a data migration method for a database system, comprising:

[0005] Get the pre-configured information of objects to be migrated;

[0006] Migrating existing data between the source database and the target database according to the information of the object to be migrated;

[0007] It is detected that the migration of the existing data is completed, and the log file of the source database is obtained according to the information of the object to be migrated;

[0008] Parsing the log file to obtain operations on the source database;

[0009] The operation is performed on the target database.

[0010] Optionally, the step of migrating stock data between the source database and the target database according to the information of the object to be migrated includes:

[0011] If the object information to be migrated includes multiple database objects, grouping all the database objects involved;

[0012] A corresponding number of migration threads are called according to the number of groups, and each of the migration threads executes the migration work of the database objects in a corresponding group.

[0013] Optionally, the step of migrating stock data between the source database and the target database according to the information of the object to be migrated includes:

[0014] The migration log node information is recorded, where the migration log node information at least includes the name of the migrated database object and the timestamp when the database object is migrated.

[0015] Optionally, the step of obtaining the log file of the source database according to the information of the object to be migrated includes:

[0016] Reading a log file of the source database and reading database object information of the log file;

[0017] Determine whether the database object information belongs to the object information to be migrated, if so, obtain the log file, if not, skip the log file.

[0018] Optionally, if the database object information does not belong to the object information to be migrated, the database object information of the log file is recorded in a preset blacklist buffer;

[0019] The step of determining whether the database object information belongs to the object information to be migrated includes:

[0020] Detect whether the database object information of the log file exists in the blacklist buffer. If so, execute the step of skipping the log file. If not, execute the step of determining whether the database object information belongs to the object information to be migrated.

[0021] Optionally, if the database object information belongs to the object information to be migrated, the database object information of the log file is recorded in a preset whitelist buffer;

[0022] The step of determining whether the database object information belongs to the object information to be migrated includes:

[0023] Detect whether the database object information of the log file exists in the whitelist buffer. If so, execute the step of obtaining the log file. If not, execute the step of determining whether the database object information belongs to the object information to be migrated.

[0024] Optionally, the data migration method of the database system includes:

[0025] Stop the write operation of the source database;

[0026] Switch the client's database to the target database.

[0027] According to another aspect of the present invention, a computer device is also provided, comprising a memory, a processor, and a computer executable program stored in the memory and running on the processor, and when the processor executes the computer executable program, the data migration method of the database system according to any one of the above items is implemented.

[0028] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer-executable program is stored. When the computer-executable program is executed by a processor, the method for data migration of a database system according to any one of the above items is implemented.

[0029] According to another aspect of the present invention, a computer program product is provided, including a computer executable program, and when the computer executable program is executed by a processor, the method for migrating data in a database system according to any one of the above items is implemented.

[0030] The data migration method, device, medium and product of the database system of the present invention obtains pre-configured information of objects to be migrated, performs stock data migration between the source database and the target database according to the information of the objects to be migrated, detects that the migration of stock data is completed, obtains the log file of the source database according to the information of the objects to be migrated, parses the log file, obtains the operation on the source database, and executes the operation on the target database, so that data can be selectively migrated between the source database and the target database by configuring the information of the objects to be migrated. In addition, the stock data is migrated first, and then the data is migrated according to the log file. On the basis of being able to selectively migrate data according to the information of the objects to be migrated, the external service of the source database can be maintained during the data migration process. Therefore, this solution can improve the flexibility of database data migration work and reduce the impact of data migration on business operations.

[0031] Based on the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will become more aware of the above and other objects, advantages and features of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:

[0033] Figure 1 is a schematic flow chart of a data migration method of a database system according to an embodiment of the present invention;

[0034] Figure 2 is a schematic flow chart of a step of obtaining a log file according to information of an object to be migrated in a data migration method of a database system according to an embodiment of the present invention;

[0035] Figure 3 is a schematic flow chart of a step of performing stock data migration according to information of objects to be migrated in a data migration method of a database system according to an embodiment of the present invention;

[0036] Figure 4 is a schematic flow chart of a data migration method of a database system according to another embodiment of the present invention;

[0037] Figure 5 is a schematic flow chart of a data migration method of a database system according to yet another embodiment of the present invention;

[0038] Figure 6 is a schematic flow chart of a data migration method of a database system according to yet another embodiment of the present invention;

[0039] Figure 7 is a schematic diagram of a computer device according to an embodiment of the present invention;

[0040] Figure 8 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention;

[0041] Fig. 9 is a schematic diagram of a computer program product according to an embodiment of the present invention. DETAILED DESCRIPTION

[0042] It should be understood by those skilled in the art that the embodiments described below are only some embodiments of the present invention, rather than all embodiments of the present invention, and these embodiments are intended to explain the technical principles of the present invention, rather than to limit the protection scope of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should still fall within the protection scope of the present invention.

[0043] It should be noted that the logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or equipment (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or equipment and execute instructions), or used in combination with these instruction execution systems, devices or equipment.

[0044] The flow chart provided by the present invention is not intended to indicate that the operation of the method will be performed in any particular order, or all operations of the method are included in all every case. In addition, the method may include additional operations. Within the scope of the technical thinking provided by the present embodiment method, additional changes can be made to the above method.

[0045] like Figure 1 As shown, in one embodiment, the data migration method of the database system generally includes:

[0046] Step S101, obtain pre-configured information of objects to be migrated. Specifically, the information of objects to be migrated is the database objects that need to be migrated from the source database to the target database, such as schema (a schema used to define the structure of the database), table (a database table), column (a part of a database table), and other object types. The configuration method can be performed in the format of a specific expression, for example, for a database table, the configuration can be performed in the format of "database name.table name".

[0047] Step S102, migrate the stock data between the source database and the target database according to the information of the object to be migrated. Specifically, when migrating the stock data, search the database object in the source database according to the pre-configured information of the object to be migrated, that is, search the database object configured in the information of the object to be migrated in the source database, and migrate the searched database object to the target database.

[0048] In one embodiment, this step also includes recording migration log node information, where the migration log node information includes at least the name of the migrated database object and the timestamp when the database object is migrated. By recording the migration log node information during the storage data migration process, it is helpful to subsequently verify the completion of the stock data migration based on the migration log node information.

[0049] Step S103, it is detected that the migration of the stock data is completed, and the log file of the source database is obtained according to the information of the object to be migrated. Specifically, after all the database objects recorded in the information of the object to be migrated are migrated, the migration of the stock data is completed. Then, the log file of the source database is obtained according to the information of the object to be migrated. The log file will record the database object information targeted by the operation performed on the source database, such as the database table name, column ID (Identity Document, unique code), etc. By checking the database object information targeted by the log file, only the log file whose database object information is recorded in the information of the object to be migrated is obtained.

[0050] In addition, the log files of the source database can be obtained according to the information of the object to be migrated by searching for the log files from the start time of the stock data migration. Alternatively, a new blank log storage file can be created before the data migration starts, and the log files of the operations that occur after the start of the data migration are recorded in the new log storage file. Then, the log files of the source database can be obtained according to the information of the object to be migrated by searching directly from the first log file in the newly created log storage file.

[0051] Reference Figure 2 As shown, this step includes:

[0052] Step S201, read the log file of the source database and read the database object information of the log file. Specifically, the log file is usually divided into multiple parts, including header information, content information, etc. The database object information to which the log file belongs is generally recorded in the header information, that is, when searching the storage location of the log file, each time a log file is traversed, the database object information recorded in its header information is checked first, and then it is decided whether to extract it completely from the storage text.

[0053] Step S202, determine whether the database object information belongs to the object information to be migrated, if yes, execute step S203, if no, execute step S204. After reading the database object information of the log file, check whether the database object information is recorded in the object information to be migrated.

[0054] Step S203, obtaining a log file. If the database object information in the log file is information about an object to be migrated, it means that the operation recorded in the log file needs to be synchronized to the target database, so the complete log file is extracted from the storage location.

[0055] Step S204, skip the log file. If the database object information in the log file does not belong to the object information to be migrated, it means that the operation recorded in the log file does not need to be synchronized to the target database, so the log file will be skipped, that is, there is no need to obtain the log file.

[0056] Step S104, parsing the log file to obtain the operation on the source database. Specifically, after obtaining the corresponding log file, the specific operation on the source database recorded in the log file can be obtained by parsing the log file.

[0057] Step S105, executing the operation on the target database. The parsed specific operation is executed on the target, so that the data of the target database gradually becomes consistent with the data of the source database. When all operations that occur after the start of data migration are executed on the target database, the data of the target database becomes consistent with the data of the source database.

[0058] Because the existing data is migrated first and then the subsequent data migration is performed according to the log files, the source database can continue to provide external services during the data migration process. In other words, there is no need to shut down the source database because all operations during this period will be executed again on the target database.

[0059] In the scheme of this embodiment, by obtaining the pre-configured information of the objects to be migrated, the stock data is migrated between the source database and the target database according to the information of the objects to be migrated, the completion of the migration of the stock data is detected, the log file of the source database is obtained according to the information of the objects to be migrated, the log file is parsed, the operation on the source database is obtained, and the operation is performed on the target database, so that data migration can be selectively performed between the source database and the target database by configuring the information of the objects to be migrated. In addition, the stock data is migrated first, and then the data is migrated according to the log file. On the basis of being able to selectively migrate data according to the information of the objects to be migrated, the external services of the source database can be maintained during the data migration process. Therefore, this scheme can improve the flexibility of database data migration work, while reducing the impact of data migration on business operations.

[0060] like Figure 3 As shown, in one embodiment, the steps of migrating stock data between the source database and the target database according to the information of the object to be migrated include:

[0061] Step S301, grouping all database objects involved. Specifically, grouping all database objects recorded in the object information to be migrated. The grouping method can be based on type or data volume, for example, grouping database objects of the same type into one group, or grouping all database objects into multiple groups where the data volume in each group is within a preset data volume.

[0062] Step S302: Call a corresponding number of migration threads according to the number of groups, and each migration thread performs the migration of the database objects in a corresponding group. Specifically, multiple migration threads are called, and one migration thread is responsible for the migration of the database objects in one group. Multiple migration threads perform the stock data migration work at the same time, which helps to speed up the execution efficiency of the stock data migration between the source database and the target database.

[0063] like Figure 4As shown, in one embodiment, when the database object information does not belong to the object information to be migrated, the database object information of the log file is recorded in a preset blacklist buffer, and before the step of determining whether the database object information belongs to the object information to be migrated, the step includes: detecting whether the database object information of the log file exists in the blacklist buffer, if so, executing the step of skipping the log file, and if not, executing the step of determining whether the database object information belongs to the object information to be migrated.

[0064] Reference Figure 4 As shown, in this embodiment, the data migration method of the database system generally includes:

[0065] Step S401, read the log file of the source database and read the database object information of the log file.

[0066] Step S402, detect whether the database object information of the log file exists in the blacklist buffer, if yes, execute step S406, if no, execute step S403. Specifically, a blacklist buffer is created in advance, and the blacklist buffer is used to record the database object information that does not exist in the object information to be migrated.

[0067] Step S403, determine whether the database object information belongs to the object information to be migrated, if yes, execute step S404, if no, execute step S405. After reading the database object information of the log file, check whether the database object information is recorded in the object information to be migrated.

[0068] Step S404, obtaining a log file.

[0069] Step S405: Record the database object information of the log file in a preset blacklist buffer.

[0070] Step S406, skip the log file.

[0071] Specifically, after reading the database object information in the log file, first check whether the database object information of the log file is in the blacklist buffer. If it is, it means that the log file does not exist in the object information to be migrated, and the log file is skipped. If it is not in the blacklist buffer, there are two possibilities. One is that the database object information exists in the object information to be migrated, and the other is that although the database object information does not exist in the object information to be migrated, it has not been recorded in the blacklist buffer. Therefore, it is judged whether the database object information belongs to the object information to be migrated. If it does, the log file is obtained. If it does not belong, the corresponding database object information is first recorded in the blacklist buffer, so that it can be found from the blacklist buffer when the log file of the same database object is read next time, and then the log file is skipped.

[0072] In the scheme of this embodiment, by setting a blacklist cache, when the database object of the log file does not belong to the object information to be migrated, the database object information of the log file is recorded in the blacklist cache, so that the blacklist cache can be used to determine whether the log file needs to be skipped. If it cannot be found, the object information to be migrated is searched. In this way, the cache can be checked first, and then the object information to be migrated of the external configuration can be checked. The cache search is faster, which is beneficial to reduce the frequency of connection with the external configuration, thereby reducing resource consumption.

[0073] Reference Figure 5 As shown, in this embodiment, the data migration method of the database system generally includes:

[0074] Step S501, read the log file of the source database and read the database object information of the log file.

[0075] Step S502, check whether the database object information of the log file exists in the whitelist buffer, if yes, execute step S505, if no, execute step S503. Specifically, a whitelist buffer is created in advance, and the whitelist buffer is used to record the database object information that does not exist in the object information to be migrated.

[0076] Step S503, determine whether the database object information belongs to the object information to be migrated, if yes, execute step S504, if no, execute step S506. After reading the database object information of the log file, check whether the database object information is recorded in the object information to be migrated.

[0077] Step S504: Record the database object information of the log file in a preset whitelist buffer.

[0078] Step S505, obtaining a log file.

[0079] Step S506, skip the log file.

[0080] Specifically, after reading the database object information in the log file, first check whether the database object information of the log file is in the whitelist buffer. If it exists, it means that the log file exists in the object information to be migrated, and the log file is obtained. If it is not in the whitelist buffer, there are two possibilities. One is that the database object information does not exist in the object information to be migrated, and the other is that although the database object information exists in the object information to be migrated, it has not been recorded in the whitelist buffer. Therefore, it is determined whether the database object information belongs to the object information to be migrated. If it does, the corresponding database object information is first recorded in the whitelist buffer, so that the next time the log file of the same database object is read, it can be found in the whitelist buffer, and then the log file is obtained. If it does not belong, skip the log file.

[0081] In the scheme of this embodiment, by setting a whitelist cache, when the database object of the log file belongs to the object information that needs to be migrated, the database object information of the log file is recorded in the whitelist cache, so that the whitelist cache can be used to determine whether the log file needs to be obtained. If it cannot be found, the object information that needs to be migrated is searched. In this way, the cache can be checked first, and then the object information that needs to be migrated in the external configuration can be checked. The cache search is faster, which is beneficial to reduce the frequency of connection with the external configuration, thereby reducing resource consumption.

[0082] like Figure 6 As shown, in one embodiment, the data migration method of the database system generally includes:

[0083] Step S601, read the log file of the source database and read the database object information of the log file.

[0084] Step S602, detect whether the database object information of the log file exists in the blacklist buffer, if so, execute step S608, if not, execute step S603.

[0085] Step S603, detecting whether the database object information of the log file exists in the whitelist buffer, if so, executing step S606, if not, executing step S604.

[0086] Step S604, determine whether the database object information belongs to the object information to be migrated, if yes, execute step S605, if no, execute step S607. After reading the database object information of the log file, check whether the database object information is recorded in the object information to be migrated.

[0087] Step S605: Record the database object information of the log file in a preset whitelist buffer.

[0088] Step S606, obtaining a log file.

[0089] Step S607: Record the database object information of the log file in a preset blacklist buffer.

[0090] Step S608, skip the log file.

[0091] Specifically, a blacklist buffer and a whitelist buffer are created in advance, the blacklist buffer is used to record the database object information that does not exist in the object information to be migrated, and the whitelist buffer is used to record the database object information that exists in the object information to be migrated. After reading the database object information in the log file, first check whether the database object information of the log file is in the blacklist buffer. If it exists, it means that the log file does not exist in the object information to be migrated, and the log file is skipped.

[0092] If it is not in the blacklist cache, there are two possibilities: one is that the database object information exists in the object information to be migrated, and the other is that although the database object information does not exist in the object information to be migrated, it has not been recorded in the blacklist cache. Therefore, check whether the database object information exists in the whitelist cache. If it does, it means that the database object information exists in the object information to be migrated, and obtain the log file.

[0093] If it is not in the whitelist buffer, and it has been determined that it is not in the blacklist buffer, the database object information may not exist in the object information to be migrated but has not been recorded in the blacklist buffer, or it exists in the object information to be migrated but has not been recorded in the whitelist buffer. So it is judged whether the database object information belongs to the object information to be migrated. If it does, the corresponding database object information is first recorded in the whitelist buffer, so that it can be found from the whitelist buffer the next time the log file of the same database object is read, and then the log file is obtained. If it does not belong, the corresponding database object information is first recorded in the blacklist buffer, so that it can be found from the blacklist buffer the next time the log file of the same database object is read, and then the log file is skipped. In this way, the cache can be checked first, and then the externally configured object information to be migrated can be checked, and the cache can be searched faster, which is conducive to reducing the frequency of connection with the external configuration, thereby reducing resource consumption.

[0094] In one embodiment, the data migration method of the database system generally includes: stopping the write operation of the source database; switching the database of the client to the target database. Specifically, when all operations that occurred in the source database after the start of data migration are executed in the target database, the data in the target database becomes consistent with the data in the source database. At this time, the write operation of the source database can be stopped, so that the data in the source database cannot be modified, and then the database of the client is switched to the target database, and the target database can be used for subsequent external services.

[0095] This embodiment also provides a computer device and a computer-readable storage medium. Figure 7 is a schematic diagram of a computer device 10 according to one embodiment of the present invention. Figure 8is a schematic diagram of a computer-readable storage medium 20 according to one embodiment of the present invention.

[0096] The computer device 10 may include a memory 110, a processor 120, and a computer executable program 11 stored in the memory 110 and running on the processor 120, and the processor 120 implements the data migration method of the database system of any of the above embodiments when executing the computer executable program 11.

[0097] The computer-readable storage medium 20 stores a computer-executable program 11 thereon. When the computer-executable program 11 is executed by a processor, the data migration method of the database system of any of the above-mentioned embodiments can be implemented.

[0098] This embodiment also provides a computer program product. Fig. 9 1 is a schematic diagram of a computer program product 30 according to an embodiment of the present invention. The computer program product 30 includes a computer executable program 11, and when the computer executable program 11 is executed by a processor 120, it can implement any of the above-mentioned methods for migrating data in a database system.

[0099] Specifically, the computer executable program 11 for performing the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, computer instructions, computer-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.

[0100] For the purpose of the description of the present embodiment, the computer-readable storage medium 20 can be any device that can contain, store, communicate, propagate or transmit a program for use with an instruction execution system, device or equipment or in conjunction with these instruction execution systems, devices or equipment. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium 20 can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting or processing in other suitable ways as necessary, and then stored in a computer memory.

[0101] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.

[0102] The computer device 10 may be, for example, a server, a desktop computer, a notebook computer, a tablet computer, or a smart phone. In some examples, the computer device 10 may be a cloud acquisition node. The computer device 10 may be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, a program module may include routines, programs, object programs, components, logic, data structures, etc. that perform specific tasks or implement specific abstract data types. The computer device 10 may be implemented in a distributed cloud acquisition environment where remote processing devices linked via a communication network perform tasks. In a distributed cloud acquisition environment, program modules may be located on a local or remote acquisition system storage medium including a storage device.

[0103] The computer device 10 may include a processor 120 adapted to execute stored instructions, and a memory 110 that provides temporary storage space for the operation of the instructions during operation. The processor 120 may be a single-core processor, a multi-core processor, an acquisition cluster, or any number of other configurations. The memory 110 may include random access memory (RAM), read-only memory, flash memory, or any other suitable storage system.

[0104] The processor 120 may be connected to an I / O interface (input / output interface) suitable for connecting the computer device 10 to one or more I / O devices (input / output devices) via a system interconnect (e.g., PCI, PCI-Express, etc.). The I / O devices may include, for example, a keyboard and a pointing device, wherein the pointing device may include a touch pad or a touch screen, etc. The I / O devices may be built-in components of the computer device 10, or may be devices externally connected to an acquisition device.

[0105] Processor 120 can also be linked to a display interface suitable for connecting computer device 10 to a display device through a system interconnection. Display device can include a display screen as a built-in component of computer device 10. Display device can also include a computer monitor, a television or a projector, etc., which are externally connected to computer device 10. In addition, a network interface controller (NIC) can be suitable for connecting computer device 10 to a network through a system interconnection. In some embodiments, NIC can use any suitable interface or protocol (such as an Internet small computer system interface, etc.) to transmit data. The network can be a cellular network, a radio network, a wide area network (WAN), a local area network (LAN) or the Internet, etc. A remote device can be connected to a computer device through a network.

[0106] At this point, those skilled in the art should recognize that, although multiple exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications that conform to the principles of the present invention can still be directly determined or derived based on the content disclosed in the present invention without departing from the spirit and scope of the present invention. Therefore, the scope of the present invention should be understood and recognized as covering all these other variations or modifications.

Claims

1. A data migration method for a database system, comprising: Get the pre-configured information of objects to be migrated; Migrating existing data between the source database and the target database according to the information of the object to be migrated; It is detected that the migration of the existing data is completed, and the log file of the source database is obtained according to the information of the object to be migrated; Parsing the log file to obtain operations on the source database; The operation is performed on the target database.

2. The data migration method of a database system according to claim 1, wherein: The step of migrating the stock data between the source database and the target database according to the information of the object to be migrated includes: If the object information to be migrated includes multiple database objects, grouping all the database objects involved; A corresponding number of migration threads are called according to the number of groups, and each of the migration threads executes the migration work of the database objects in a corresponding group.

3. The data migration method of a database system according to claim 1, wherein: The step of migrating the stock data between the source database and the target database according to the information of the object to be migrated includes: The migration log node information is recorded, where the migration log node information at least includes the name of the migrated database object and the timestamp when the database object is migrated.

4. The data migration method of a database system according to claim 1, wherein: The step of obtaining the log file of the source database according to the information of the object to be migrated includes: Reading a log file of the source database and reading database object information of the log file; Determine whether the database object information belongs to the object information to be migrated, if so, obtain the log file, if not, skip the log file.

5. The data migration method of a database system according to claim 4, wherein: If the database object information does not belong to the object information to be migrated, the database object information of the log file is recorded in a preset blacklist buffer; The step of determining whether the database object information belongs to the object information to be migrated includes: Detect whether the database object information of the log file exists in the blacklist buffer. If so, execute the step of skipping the log file. If not, execute the step of determining whether the database object information belongs to the object information to be migrated.

6. The method for data migration of a database system according to claim 4, wherein: If the database object information belongs to the object information to be migrated, the database object information of the log file is recorded in a preset whitelist buffer; The step of determining whether the database object information belongs to the object information to be migrated includes: Detect whether the database object information of the log file exists in the whitelist buffer. If so, execute the step of obtaining the log file. If not, execute the step of determining whether the database object information belongs to the object information to be migrated.

7. The method for data migration of a database system according to claim 1, wherein: The data migration method of the database system includes: Stop the write operation of the source database; Switch the client's database to the target database.

8. A computer device, comprising a memory, a processor, and a computer executable program stored in the memory and running on the processor, wherein the processor implements the data migration method of the database system according to any one of claims 1 to 7 when executing the computer executable program.

9. A computer-readable storage medium having a computer-executable program stored thereon, wherein the computer-executable program, when executed by a processor, implements the data migration method of the database system according to any one of claims 1 to 7.

10. A computer program product, comprising a computer executable program, wherein when the computer executable program is executed by a processor, the method for migrating data in a database system according to any one of claims 1 to 7 is implemented.