Data migration method and device and computer readable storage medium

Through customer dimension slice processing and real-time monitoring, the problem of business data migration in the banking system needs to be shut down, and business data migration is realized without shutdown, ensuring data consistency and business continuity, and improving customer experience.

CN119311668APending Publication Date: 2025-01-14CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411362418.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing technology requires downtime when migrating business data in the banking system, which affects business continuity and causes large losses, and cannot achieve business data migration without downtime.

Method used

By slicing business data based on customer dimensions, generating status tables to be migrated, detecting online transaction operations and migrating unmigrated customer business data to the sub-store, real-time monitoring and grayscale verification during the data migration process, ensuring data consistency and business continuity.

Benefits of technology

It realizes business data migration without shutdown, ensures lossless customer real-time traffic and real-time data consistency, and enhances customer experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311668A_ABST
    Figure CN119311668A_ABST
Patent Text Reader

Abstract

The invention discloses a data migration method and device and a computer readable storage medium, and the method comprises the steps: carrying out the slicing processing of customer business data based on customer dimensions, and obtaining a to-be-migrated state table which comprises a migration state; when an online transaction operation is detected, determining a migration state of a transaction client corresponding to the online transaction operation based on the to-be-migrated state table; if the migration state corresponding to the transaction customer is a non-migration state, migrating customer business data corresponding to the transaction customer to a sub-library based on the to-be-migrated state table; and when migration of the customer business data corresponding to the transaction customer is completed, executing the online transaction operation in the sub-library. Through gradual migration of the service data, the service data migration can be completed on the basis of ensuring that the real-time flow of a customer is lossless, the real-time consistency of the data is ensured, the customer experience is enhanced, and the service data migration under the condition of no shutdown is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data migration method, device and computer-readable storage medium. Background Art

[0002] For banking systems, with the rapid development of business and the rapid growth of data, it is a common method to upgrade and transform the early database system and use sub-databases and sub-tables to increase the horizontal scalability and availability of the database. Therefore, it is necessary to migrate the business data of the source system database to the multiple sub-databases of the new system.

[0003] At present, the common way to handle business and data migration for application systems is to shut down for a period of time, complete data migration manually or with special software during the downtime, and restart the system after verification. Although the entire process ensures data consistency before and after migration, it cannot guarantee business continuity, which has a great impact and loss on key business systems.

[0004] Therefore, how to achieve business data migration without downtime is a problem that needs to be solved urgently. Summary of the invention

[0005] The main purpose of the present application is to provide a data migration method, device and computer-readable storage medium, aiming to solve the technical problem of how to achieve business data migration without downtime.

[0006] To achieve the above object, the present application provides a data migration method, which comprises the following steps:

[0007] Slice the customer business data based on the customer dimension to obtain a state table to be migrated, where the state table to be migrated includes a migration state;

[0008] When an online transaction operation is detected, determining a migration status of a transaction client corresponding to the online transaction operation based on the to-be-migrated status table;

[0009] If the migration status corresponding to the transaction customer is not migrated, then based on the to-be-migrated status table, the customer business data corresponding to the transaction customer is migrated to the sub-database;

[0010] When the migration of the customer business data corresponding to the transaction customer is completed, the online transaction operation is performed in the sub-database.

[0011] Furthermore, when an online transaction operation is detected, the step of determining the migration status of the transaction client corresponding to the online transaction operation based on the to-be-migrated status table includes:

[0012] When an online transaction operation is detected, determining whether the customer ID number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated;

[0013] If the customer certificate number of the transaction customer matches the table of states to be migrated, the migration state corresponding to the transaction customer is determined based on the table of states to be migrated.

[0014] Furthermore, after the step of determining whether the customer ID number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated when the online transaction operation is detected, the data migration method further includes:

[0015] If the customer certificate number of the transaction customer does not match the to-be-migrated status table, the online transaction operation is performed based on the sub-database.

