Data migration processing method and device
By locking, converting and verifying customers, we solved the data consistency problem in large-scale data migration and achieved data consistency and efficient migration under high concurrency.
Patent Information
- Application Number
- CN202111631099.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-12-28
AI Technical Summary
During large-scale data migration, existing technologies have difficulty ensuring data consistency under high concurrency, especially when the new and old system models differ greatly and the data volume is huge. Traditional methods increase the load on the new system and cannot flexibly handle the locking process, resulting in complex data synchronization logic.
Through the process of locking, data conversion, verification and unlocking customers, using the data mapping table conversion relationship, combined with the global routing and customer information platform, the customer status can be locked and unlocked to ensure the consistency of data during the migration process.
During the migration process with a large number of customers and concurrent traffic, the customer status consistency during the data migration process is guaranteed, the impact on customer transactions is reduced, and the migration efficiency and data consistency are improved.
Smart Images

Figure CN114297181B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data migration, and in particular to a method and device for processing data migration. Background Art
[0002] During data migration, data consistency must be ensured from the old system to the new one. Existing data migration solutions mostly use a downtime migration approach. During this downtime, no customer transactions occur and customer data remains unchanged, eliminating the need for data consistency. Some online migration solutions record data changes during the migration process and synchronize the data when migrating to the new system. Currently, data consistency can also be ensured by calling the corresponding locking interface of the associated system.
[0003] Compared to other existing systems, this system presented two challenges. First, the scale of the data migration was significant. The data range was wide, the volume was large, and the concurrency was high. There were nearly 700 million customers, 1.8 billion accounts, and nearly 160 terabytes of data. Second, there was a significant model gap. Because the old and new systems were built at different times, the data models differed significantly, and the correspondence between data fields was quite complex. Thousands of tables in the old core needed to be mapped to hundreds of tables in the new core.
[0004] Existing data consistency methods require additional synchronization steps when migrating data to a new system, increasing the load on the new system in scenarios with large data volumes and high concurrency. Data consistency methods that call locking interfaces do not provide flexible handling and scheduling of the locking process. Furthermore, during data synchronization, different synchronization methods are required depending on the type of transactions occurring in the old system during the data migration, leading to complex data processing logic.
[0005] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0006] The embodiments of the present invention provide a method and apparatus for processing data migration, so as to at least solve the technical problem of data consistency during the data migration process.
[0007] According to one aspect of an embodiment of the present invention, a method for processing data migration is provided, comprising: locking a customer; after the customer is successfully locked, exporting the customer's migration data from a source system; performing data conversion on the migration data to obtain target data, wherein the data conversion converts the migration data into target data of a target system according to a conversion relationship in a data mapping table; performing data verification on the target data; after the data verification is successful, importing the target data into the target system; and unlocking the customer.
[0008] Optionally, locking a customer includes: locking the customer information platform, the global routing, and the source system respectively, wherein the customer is locked on the customer information platform, and the credentials contained in the customer are queried, the migration status of the customer is changed to migrating in the global routing, and the credential locking status is changed to migrating in the source system.
[0009] Optionally, the method also includes: when the lock processing is a transaction lock and the migration data exported from the source system is an online migration, calling the global routing to obtain the migration status of the customer, and performing online transaction routing or rejecting the transaction based on the migration status returned by the global routing; when the lock processing is a transaction lock and the migration data exported from the source system is a batch migration, calling the global routing to obtain the migration status of the customer, and performing batch splitting based on the migration status returned by the global routing.
[0010] Optionally, the method also includes: when the locking process is a migration lock and the migration data exported from the source system is an online migration, setting the migration status of the customer of the global router to a pre-migration status, recording the transaction time of the customer, checking the time interval between the locking time and the transaction time, and when the time interval is greater than a preset value, the locking is successful, otherwise the locking fails and the migration is abandoned; when the locking process is a migration lock and the migration data exported from the source system is a batch migration, sending the customer information file of the locked customer to the customer information platform, the global router, and the source system in sequence, wherein the files returned by the customer information platform, the global router, and the source system contain whether the locking is successful or failed.
[0011] Optionally, in the process of locking the customer information platform, global routing and source system respectively, it also includes: if the customer information platform fails to be locked, an error is reported and the system is exited without locking the global routing and the source system; if the global routing fails to be locked, the unlocking of the customer information platform is triggered; if the source system fails to be locked, the unlocking of the global routing and the customer information platform is triggered in turn.
[0012] Optionally, the method further includes: in the event that any one of the migration data export, the data conversion, the data verification, and the target data import fails, triggering unlocking of the source system, the global routing, and the customer information platform in sequence.
[0013] Optionally, data verification is performed on the target data, including: data standard and quality verification is performed on the target data, wherein the data standard and quality verification includes at least one of the following: data format, data type, data value range, data encoding specification and data length; and / or, data consistency verification is performed on the target data, wherein the data consistency verification includes at least one of the following: logical relationship of data between entities, stateful data, number of new and old data records, data summary value and new and old data values.
[0014] Optionally, unlocking the customer includes: unlocking the source system, global routing, and customer information platform respectively.
[0015] Optionally, after importing the target data into the target system, the method further includes: performing data migration verification on the target data imported into the target system; and / or performing data verification on the target data imported into the target system.
[0016] According to another aspect of an embodiment of the present invention, a data migration processing device is also provided, including a locking unit, an export unit, a conversion unit, a verification unit, an import unit and an unlocking unit, wherein the locking unit is used to lock a customer; the export unit is used to export the customer's migration data from the source system after the customer is successfully locked; the conversion unit is used to perform data conversion on the migration data to obtain target data, wherein the data conversion converts the migration data into target data of the target system according to the conversion relationship in the data mapping table; the verification unit is used to perform data verification on the target data; the import unit is used to import the target data into the target system after the data verification is successful; and the unlocking unit is used to unlock the customer.
[0017] In an embodiment of the present invention, the data migration processing method is as follows: first, the customer is locked; then, after the customer is successfully locked, the migration data of the customer is exported from the source system; then, the migration data is converted to obtain target data, wherein the data conversion is to convert the migration data into the target data of the target system according to the conversion relationship in the data mapping table; then, the target data is verified; then, after the data verification is successful, the target data is imported into the target system; finally, the customer is unlocked. This application designs a series of processes such as locking, verification, and unlocking for scheduling across multiple systems. In the migration process with a large number of customers and concurrency, the consistency of customer status during data migration is guaranteed, thereby solving the technical problem of data consistency during data migration. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0019] Figure 1 is a flowchart of a data migration processing method according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of a data migration process according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of a process for locking a customer according to an embodiment of the present application;
[0022] Figure 4 2 is a schematic diagram of a data migration processing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] For ease of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0026] Related system: A business system that needs to interact with the source system or target system to conduct transactions.
[0027] Data migration: Smoothly migrate the business and technical information carried by the data in the source system to the target system, and ensure that the business implications of all customer service before and after the migration remain unchanged.
[0028] Customer Information Platform: The Customer Information Platform mainly provides the Data Migration Platform with the mapping relationship information between individual customers and the financial products they hold, which is mainly reflected in the mapping relationship information between customer numbers and customer numbers and account card numbers. The Data Migration Platform performs migration based on the mapping relationship between customers and account card numbers.
[0029] Global routing: Provides the ability to locate the target deployment unit based on mapping elements. It is used to store and query customer migration status during the locking and unlocking process.
[0030] Transaction lock: Do not migrate customers while they are conducting transactions.
[0031] Migration lock: No customer transactions are performed during the customer migration process.
[0032] As mentioned in the background art, data consistency during data migration is poor. To solve the above problem, a typical embodiment of the present application provides a method and apparatus for processing data migration.
[0033] According to a typical embodiment of the present application, a method for processing data migration is provided.
[0034] Figure 1 is a flow chart of a method for processing data migration according to an embodiment of the present application, such as Figure 1 As shown, the method includes the following steps:
[0035] Step S101, locking the customer;
[0036] Step S102: after the customer is successfully locked, export the migration data of the customer from the source system;
[0037] Step S103, performing data conversion on the migration data to obtain target data, wherein the data conversion is to convert the migration data into target data of the target system according to the conversion relationship in the data mapping table;
[0038] Step S104, verifying the target data;
[0039] Step S105: After the data verification is successful, the target data is imported into the target system;
[0040] Step S106: Unlock the above customer.
[0041] The above data migration processing method, such as Figure 2As shown, first, the customer is locked; then, after the customer is successfully locked, the migration data of the customer is exported from the source system; then, the migration data is converted to obtain the target data, wherein the data conversion is to convert the migration data into the target data of the target system according to the conversion relationship in the data mapping table; then, the target data is verified; then, after the data verification is successful, the target data is imported into the target system; finally, the customer is unlocked. This method designs a series of processes such as locking, verification, and unlocking for scheduling across multiple systems. In the migration process with a large number of customers and concurrency, the consistency of customer status during the data migration process is guaranteed, thereby solving the technical problem of data consistency during the data migration process.
[0042] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0043] In order to ensure the consistency of customer data during data migration and reduce the impact on customer transactions, such as Figure 3 As shown, in one embodiment of the present application, locking a customer includes: locking the customer information platform, the global routing and the source system respectively, wherein the customer is locked on the customer information platform, and the credentials contained in the customer are queried, the migration status of the customer is changed to migrating in the global routing, and the credential locking status is changed to migrating in the source system.
[0044] Specifically, locking the customer on the customer information platform can involve locking the customer's transaction restrictions. The global routing also allows querying the migration status and the time of the customer's last transaction. The source system can also lock account transaction restrictions. The global routing changes the customer's migration status to "Migrating." If an exception occurs during the migration status change, the migration status change can be manually initiated to complete the change.
[0045] In actual application, the data migration system is used to maintain the relationship between customers and credentials, manage customer lock status, and schedule lock processes.
[0046] In another embodiment of the present application, the above method further includes: when the above lock processing is a transaction lock and the above migration data exported from the above source system is an online migration, calling the above global routing to obtain the migration status of the above customer, and performing online transaction routing or rejecting the transaction based on the above migration status returned by the above global routing; when the above lock processing is a transaction lock and the above migration data exported from the above source system is a batch migration, calling the above global routing to obtain the migration status of the above customer, and performing batch splitting based on the above migration status returned by the above global routing. In order to ensure that the real-time transactions of customers are not affected during the data migration process, customers are divided into high-activity customers, low-activity customers, and inactive customers according to their activity. For highly active customers, online migration can minimize the customer lock-in time and avoid peak-time lock-in; for low-activity customers and inactive customers, batch migration and batch locking of customers can improve migration efficiency.
[0047] Specifically, if the lock is a transaction lock and the migration data is exported from the source system for online migration, if the migration status is "Migrating," the transaction is rejected; if the migration status is "Not Migrated," a transaction request is initiated to the source system; if the migration status is "Migrated," a transaction request is initiated to the target system. If the lock is a transaction lock and the migration data is exported from the source system for batch migration, customers in the batch with a status of "Migrating" are split into separate batches. After a certain interval, a status query is initiated again, and the files are split based on the query results. Customers in the batch with a status of "Not Migrated" are split into batches sent to the source system, and customers in the batch with a status of "Migrated" are split into batches sent to the target system.
[0048] In order to avoid the impact of the migration lock on customer transactions during the locking process, in another embodiment of the present application, the above method also includes: when the above lock processing is a migration lock and the above migration data exported from the above source system is online migration, the migration status of the above customer of the above global routing is set to a pre-migration status, and the transaction time of the above customer is recorded, and the time interval between the locking time and the above transaction time is checked. When the above time interval is greater than a preset value, the locking is successful, otherwise the locking fails and the migration is abandoned; when the above lock processing is a migration lock and the above migration data exported from the above source system is batch migration, the customer information file of the locked customer is sent to the above customer information platform, the above global routing, and the above source system in sequence, wherein the files returned by the above customer information platform, the above global routing, and the above source system contain whether the locking is successful or failed.
[0049] Specifically, if the lock is a migration lock and the migration data is exported from the source system for online migration, the migration lock checks whether the pre-migrated customer has conducted any transactions within a certain period of time. If so, the lock is not executed; if not, the customer is locked. The preset value can be the maximum transaction processing time of the source system. If the lock is a migration lock and the migration data is exported from the source system for batch migration, for customers who are successfully locked, a file is generated and sent to the next system. Customers who fail to be locked are stored in the database and wait for a period of time before being sent to the above system for locking attempts.
[0050] In order to further reduce the impact of the locking process on customer transactions, in another embodiment of the present application, in the process of locking the customer information platform, the global routing and the source system respectively, it also includes: if the locking of the above-mentioned customer information platform fails, an error is reported and exited, and the locking of the above-mentioned global routing and the above-mentioned source system is not performed; if the locking of the above-mentioned global routing fails, the unlocking of the above-mentioned customer information platform is triggered; if the locking of the above-mentioned source system fails, the unlocking of the above-mentioned global routing and the above-mentioned customer information platform is triggered in sequence.
[0051] In another embodiment of the present application, the above method also includes: in the event that any one of the above migration data export, the above data conversion, the above data verification and the above target data import fails, the unlocking of the above source system, the above global routing and the above customer information platform is triggered in sequence.
[0052] In actual application, during the above locking and migration process, if an exception occurs, the customer with the migration exception will be unlocked, and manual initiation of customer unlocking function is also supported.
[0053] In order to solve the difficulties of complex data conversion logic and ensure that the data after data conversion meets the data standards of the target system, in another embodiment of the present application, data verification is performed on the above-mentioned target data, including: data standard and quality verification of the above-mentioned target data, wherein the above-mentioned data standard and quality verification include at least one of the following: data format, data type, data value range, data encoding specification and data length; and / or, data consistency verification is performed on the above-mentioned target data, wherein the above-mentioned data consistency verification includes at least one of the following: data logical relationship between entities, stateful data, number of new and old data records, data summary value and new and old data value.
[0054] Specifically, the consistency check for stateful data primarily targets transaction data such as stop payments and freezes. The number of old and new data records is used to verify the success of the one-to-one, one-to-many, and many-to-one relationship conversions between the target and source system models. The data summary values primarily verify amounts and quantities. The old and new data value verification primarily verifies balances and dates. Data verification ensures consistency in standards, quantities, status, and corresponding relationships between the previous and next data.
[0055] In another embodiment of the present application, unlocking the aforementioned customer includes separately unlocking the source system, global routing, and customer information platform. The source system is locked last during the locking process, and the old system is unlocked first at the unlock timing. This minimizes the time the source system is locked during the locking process, thereby reducing the impact on customer transactions.
[0056] In practice, when unlocking, if the customer migration is successful, the migration status is changed to Migrated; if the customer migration fails, the migration status is changed to Not Migrated. Furthermore, during the locking and unlocking process, the customer information platform and global routing can be replaced with other systems that perform the same or similar functions in data migration.
[0057] In order to ensure that the data is completely consistent, in another embodiment of the present application, after importing the above-mentioned target data into the target system, the above-mentioned method also includes: performing data migration verification on the above-mentioned target data imported into the above-mentioned target system; and / or, performing data verification on the above-mentioned target data imported into the above-mentioned target system.
[0058] Specifically, the above-mentioned data migration verification includes online migration verification and batch migration verification. The above-mentioned online migration verification refers to the online non-static data migration verification based on the customer dimension, and the above-mentioned batch migration verification refers to the migration verification of static data. The above-mentioned online data migration verification is initiated by the data migration, and the global routing system issues the verification document. The data migration, customer information platform, and source system verify according to the verification document and make adjustments according to the global routing status; the above-mentioned batch data migration verification is performed by the data migration system based on the data records exported from the source system and the data records imported from the target system. Data verification is performed after the data is imported, and the target system transactions are called to verify the data, such as deposits and withdrawals, stop payment and release of stop payment, etc. After data verification, the consistency of the data can be fully guaranteed.
[0059] The present application also provides a data migration processing device. It should be noted that the data migration processing device of the present application can be used to execute the data migration processing method provided in the present application. The data migration processing device provided in the present application is introduced below.
[0060] Figure 4 is a schematic diagram of a data migration processing device according to an embodiment of the present application, such as Figure 4 As shown, the device includes:
[0061] A locking unit 10, used to lock the client;
[0062] The export unit 20 is used to export the migration data of the customer from the source system after the customer is successfully locked;
[0063] The conversion unit 30 is configured to perform data conversion on the migration data to obtain target data, wherein the data conversion is to convert the migration data into target data of the target system according to the conversion relationship in the data mapping table;
[0064] Verification unit 40, used to verify the target data;
[0065] The import unit 50 is used to import the target data into the target system after the data verification is successful;
[0066] The unlocking unit 60 is used to unlock the above-mentioned customer.
[0067] The data migration processing device first locks the customer through the locking unit 10; then, after the customer is successfully locked, the export unit 20 exports the migration data of the customer from the source system; then, the conversion unit 30 performs data conversion on the migration data to obtain target data, wherein the data conversion converts the migration data into the target data of the target system according to the conversion relationship in the data mapping table; then, the verification unit 40 verifies the target data; then, the import unit 50 imports the target data into the target system after the data verification is successful; finally, the unlocking unit 60 unlocks the customer. The device is designed with a series of processes such as locking, verification, and unlocking for scheduling across multiple systems. In the migration process with a large number of customers and a large number of concurrent users, the consistency of customer status during the data migration process is ensured, thereby solving the technical problem of data consistency during the data migration process.
[0068] In order to ensure the consistency of customer data during the data migration process and reduce the impact of customer transactions, in one embodiment of the present application, the above-mentioned locking unit includes a locking sub-unit, and the above-mentioned locking sub-unit is used to lock the customer information platform, the global routing and the source system respectively, wherein the above-mentioned customer is locked on the above-mentioned customer information platform, and the credentials contained in the above-mentioned customer are queried, the migration status of the above-mentioned customer is changed to migrating in the above-mentioned global routing, and the credential locking status is changed to migrating in the above-mentioned source system.
[0069] Specifically, locking the customer on the customer information platform can involve locking the customer's transaction restrictions. The global routing also allows querying the migration status and the time of the customer's last transaction. The source system can also lock account transaction restrictions. The global routing changes the customer's migration status to "Migrating." If an exception occurs during the migration status change, the migration status change can be manually initiated to complete the change.
[0070] In actual application, the data migration system is used to maintain the relationship between customers and credentials, manage customer lock status, and schedule lock processes.
[0071] In another embodiment of the present application, the device further includes a first processing unit and a second processing unit, wherein the first processing unit is configured to, when the lock is processed as a transaction lock and the migration data is exported from the source system as an online migration, call the global routing to obtain the migration status of the customer, and perform online transaction routing or transaction rejection based on the migration status returned by the global routing; and the second processing unit is configured to, when the lock is processed as a transaction lock and the migration data is exported from the source system as a batch migration, call the global routing to obtain the migration status of the customer, and perform batch splitting based on the migration status returned by the global routing. In order to ensure that the customer's real-time transactions are not affected during the data migration process, customers are divided into high-activity customers, low-activity customers, and inactive customers based on their activity. Online migration is performed for highly active customers, which can minimize the customer lock-in time and avoid peak-time lock-in; batch migration is performed for low-activity customers and inactive customers, and batch locking of customers can improve migration efficiency.
[0072] Specifically, if the lock is a transaction lock and the migration data is exported from the source system for online migration, if the migration status is "Migrating," the transaction is rejected; if the migration status is "Not Migrated," a transaction request is initiated to the source system; if the migration status is "Migrated," a transaction request is initiated to the target system. If the lock is a transaction lock and the migration data is exported from the source system for batch migration, customers in the batch with a status of "Migrating" are split into separate batches. After a certain interval, a status query is initiated again, and the files are split based on the query results. Customers in the batch with a status of "Not Migrated" are split into batches sent to the source system, and customers in the batch with a status of "Migrated" are split into batches sent to the target system.
[0073] In order to avoid the impact of the migration lock on customer transactions during the locking process, in another embodiment of the present application, the above-mentioned device also includes a third processing unit and a fourth processing unit, wherein the above-mentioned third processing unit is used to set the migration status of the above-mentioned customer of the above-mentioned global routing to a pre-migration status when the above-mentioned locking process is a migration lock and the above-mentioned migration data exported from the above-mentioned source system is an online migration, and record the transaction time of the above-mentioned customer, check the time interval between the locking time and the above-mentioned transaction time, and when the above-mentioned time interval is greater than a preset value, the locking is successful, otherwise the locking fails and the migration is abandoned; the above-mentioned fourth processing unit is used to send the customer information file of the locked customer to the above-mentioned customer information platform, the above-mentioned global routing, and the above-mentioned source system in sequence when the above-mentioned locking process is a migration lock and the above-mentioned migration data exported from the above-mentioned source system is a batch migration, wherein the files returned by the above-mentioned customer information platform, the above-mentioned global routing, and the above-mentioned source system contain locking success or locking failure.
[0074] Specifically, if the lock is a migration lock and the migration data is exported from the source system for online migration, the migration lock checks whether the pre-migrated customer has conducted any transactions within a certain period of time. If so, the lock is not executed; if not, the customer is locked. The preset value can be the maximum transaction processing time of the source system. If the lock is a migration lock and the migration data is exported from the source system for batch migration, for customers who are successfully locked, a file is generated and sent to the next system. Customers who fail to be locked are stored in the database and wait for a period of time before being sent to the above system for locking attempts.
[0075] In order to further reduce the impact of the locking process on customer transactions, in another embodiment of the present application, the above-mentioned locking sub-unit includes an error reporting module, a first trigger module and a second trigger module, wherein the above-mentioned error reporting module is used to report an error and exit when the locking of the above-mentioned customer information platform fails, and not lock the above-mentioned global routing and the above-mentioned source system; the above-mentioned first trigger module is used to trigger the unlocking of the above-mentioned customer information platform when the locking of the above-mentioned global routing fails; the above-mentioned second trigger module is used to trigger the unlocking of the above-mentioned global routing and the above-mentioned customer information platform in sequence when the locking of the above-mentioned source system fails.
[0076] In another embodiment of the present application, the above-mentioned device also includes a trigger unit, which is used to trigger the unlocking of the above-mentioned source system, the above-mentioned global routing and the above-mentioned customer information platform in sequence when any one of the above-mentioned migration data export, the above-mentioned data conversion, the above-mentioned data verification and the above-mentioned target data import fails.
[0077] In actual application, during the above locking and migration process, if an exception occurs, the customer with the migration exception will be unlocked, and manual initiation of customer unlocking function is also supported.
[0078] In order to solve the difficulties of complex data conversion logic and ensure that the data after data conversion meets the data standards of the target system, in another embodiment of the present application, the above-mentioned verification unit includes a first verification sub-unit and a second verification sub-unit, and the above-mentioned first verification sub-unit is used to perform data standard and quality verification on the above-mentioned target data, wherein the above-mentioned data standard and quality verification include at least one of the following: data format, data type, data value range, data encoding specification and data length; and / or, the above-mentioned first verification sub-unit is used to perform data consistency verification on the above-mentioned target data, wherein the above-mentioned data consistency verification includes at least one of the following: data logical relationship between entities, stateful data, number of new and old data records, data summary value and new and old data value.
[0079] Specifically, the consistency check for stateful data primarily targets transaction data such as stop payments and freezes. The number of old and new data records is used to verify the success of the one-to-one, one-to-many, and many-to-one relationship conversions between the target and source system models. The data summary values primarily verify amounts and quantities. The old and new data value verification primarily verifies balances and dates. Data verification ensures consistency in standards, quantities, status, and corresponding relationships between the previous and next data.
[0080] In another embodiment of the present application, the unlocking unit includes an unlocking subunit configured to respectively unlock the source system, the global routing, and the customer information platform. During the locking process, the source system is locked last, and the old system is unlocked first at the unlock timing. This minimizes the time the source system is locked during the locking process, thereby reducing the impact on customer transactions.
[0081] In practice, when unlocking, if the customer migration is successful, the migration status is changed to Migrated; if the customer migration fails, the migration status is changed to Not Migrated. Furthermore, during the locking and unlocking process, the customer information platform and global routing can be replaced with other systems that perform the same or similar functions in data migration.
[0082] In order to ensure that the data is completely consistent, in another embodiment of the present application, the above-mentioned device also includes a checking unit and a verification unit. The above-mentioned checking unit is used to perform data migration verification on the above-mentioned target data imported into the above-mentioned target system after the above-mentioned target data is imported into the target system; and / or, the above-mentioned verification unit is used to perform data verification on the above-mentioned target data imported into the above-mentioned target system.
[0083] Specifically, the above-mentioned data migration verification includes online migration verification and batch migration verification. The above-mentioned online migration verification refers to the online non-static data migration verification based on the customer dimension, and the above-mentioned batch migration verification refers to the migration verification of static data. The above-mentioned online data migration verification is initiated by the data migration, and the global routing system issues the verification document. The data migration, customer information platform, and source system verify according to the verification document and make adjustments according to the global routing status; the above-mentioned batch data migration verification is performed by the data migration system based on the data records exported from the source system and the data records imported from the target system. Data verification is performed after the data is imported, and the target system transactions are called to verify the data, such as deposits and withdrawals, stop payment and release of stop payment, etc. After data verification, the consistency of the data can be fully guaranteed.
[0084] The above-mentioned data migration processing device includes a processor and a memory. The above-mentioned locking unit, export unit, conversion unit, verification unit, import unit and unlocking unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.
[0085] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of data consistency in the data migration process in the prior art can be solved by adjusting the kernel parameters.
[0086] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0087] An embodiment of the present invention provides a computer-readable storage medium having a program stored thereon, which implements the above-mentioned data migration processing method when executed by a processor.
[0088] An embodiment of the present invention provides a processor, which is used to run a program, wherein the processing method for data migration is executed when the program is running.
[0089] An embodiment of the present invention provides a device, comprising a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are performed:
[0090] Step S101, locking the customer;
[0091] Step S102: after the customer is successfully locked, export the migration data of the customer from the source system;
[0092] Step S103, performing data conversion on the migration data to obtain target data, wherein the data conversion is to convert the migration data into target data of the target system according to the conversion relationship in the data mapping table;
[0093] Step S104, verifying the target data;
[0094] Step S105: After the data verification is successful, the target data is imported into the target system;
[0095] Step S106: Unlock the above customer.
[0096] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0097] The present application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program for initializing at least the following method steps:
[0098] Step S101, locking the customer;
[0099] Step S102: after the customer is successfully locked, export the migration data of the customer from the source system;
[0100] Step S103, performing data conversion on the migration data to obtain target data, wherein the data conversion is to convert the migration data into target data of the target system according to the conversion relationship in the data mapping table;
[0101] Step S104, verifying the target data;
[0102] Step S105: After the data verification is successful, the target data is imported into the target system;
[0103] Step S106: Unlock the above customer.
[0104] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0105] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0106] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the above-mentioned units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0107] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0108] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0109] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the above-mentioned methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0110] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0111] 1) The data migration processing method of the present application is as follows: first, the customer is locked; then, after the above-mentioned customer is successfully locked, the migration data of the above-mentioned customer is exported from the source system; then, the above-mentioned migration data is converted to obtain the target data, wherein the above-mentioned data conversion is to convert the above-mentioned migration data into the target data of the target system according to the conversion relationship in the data mapping table; then, the above-mentioned target data is verified; then, after the data verification is successful, the above-mentioned target data is imported into the above-mentioned target system; finally, the above-mentioned customer is unlocked. This method designs a series of processes such as locking, verification, and unlocking for scheduling across multiple systems. In the migration process with a large number of customers and concurrency, the consistency of customer status during the data migration process is ensured, thereby solving the technical problem of data consistency during the data migration process.
[0112] 2) The data migration processing device of the present application first locks the customer through the locking unit; then, after the customer is successfully locked, the migration data of the customer is exported from the source system through the export unit; then, the migration data is converted by the conversion unit to obtain the target data, wherein the data conversion is to convert the migration data into the target data of the target system according to the conversion relationship in the data mapping table; then, the target data is verified by the verification unit; then, after the data verification is successful, the target data is imported into the target system through the import unit; finally, the customer is unlocked by the unlocking unit. The device is designed with a series of processes such as locking, verification, and unlocking for scheduling on multiple systems. In the migration process with a large number of customers and concurrency, the consistency of customer status during the data migration process is guaranteed, thereby solving the technical problem of data consistency during the data migration process.
[0113] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A data migration processing method, characterized in that: include: Locking in customers; After the customer is successfully locked, exporting the customer's migration data from the source system; Performing data conversion on the migration data to obtain target data, wherein the data conversion is to convert the migration data into target data of the target system according to the conversion relationship in the data mapping table; Performing data verification on the target data; After the data verification is successful, the target data is imported into the target system; Unlock the customer. Locking in customers, including: The customer information platform, global routing, and source system are locked respectively. The customer is locked on the customer information platform and the credentials contained in the customer are queried. The migration status of the customer is changed to "Migrating" in the global routing, and the credential lock status is changed to "Migrating" in the source system. The method further comprises: In a case where the lock processing is a transaction lock and the migration data exported from the source system is an online migration, calling the global router to obtain the migration status of the customer, and performing online transaction routing or rejecting the transaction according to the migration status returned by the global router; If the lock is a transaction lock and the migration data is exported from the source system as a batch migration, the global router is called to obtain the migration status of the customer, and batch splitting is performed according to the migration status returned by the global router. The transaction lock indicates that the client will not be migrated when the client is conducting a transaction.
2. The method according to claim 1, characterized in that The method further comprises: If the lock processing is a migration lock and the migration data exported from the source system is an online migration, the migration state of the customer of the global route is set to a pre-migration state, the transaction time of the customer is recorded, and the time interval between the lock time and the transaction time is checked. If the time interval is greater than a preset value, the lock is successful; otherwise, the lock fails and the migration is aborted. When the lock processing is a migration lock and the migration data is exported from the source system for batch migration, the customer information file of the locked customer is sent to the customer information platform, the global router, and the source system in sequence, wherein the files returned by the customer information platform, the global router, and the source system contain information on whether the lock was successful or failed. The migration lock indicates that no customer transactions are performed during the migration process of the customer.
3. The method according to claim 1, characterized in that The process of locking the customer information platform, global routing, and source systems also includes: If the locking of the customer information platform fails, the system will exit with an error message without locking the global routing or the source system. In the event that the global routing lock fails, unlocking of the customer information platform is triggered; In the case that the source system fails to be locked, the global routing and the customer information platform are sequentially triggered to be unlocked.
4. The method according to claim 1, wherein The method further comprises: In the event that any one of the migration data export, the data conversion, the data verification, and the target data import fails, the unlocking of the source system, the global routing, and the customer information platform is triggered in sequence.
5. The method according to claim 1, wherein Performing data verification on the target data, including: Performing data standard and quality verification on the target data, wherein the data standard and quality verification includes at least one of the following: data format, data type, data value range, data encoding specification, and data length; and / or, The target data is subjected to data consistency verification, wherein the data consistency verification includes at least one of the following: logical relationship of data between entities, stateful data, number of new and old data records, data summary value, and new and old data values.
6. The method according to claim 1, wherein Unlocking the customer includes: Unlock the source system, global routing, and customer information platform separately.
7. The method according to any one of claims 1 to 6, characterized in that After importing the target data into the target system, the method further includes: Performing data migration verification on the target data imported into the target system; and / or, Data verification is performed on the target data imported into the target system.
8. A data migration processing device, characterized in that: include: A locking unit, used to lock the customer; an export unit, configured to export the migration data of the customer from the source system after the customer is successfully locked; a conversion unit, configured to perform data conversion on the migration data to obtain target data, wherein the data conversion is to convert the migration data into target data of a target system according to a conversion relationship in a data mapping table; A verification unit, configured to perform data verification on the target data; An import unit, configured to import the target data into the target system after successful data verification; an unlocking unit, configured to unlock the client, The locking unit includes a locking subunit, which is used to lock the customer information platform, the global routing and the source system respectively, wherein the customer is locked on the customer information platform, and the credentials contained in the customer are queried, the migration status of the customer is changed to "migrating" in the global routing, and the credential lock status is changed to "migrating" in the source system. The device also includes a first processing unit and a second processing unit, wherein the first processing unit is used to call the global routing to obtain the migration status of the customer when the lock processing is a transaction lock and the migration data exported from the source system is online migration, and perform online transaction routing or transaction rejection based on the migration status returned by the global routing; the second processing unit is used to call the global routing to obtain the migration status of the customer when the lock processing is a transaction lock and the migration data exported from the source system is batch migration, and perform batch splitting based on the migration status returned by the global routing, wherein the transaction lock indicates that the customer will not be migrated when the customer is conducting a transaction.
Citation Information
Patent Citations
Data migration method of distributed database and distributed database migration system
CN102331993A
Data migration test method and device
CN111966665A