[0016] Furthermore, after the step of slicing the customer business data based on the customer dimension to obtain the state table to be migrated, the data migration method further includes:

[0017] Among the customer service data whose migration status in the to-be-migrated status table is not migrated, periodically acquiring a preset number of customer service data as the to-be-migrated service data;

[0018] In the to-be-migrated status table, the migration status of the to-be-migrated business data is updated to being migrated, and the to-be-migrated business data is migrated to the sub-database;

[0019] When the migration of the service data to be migrated is completed, the service data to be migrated is deleted from the to-be-migrated status table.

[0020] Furthermore, after the step of determining the migration status corresponding to the transaction customer based on the to-be-migrated status table if the customer ID number of the transaction customer matches the to-be-migrated status table, the data migration method further includes:

[0021] If the migration status corresponding to the transaction customer is in migration, monitoring the migration status corresponding to the transaction customer in real time;

[0022] When it is detected that the migration of the customer business data corresponding to the transaction customer is completed, the online transaction operation is performed in the sub-database.

[0023] Furthermore, before the step of determining whether the customer ID number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated when the online transaction operation is detected, the data migration method further includes:

[0024] Obtain a customer whitelist, determine the grayscale verification business data in the to-be-migrated state table based on the customer whitelist, and migrate the grayscale verification business data to the sub-database;

[0025] Obtain the migration log corresponding to the grayscale verification business data and the sub-database business data in the sub-database when the migration is completed;

[0026] Determine a grayscale verification result based on the migration log and the sub-database business data;

[0027] When an online transaction operation is detected, the step of determining whether the customer certificate number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated includes:

[0028] If the grayscale verification result is that the verification is passed and an online transaction operation is detected, it is determined whether the customer certificate number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated.

[0029] Furthermore, the data migration method further includes:

[0030] During the migration of customer business data to the sub-database, the migration process of customer business data is monitored in real time, wherein the real-time monitoring includes system operation log monitoring, error log query, database operation abnormality monitoring and transaction full-link monitoring;

[0031] If there is abnormal monitoring in the real-time monitoring results, warning information will be output based on the transaction information corresponding to the current customer business data migration.

[0032] Furthermore, if the migration status corresponding to the transaction customer is not migrated, after the step of migrating the customer business data corresponding to the transaction customer to the sub-database based on the to-be-migrated status table, the data migration method further includes:

[0033] After the migration of the customer business data corresponding to the table of status to be migrated is completed, if a transaction request is received, the transaction request is executed in the sub-database;

[0034] If it is determined based on the business data corresponding to the transaction request that the sub-database is operating normally, the to-be-migrated status table is deleted.

[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a data migration device, which includes: a memory, a processor, and a data migration program stored on the memory and executable on the processor, and the data migration program implements the steps of the aforementioned data migration method when executed by the processor.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a data migration program is stored, and when the data migration program is executed by a processor, the steps of the aforementioned data migration method are implemented.

[0037] The present application obtains a state table to be migrated by slicing customer business data based on the customer dimension, wherein the state table to be migrated includes a migration state; then, when an online transaction operation is detected, the migration state corresponding to the transaction customer is determined based on the state table to be migrated; then, if the migration state corresponding to the transaction customer is not migrated, the customer business data corresponding to the transaction customer is migrated to a sub-database based on the state table to be migrated; then, when the migration of the customer business data corresponding to the transaction customer is completed, the online transaction operation is performed in the sub-database, and the customer business data for the online transaction operation is migrated by slicing the customer business data based on the customer dimension, generating a state table to be migrated, and realizing small batch passive migration of customer business data. The technical problem of business migration requiring downtime and affecting business continuity in the prior art is solved through the gradual migration of business data. The business data migration can be completed on the basis of ensuring the losslessness of the customer's real-time traffic, and the real-time consistency of the data can be ensured, thereby enhancing the customer experience and realizing the migration of business data without downtime. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1 A flowchart of the first embodiment of the data migration method of this application is provided;

[0041] Figure 2 A schematic diagram of constructing a state table to be migrated by slicing in an embodiment of the data migration method of the present application;

[0042] Figure 3 This is a flow chart of an embodiment of a data migration method of the present application;

[0043] Figure 4 This is a flow chart of active migration in an embodiment of the data migration method of the present application;

[0044] Figure 5 This is a schematic diagram of the configuration of the sub-database in an embodiment of the data migration method of this application;

[0045] Figure 6 This is a schematic diagram of the module structure of the data migration device according to an embodiment of the present application.

[0046] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0049] The main solution of the present application is: slicing the customer business data based on the customer dimension to obtain a status table to be migrated, wherein the status table to be migrated includes a migration status; when an online transaction operation is detected, determining the migration status corresponding to the transaction customer based on the status table to be migrated; if the migration status corresponding to the transaction customer is not migrated, migrating the customer business data corresponding to the transaction customer to a sub-database based on the status table to be migrated; when the migration of the customer business data corresponding to the transaction customer is completed, executing the online transaction operation in the sub-database.

[0050] At present, for banking systems, with the rapid development of business and the rapid growth of data, it is a common method to upgrade and transform the early database system and use sub-databases and sub-tables to increase the horizontal scalability and availability of the database. Therefore, it is necessary to migrate the business data of the source system database to the multiple sub-databases of the new system.

[0051] At present, the common way to handle business and data migration for application systems is to shut down for a period of time, complete data migration manually or with special software during the downtime, and restart the system after verification. Although the entire process ensures data consistency before and after migration, it cannot guarantee business continuity, which has a great impact and loss on key business systems. Therefore, how to achieve business data migration without downtime is a problem that needs to be solved urgently.

[0052] This application slices customer business data based on customer dimensions, generates a status table to be migrated, migrates customer business data for online transaction operations, and implements small-batch passive migration of customer business data. The gradual migration of business data solves the technical problem in the prior art that business migration requires downtime, affecting business continuity, and implements business data migration without downtime.

[0053] It should be noted that the execution subject of this embodiment may be a data migration device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a data migration device capable of realizing the above functions, etc., and this embodiment does not specifically limit this. The following takes the data migration device as the execution subject as an example to illustrate this embodiment and the following embodiments.

[0054] Based on this, this application proposes a data migration method of the first embodiment, please refer to Figure 1 The data migration method includes steps S101 to S104:

[0055] Step S101, slicing the customer business data based on the customer dimension to obtain a state table to be migrated, wherein the state table to be migrated includes a migration state;

[0056] In this embodiment, before data migration, customer business data, i.e., business data that needs to be migrated, is extracted, sliced ​​based on the customer dimension, and a status table to be migrated is constructed. The status table to be migrated includes the migration status. Specifically, the customer ID number is used as the primary key for key judgment during data migration. The table fields of the status table to be migrated include the customer ID number, migration status, and migration time.

[0057] like Figure 2 As shown, a status table to be migrated is first constructed based on the existing business data (customer business data) of the main database, and the customer ID number is used as the primary key for key judgment during data migration. The table fields of the status table to be migrated include (customer) ID number, migration status, migration time, etc. The migration status includes not migrated and migrating. Customer business data that has been migrated will be deleted from the status table to be migrated.

[0058] After building the status table to be migrated, before data migration, merge the current real-time traffic (customer business data) into the status table to be migrated, and continue to trade in the old system and operate the main database (the database to which the customer business data belongs before data migration).

[0059] Step S102, when an online transaction operation is detected, determining the migration status of the transaction client corresponding to the online transaction operation based on the to-be-migrated status table;

[0060] In this embodiment, the customer's online transaction operation is detected in real time. When the online transaction operation is detected, the migration status of the transaction customer corresponding to the online transaction operation is determined based on the status table to be migrated. Specifically, it is determined whether the customer business data of the transaction customer corresponding to the online transaction operation is in the status table to be migrated. For example, the customer ID number of the transaction customer corresponding to the online transaction operation is first obtained, and it is determined whether the customer ID number of the transaction customer exists in the customer ID number of the status table to be migrated. If the customer ID number of the transaction customer exists in the customer ID number of the status table to be migrated, the migration status of the transaction customer is queried in the status table to be migrated based on the customer ID number of the transaction customer.

[0061] In a feasible implementation manner, step S102 may further include steps S1021 to S1022:

[0062] Step S1021, when an online transaction operation is detected, determining whether the customer ID number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated;

[0063] Step S1022: If the customer certificate number of the transaction customer matches the table of states to be migrated, the migration state corresponding to the transaction customer is determined based on the table of states to be migrated.

[0064] In the present embodiment, when an online transaction operation is detected, it is determined whether the customer ID number of the transaction client corresponding to the online transaction operation matches the status table to be migrated. Specifically, the customer ID number of the transaction client corresponding to the online transaction operation is obtained, and it is determined whether the customer ID number of the transaction client exists in the customer ID number of the status table to be migrated. If the customer ID number of the transaction client exists in the customer ID number of the status table to be migrated, it is determined that the customer ID number of the transaction client matches the status table to be migrated, and then the migration status corresponding to the transaction client is determined based on the status table to be migrated, and the migration status corresponding to the transaction client is obtained in the status table to be migrated according to the customer ID number of the transaction client, that is, the migration status corresponding to the customer ID number of the transaction client in the status table to be migrated is the migration status corresponding to the transaction client, and then the migration status corresponding to the transaction client can be accurately determined according to the status table to be migrated, so as to improve the accuracy of data migration.

[0065] In a feasible implementation manner, after step S1021, the data migration method may further include step S108:

[0066] Step S108: If the customer certificate number of the transaction customer does not match the state table to be migrated, the online transaction operation is performed based on the sub-database.

[0067] In this embodiment, if the customer ID number of the transaction customer does not match the status table to be migrated, that is, the customer ID number of the transaction customer does not exist in the customer ID number of the status table to be migrated, then the online transaction operation is performed based on the sub-library (sub-database), that is, the online transaction of the transaction customer is directly performed in the sub-library, so that the customer business data corresponding to the online transaction of the transaction customer is stored in the sub-library.

[0068] It should be noted that in order to improve the accuracy and efficiency of data migration, a whitelist corresponding to customer information can be used to perform grayscale production operations first. Business personnel will first conduct small-batch grayscale verification of real-time transaction functions. After observing that the interface operation logs and sub-database data are correct, they can be officially put into production and fully opened to customers.

[0069] In a feasible implementation manner, before step S102, the data migration method may further include steps S105 to S107:

[0070] Step S105, obtaining a customer whitelist, determining grayscale verification business data in the to-be-migrated state table based on the customer whitelist, and migrating the grayscale verification business data to the sub-database;

[0071] Step S106, obtaining the migration log corresponding to the grayscale verification business data and the sub-database business data in the sub-database when the migration is completed;

[0072] Step S107, determining a grayscale verification result based on the migration log and the sub-database business data;

[0073] Step S102 includes: if the grayscale verification result is that the verification is passed and an online transaction operation is detected, determining whether the customer certificate number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated.

[0074] In this embodiment, a customer whitelist can be configured according to the customer information of the customer business data, and the customer whitelist can be obtained. Based on the customer whitelist, the grayscale verification business data is determined in the status table to be migrated. That is, a small batch of customers are selected in the customer whitelist, and the customer business data corresponding to the small batch of customers is obtained in the status table to be migrated as the grayscale verification business data, and the grayscale verification business data is migrated to the sub-database.

[0075] When the migration operation of the grayscale verification business data is completed, the migration log corresponding to the grayscale verification business data is obtained from the log data corresponding to the main database, and the sub-library business data in the sub-library is obtained. Then, the grayscale verification result is determined based on the migration log and the sub-library business data, that is, whether there are errors in the migration log and the sub-library business data. If there are no errors, the grayscale verification result is verification passed. If there are errors, the grayscale verification result is verification failed. That is, if any problems are found in the operation log or link log monitoring and early warning during the migration process, the migration switch and scheduling can be turned off at any time, thereby realizing the rollback and stoppable grayscale migration of data migration, and avoiding accidents during the data migration process.

[0076] Step S103: if the migration status corresponding to the transaction customer is not migrated, then based on the to-be-migrated status table, migrate the customer business data corresponding to the transaction customer to the sub-database;

[0077] In this embodiment, after obtaining the migration status of the transaction customer corresponding to the online transaction operation, if the migration status corresponding to the transaction customer is not migrated, the customer business data corresponding to the transaction customer is migrated to the sub-database based on the status table to be migrated. Specifically, first obtain the customer business data corresponding to the customer ID number of the transaction customer in the status table to be migrated according to the customer ID number of the status table to be migrated, obtain the customer business data corresponding to the transaction customer, and migrate the obtained customer business data corresponding to the transaction customer to the sub-database to realize the migration of the customer business data. During the migration process of the customer business data, the corresponding migration status in the status table to be migrated is updated to migrating.

[0078] Step S104, when the migration of the customer business data corresponding to the transaction customer is completed, the online transaction operation is performed in the sub-database.

[0079] In this embodiment, when executing the migration of customer business data corresponding to the transaction customer, the data migration status is monitored in real time. When it is detected that the migration of the customer business data corresponding to the transaction customer is completed, an online transaction operation is performed in the sub-database to complete the online transaction of the transaction customer, and at the same time, the customer business data corresponding to the transaction customer is deleted from the table of status to be migrated.

[0080] In a feasible implementation manner, the data migration method may further include steps a1 to a2:

[0081] Step a1: during the migration of customer business data to the sub-database, real-time monitoring of the migration process of the customer business data is performed, wherein the real-time monitoring includes system operation log monitoring, error log query, database operation abnormality monitoring and transaction full-link monitoring;

[0082] Step a2: if there is abnormal monitoring in the real-time monitoring results, output warning information based on the transaction information corresponding to the current customer business data migration.

[0083] In this embodiment, in order to ensure stable operation of the system and timely discover problems, in addition to general monitoring, this embodiment also adds a monitoring system. Specifically, during the process of migrating customer business data to the sub-database, the customer business data migration process is monitored in real time to obtain real-time monitoring results, where real-time monitoring includes system operation log monitoring, error log query, database operation exception monitoring and full-link transaction monitoring.

[0084] If there is abnormal monitoring in the real-time monitoring results, an early warning message will be output based on the transaction information corresponding to the current customer business data migration. Then, according to the transaction serial number carried in the early warning message, detailed logs can be queried on the "full-link monitoring" platform to locate the problem and deal with it in a timely manner, further improving the efficiency of data migration.

[0085] In a feasible implementation manner, after step S103, the data migration method may further include steps b1 to b2:

[0086] Step b1, after the migration of the customer business data corresponding to the table to be migrated is completed, if a transaction request is received, executing the transaction request in the sub-database;

[0087] Step b2: If it is determined based on the business data corresponding to the transaction request that the sub-database is operating normally, the state table to be migrated is deleted.

[0088] In this embodiment, after the migration of the customer business data corresponding to the to-be-migrated status table is completed, if a transaction request is received, the transaction request is executed in the sub-database, so that the transaction continues to run in the new system (sub-database) after the data migration. Figure 5 As shown in the figure, the new system of the database sub-library architecture after migration includes the routing layer and the data layer. In the data layer, the application instance is deployed through multiple service units. When the application instance starts, it reads the configuration and binds to the corresponding database instance, and registers the mapping relationship with the cluster registration center. In the routing layer, the business traffic passes through the routing layer proxy client through the sub-library key passed in the request message and the routing rules pre-configured in the configuration center to determine the database instance pointed to by this request.

[0089] Among them, the interface business logic of the data layer database application is completely decoupled from the routing layer. After receiving the request, the corresponding database operation is directly executed, the database database is completed seamlessly, and the database can be expanded horizontally indefinitely.

[0090] When executing the online transaction corresponding to the transaction request, determine whether the sub-database is running normally based on the business data corresponding to the transaction request. If the sub-database is running normally based on the business data corresponding to the transaction request, that is, the new system is running without faults, then the migration status table logic is cleaned up and the state table to be migrated is deleted. At this time, the old system (the system corresponding to the main database) can be offline to complete the data migration. Of course, when the transaction request is executed on the sub-database and the sub-database is running normally, the number of consecutive executions of the transaction request is accumulated. If the accumulated number reaches the preset number, it is determined that the sub-database is running normally, and then it can be determined that the new system is running without faults.

[0091] like Figure 3 As shown, when online transaction operations (real-time transaction traffic) are detected, the pending migration status table is used to determine whether the full migration is completed. If completed, the online transaction operation is performed in the sub-database; if not completed, it is determined whether to start the migration. If the migration is started, the migration status corresponding to the transaction customer is determined. If the migration status is not migrated, the migration logic is executed. If it is in the process of migrating, the online transaction operation is performed in the sub-database after the migration is completed.

[0092] The data migration method proposed in this embodiment obtains a state table to be migrated by slicing the customer business data based on the customer dimension, wherein the state table to be migrated includes a migration state; then, when an online transaction operation is detected, the migration state corresponding to the transaction customer is determined based on the state table to be migrated; then, if the migration state corresponding to the transaction customer is not migrated, the customer business data corresponding to the transaction customer is migrated to a sub-database based on the state table to be migrated; then, when the migration of the customer business data corresponding to the transaction customer is completed, the online transaction operation is performed in the sub-database, and the customer business data of the online transaction operation is migrated by slicing the customer business data based on the customer dimension, generating a state table to be migrated, and realizing small batch passive migration of customer business data. The technical problem of business migration requiring downtime and affecting business continuity in the prior art is solved through the gradual migration of business data. The business data migration can be completed on the basis of ensuring the losslessness of the customer's real-time traffic, and the real-time consistency of the data can be ensured, thereby enhancing the customer experience and realizing the business data migration without downtime.

[0093] In a feasible implementation manner, after step S101, the data migration method may further include steps S201 to S203:

[0094] Step S201, regularly acquiring a preset number of customer service data from the customer service data whose migration status in the to-be-migrated status table is not migrated as the to-be-migrated service data;

[0095] Step S202, updating the migration status of the to-be-migrated business data in the to-be-migrated status table to being migrated, and migrating the to-be-migrated business data to the sub-database;

[0096] Step S203: when the migration of the service data to be migrated is completed, the service data to be migrated is deleted from the status table to be migrated.

[0097] In this embodiment, in order to speed up the migration process and ensure that the migration process is completed within a certain period of time, active data migration can be performed, such as Figure 4 As shown, a small batch query of the unmigrated customer data in the migration table is started by scheduled scheduling, and the customer data is migrated to the sub-database according to the customer dimension. Specifically, among the customer business data whose migration status in the to-be-migrated status table is unmigrated, a preset number of customer business data is obtained regularly as the to-be-migrated business data.

[0098] After obtaining the business data to be migrated, Figure 4 As shown, the migration status of the business data to be migrated is updated to migrating in the state table to be migrated, and the business data to be migrated is migrated to the sub-database; when the migration of the business data to be migrated is completed, the business data to be migrated is deleted from the state table to be migrated, thereby realizing the active migration of small batches of customer business data.

[0099] In a feasible implementation manner, after step S1022, the data migration method may further include steps S204 to S205:

[0100] Step S204, if the migration status corresponding to the transaction customer is in migration, the migration status corresponding to the transaction customer is monitored in real time;

[0101] Step S205, when it is detected that the migration of the customer business data corresponding to the transaction customer is completed, the online transaction operation is performed in the sub-database.

[0102] In this embodiment, when actively migrating customer business data, there is a situation where the migration status corresponding to the transaction customer is migrating. When the migration status corresponding to the transaction customer is migrating, the migration status corresponding to the transaction customer is monitored in real time to promptly detect that the customer business data of the transaction customer has completed migration. When it is detected that the migration of the customer business data corresponding to the transaction customer is completed, an online transaction operation is performed in the sub-database to complete the online transaction of the transaction customer in the sub-database after the migration of the customer business data is completed.

[0103] The data migration method proposed in this embodiment periodically obtains a preset number of customer business data as business data to be migrated from the customer business data in the migration status table whose migration status is not migrated; then updates the migration status of the business data to be migrated to migrating in the migration status table, and migrates the business data to be migrated to the sub-database; and then deletes the business data to be migrated from the migration status table when the migration of the business data to be migrated is completed. The gradual migration of customer business data is achieved through the active migration of data, which solves the technical problem in the prior art that business migration requires shutdown and affects business continuity, and achieves business migration without shutdown.

[0104] The data migration device provided in the embodiment of the present application adopts the data migration method in the above embodiment, which can solve the technical problem of how to achieve business data migration without downtime. Compared with the prior art, the beneficial effects of the data migration device provided in the embodiment of the present application are the same as the beneficial effects of the data migration method provided in the above embodiment, and other technical features in the data migration device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0105] The present application provides a data migration device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data migration method in the above-mentioned embodiment one.

[0106] Reference below Figure 6 , which shows a schematic diagram of the structure of a data migration device suitable for implementing an embodiment of the present application. The data migration device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The data migration device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0107] like Figure 6As shown, the data migration device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data migration device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data migration device to communicate with other devices wirelessly or by wire to exchange data. Although the data migration device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0108] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0109] The data migration device provided by the present application adopts the data migration method in the above embodiment, which can solve the technical problem of how to achieve business data migration without downtime. Compared with the prior art, the beneficial effects of the data migration device provided by the present application are the same as the beneficial effects of the data migration method provided by the above embodiment, and other technical features in the data migration device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0110] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0111] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0112] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data migration method in the above-mentioned embodiment.

[0113] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0114] The computer-readable storage medium may be included in the data migration device; or may exist independently without being assembled into the data migration device.

[0115] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the data migration device, the data migration device: slices the customer business data based on the customer dimension to obtain a status table to be migrated, wherein the status table to be migrated includes a migration status; when an online transaction operation is detected, determines the migration status of the transaction customer corresponding to the online transaction operation based on the status table to be migrated; if the migration status corresponding to the transaction customer is not migrated, migrates the customer business data corresponding to the transaction customer to a sub-database based on the status table to be migrated; when the migration of the customer business data corresponding to the transaction customer is completed, executes the online transaction operation in the sub-database.

[0116] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

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

[0118] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0119] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data migration method, and can solve the technical problem of how to achieve business data migration without downtime. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data migration method provided by the above-mentioned embodiment, and will not be repeated here.

[0120] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned data migration method when executed by a processor.

[0121] The computer program product provided in this application can solve the technical problem of how to achieve business data migration without downtime. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiment of this application are the same as the beneficial effects of the data migration method provided in the above embodiment, which will not be repeated here.

[0122] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data migration method, characterized in that: The data migration method comprises the following steps: Slice the customer business data based on the customer dimension to obtain a state table to be migrated, where the state table to be migrated includes a migration state; When an online transaction operation is detected, determining a migration status of a transaction client corresponding to the online transaction operation based on the to-be-migrated status table; If the migration status corresponding to the transaction customer is not migrated, then based on the to-be-migrated status table, the customer business data corresponding to the transaction customer is migrated to the sub-database; When the migration of the customer business data corresponding to the transaction customer is completed, the online transaction operation is performed in the sub-database.

2. The data migration method according to claim 1, characterized in that: When an online transaction operation is detected, the step of determining the migration status of the transaction client corresponding to the online transaction operation based on the to-be-migrated status table includes: When an online transaction operation is detected, determining whether the customer ID number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated; If the customer certificate number of the transaction customer matches the table of states to be migrated, the migration state corresponding to the transaction customer is determined based on the table of states to be migrated.

3. The data migration method according to claim 2, characterized in that: After the step of determining whether the customer ID number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated when the online transaction operation is detected, the data migration method further includes: If the customer certificate number of the transaction customer does not match the to-be-migrated status table, the online transaction operation is performed based on the sub-database.

4. The data migration method according to claim 2, characterized in that: After the step of slicing the customer business data based on the customer dimension to obtain the state table to be migrated, the data migration method further includes: Among the customer service data whose migration status in the to-be-migrated status table is not migrated, periodically acquiring a preset number of customer service data as the to-be-migrated service data; In the to-be-migrated status table, the migration status of the to-be-migrated business data is updated to being migrated, and the to-be-migrated business data is migrated to the sub-database; When the migration of the service data to be migrated is completed, the service data to be migrated is deleted from the to-be-migrated status table.

5. The data migration method according to claim 4, characterized in that: After the step of determining the migration status corresponding to the transaction customer based on the to-be-migrated status table if the customer certificate number of the transaction customer matches the to-be-migrated status table, the data migration method further includes: If the migration status corresponding to the transaction customer is in migration, monitoring the migration status corresponding to the transaction customer in real time; When it is detected that the migration of the customer business data corresponding to the transaction customer is completed, the online transaction operation is performed in the sub-database.

6. The data migration method according to claim 1, characterized in that: Before the step of determining whether the customer ID number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated when an online transaction operation is detected, the data migration method further includes: Obtain a customer whitelist, determine the grayscale verification business data in the to-be-migrated state table based on the customer whitelist, and migrate the grayscale verification business data to the sub-database; Obtain the migration log corresponding to the grayscale verification business data and the sub-database business data in the sub-database when the migration is completed; Determine a grayscale verification result based on the migration log and the sub-database business data; When an online transaction operation is detected, the step of determining whether the customer certificate number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated includes: If the grayscale verification result is that the verification is passed and an online transaction operation is detected, it is determined whether the customer certificate number of the transaction customer corresponding to the online transaction operation matches the state table to be migrated.

7. The data migration method according to any one of claims 1 to 6, characterized in that: The data migration method further includes: During the migration of customer business data to the sub-database, the migration process of customer business data is monitored in real time, wherein the real-time monitoring includes system operation log monitoring, error log query, database operation abnormality monitoring and transaction full-link monitoring; If there is abnormal monitoring in the real-time monitoring results, warning information will be output based on the transaction information corresponding to the current customer business data migration.

8. The data migration method according to any one of claims 1 to 6, characterized in that: After the step of migrating the customer business data corresponding to the transaction customer to the sub-database based on the to-be-migrated status table if the migration status corresponding to the transaction customer is not migrated, the data migration method further includes: After the migration of the customer business data corresponding to the table of status to be migrated is completed, if a transaction request is received, the transaction request is executed in the sub-database; If it is determined based on the business data corresponding to the transaction request that the sub-database is operating normally, the to-be-migrated status table is deleted.

9. A data migration device, characterized in that: The data migration device comprises: a memory, a processor, and a data migration program stored in the memory and executable on the processor, wherein the data migration program implements the steps of the data migration method according to any one of claims 1 to 8 when executed by the processor.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a data migration program, and when the data migration program is executed by a processor, the steps of the data migration method according to any one of claims 1 to 8 are implemented.