A data migration method, device, product, medium and equipment

By acquiring transaction data from the system to be migrated and the target system, distinguishing incomplete transactions and generating updated data, the problem of data loss caused by the incomplete functionality of the target system was solved, and the reliability of the data migration process was achieved.

CN117235047BActive Publication Date: 2026-01-06CHINA CONSTRUCTION BANK +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311242700.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2026-01-06
Estimated Expiration
2043-09-25

AI Technical Summary

Technical Problem

Existing data migration methods pose a risk of data loss after the target system has been running for some time, making the migration process unreliable.

Method used

By acquiring transaction data from the system to be migrated and the target system, incomplete transactions are identified, updated transaction data that meets the second-phase functionality of the target system is generated, and stored in the target system to ensure data integrity.

Benefits of technology

This ensures the reliability of the data migration process and avoids data loss even when the target system's functionality is incomplete.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117235047B_ABST
    Figure CN117235047B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of databases, in particular to a data migration method, device, product, medium and equipment. The method comprises the following steps: acquiring each first transaction data in a to-be-migrated system and each second transaction data in a target system; for any unfinished transaction in the to-be-migrated system, determining whether the unfinished transaction corresponding second transaction data exists in the target system; if the unfinished transaction corresponding second transaction data exists, generating third transaction data conforming to the target system with a second stage function according to at least the first transaction data of the unfinished transaction in the to-be-migrated system; and storing the third transaction data into the target system. When there is unfinished transaction corresponding second transaction data, the generated third transaction data is an updated version of the second transaction data. Thus, the data is guaranteed not to be lost in the migration process, and the reliability of the data migration process is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of database technology, and in particular to a data migration method, apparatus, product, medium and device. Background Technology

[0002] Data migration refers to the process of selecting, preparing, extracting, and transforming data, and permanently transferring the data from one computer storage system to another.

[0003] Currently, data migration primarily relies on database-table mapping, analyzing field-level mapping rules and implementing migration through stored procedures. However, this method is generally suitable for situations where the differences between old and new systems are minimal, and database-table mapping doesn't require much manual intervention during data migration. If the target system has been running for some time and has already generated some data, continuing to use this process for data migration may lead to data loss, and the data migration process itself is highly unreliable.

[0004] Therefore, there is an urgent need for a data migration method, device, product, medium, and equipment to improve the reliability of the data migration process. Summary of the Invention

[0005] This application provides a data migration method, apparatus, product, medium, and device to improve the reliability of the data migration process.

[0006] In a first aspect, embodiments of this application provide a data migration method, the method comprising:

[0007] Obtain each first transaction data in the system to be migrated and each second transaction data in the target system; the first transaction data is the transaction data corresponding to each incomplete transaction in the system to be migrated.

[0008] For any unfinished transaction in the system to be migrated, determine whether the target system contains second transaction data corresponding to the unfinished transaction; the second transaction data corresponding to the unfinished transaction is generated when the target system has the first-stage function and processes the unfinished transaction; the first-stage function is a part of the function in the system to be migrated;

[0009] If there is second transaction data corresponding to the unfinished transaction, then at least based on the first transaction data of the unfinished transaction in the system to be migrated, a third transaction data conforming to the target system with second-stage functions is generated; the third transaction data is an updated version of the second transaction data; the second-stage functions are more than the first-stage functions;

[0010] The third transaction data is stored in the target system.

[0011] Through the above process, the first transaction data is obtained, and the first transaction data is incomplete transaction data. Then, it is determined in the target system whether there is second transaction data corresponding to the first transaction. If there is second transaction data corresponding to incomplete transactions, the generated third transaction data is used as an updated version of the second transaction data. Thus, after the third transaction data is stored in the target system, the target system contains not only the second transaction data but also the third transaction data. This ensures that no data is lost during the migration process, thereby achieving the reliability of the data migration process.

[0012] In one possible implementation, if the second transaction data corresponding to the unfinished transaction is not stored, then at least based on the first transaction data of the unfinished transaction in the system to be migrated, a fourth transaction data conforming to the target system with the second-stage function is generated; the fourth transaction data is the first version of the unfinished transaction in the target system; and the fourth transaction data is stored in the target system.

[0013] Prior to the migration date, the second-phase functionality had not yet been implemented in the target system. Therefore, the data in the target system was incomplete, containing only the first-phase functionality. After generating the fourth transaction data, which is the complete transaction data required for the second-phase functionality, and since the fourth transaction data did not exist in the target system, it represents the first version corresponding to the incomplete transactions. This ensures that the second-phase functionality can be fully implemented.

[0014] In one possible implementation, the second-stage function includes the first function, but the system to be migrated does not have the first function;

[0015] Based at least on the first transaction data of the unfinished transactions in the system to be migrated, generate third transaction data that conforms to the target system with second-stage functionality, including:

[0016] Based on the first transaction data of the unfinished transactions in the system to be migrated and the fifth transaction data of the unfinished transactions in other source systems with the first function, third transaction data that conforms to the target system with the second stage function is generated.

[0017] In the above method, if the system to be migrated does not have the first function, it means that the first function is a newly launched function. The data required to implement this new function is obtained from other source systems. Therefore, the fifth transaction data in other source systems can be obtained to generate the third transaction data that conforms to the target system with the second stage function.

[0018] In one possible implementation, the second stage function includes a second function, and the system to be migrated has a third function corresponding to the second function; the first transaction data format generated by the second function is different from the second transaction data format generated by the third function.

[0019] Based at least on the first transaction data of the unfinished transactions in the system to be migrated, generate third transaction data that conforms to the target system with second-stage functionality, including:

[0020] Based on the first transaction data, the first transaction data format, and the second transaction data format of the unfinished transactions in the system to be migrated, third transaction data that conforms to the target system with second-stage functions is generated.

[0021] By using the above method, we can distinguish whether there is a third function corresponding to the second function in the system to be migrated. If there is a third function, it means that the target system and the system to be migrated only have different data formats for the same function. Therefore, the third transaction data can be generated based on the existing first and second data formats.

[0022] In one possible implementation, the first transaction data is obtained in the following ways:

[0023] Determine the transaction date and settlement date of each transaction in the system to be migrated; determine the outstanding transactions based on the transaction date and settlement date; or

[0024] Determine the fulfillment date of each transaction in the system to be migrated. If the fulfillment date is later than the data migration time, it is determined to be an incomplete transaction.

[0025] In the above approach, different methods are used to determine whether a transaction is incomplete for different product types, thereby distinguishing between historical transactions and transactions that need to be migrated. Historical transactions do not need to be migrated, thus achieving the screening of transactions that need to be migrated in the migration system.

[0026] In one possible implementation, before obtaining the first transaction data from the system to be migrated and the second transaction data from the target system, the following steps are also included:

[0027] Obtain environmental variables, which are used to characterize whether the target system is undergoing data migration;

[0028] If the environment variable has a first value, then the first value is changed to a second value, which is used to characterize the target system performing data migration.

[0029] By setting an environment variable in the above way, the migration process can be controlled. Data migration can only be performed when the environment variable is set to the second value, thus ensuring the security of the migration process.

[0030] Secondly, embodiments of this application provide a data migration apparatus, the apparatus comprising:

[0031] The acquisition module is used to acquire each first transaction data in the system to be migrated and each second transaction data in the target system; the first transaction data is the transaction data corresponding to each incomplete transaction in the system to be migrated.

[0032] The determination module is used to determine whether the target system contains second transaction data corresponding to any unfinished transaction in the system to be migrated; the second transaction data corresponding to the unfinished transaction is generated when the target system processes the unfinished transaction when it has the first-stage function; the first-stage function is a part of the function in the system to be migrated.

[0033] The generation module is used to generate, if there is second transaction data corresponding to the unfinished transaction, at least based on the first transaction data of the unfinished transaction in the system to be migrated, third transaction data conforming to the target system with second-stage functions; the third transaction data is an updated version of the second transaction data; the second-stage functions are more than the first-stage functions;

[0034] A storage module is used to store the third transaction data in the target system.

[0035] In one possible implementation, if no second transaction data corresponding to the unfinished transaction exists, the generation module is specifically used to generate fourth transaction data conforming to the target system with second-stage functions, based at least on the first transaction data of the unfinished transaction in the system to be migrated; the fourth transaction data is the first version of the unfinished transaction in the target system; and the storage module is used to store the fourth transaction data in the target system.

[0036] In one possible implementation, the second-stage function includes the first function, and the system to be migrated does not have the first function; the generation module is specifically used to generate third transaction data that conforms to the target system having the second-stage function based on the first transaction data of the unfinished transactions in the system to be migrated and the fifth transaction data of the unfinished transactions in other source systems having the first function.

[0037] In one possible implementation, the second-stage function includes a second function, and the system to be migrated has a third function corresponding to the second function; the first transaction data format generated by the second function is different from the second transaction data format generated by the third function; the generation module is specifically used to: generate third transaction data that conforms to the target system having the second-stage function based on the first transaction data of the unfinished transactions in the system to be migrated, the first transaction data format, and the second transaction data format.

[0038] In one possible implementation, the acquisition module is specifically used for:

[0039] Determine the transaction date and settlement date of each transaction in the system to be migrated; determine the outstanding transactions based on the transaction date and settlement date; or

[0040] Determine the fulfillment date of each transaction in the system to be migrated. If the fulfillment date is later than the data migration time, it is determined to be an incomplete transaction.

[0041] In one possible implementation, the acquisition module is further configured to: acquire environmental variables, which are used to characterize whether the target system is performing data migration;

[0042] If the environment variable has a first value, then the first value is changed to a second value, which is used to characterize the target system performing data migration.

[0043] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run, executes any of the methods described in the first aspect.

[0044] Fourthly, embodiments of this application provide a computing device, including: a memory for storing program instructions; and a processor for calling the program instructions stored in the memory and executing the method in any of the designs in the first aspect above according to the obtained program.

[0045] Fifthly, embodiments of this application provide a computer program product that, when run on a processor, implements the method as described in any of the designs in the first aspect above.

[0046] The beneficial effects of the second to fifth aspects mentioned above can be specifically referred to as the beneficial effects that can be achieved by any of the designs in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0047] Figure 1 An exemplary schematic diagram of a scenario architecture provided by an embodiment of this application is shown;

[0048] Figure 2An exemplary schematic diagram illustrates a data migration method provided in an embodiment of this application;

[0049] Figure 3 An exemplary flowchart of a data migration method provided in an embodiment of this application is shown.

[0050] Figure 4 An exemplary illustration shows an application scenario provided by an embodiment of this application;

[0051] Figure 5 A schematic diagram of a data migration apparatus provided in an embodiment of this application is shown as an example. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0053] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.

[0054] Currently, data migration primarily relies on database-table mapping, analyzing field-level mapping rules and implementing migration through stored procedures. However, this method is generally used when the differences between the old and new systems are minimal, and database-table mapping does not generate much manual intervention during data migration. Furthermore, this table-to-table migration method is typically used for full data migrations, where all data from an old system is migrated to a new system.

[0055] Data migration refers to the process of selecting, preparing, extracting, and transforming data, and permanently transferring the data from one computer storage system to another. Furthermore, verifying the integrity of the migrated data and decommissioning the original old data storage are also considered part of the entire data migration process. The source system is the original system to be migrated, and the original data information in the source system's database is obtained, including transaction data, cash flow data, accounting data, and other original data information.

[0056] Figure 1 This illustration shows an application scenario provided by an embodiment of the present application, such as... Figure 1As shown, the old system includes multiple functions, such as transaction management, message processing, balance management, and accounting. The new system, in addition to these functions, also includes clearing and settlement, accounting, and process management. It's important to note that while the same functions in both systems may produce the same result for a single transaction, the intermediate processes may differ. For example, the old system might involve 40 fields in the intermediate process of processing a transaction, while the new system might involve only 30. This illustrates the differences between the old and new systems at the functional level.

[0057] A new system is often more powerful and includes many features not found in the old system. Therefore, it's necessary to import data from other data sources into the new system. This process involves using data from the existing old system and other data sources to generate the data needed for the new system to implement all its functions, and then importing all the data into the new system.

[0058] Figure 2 An exemplary flowchart illustrating a data migration method is provided, such as... Figure 2 As shown, the method includes:

[0059] Step S100: Obtain data information from the source system;

[0060] Step S200: Obtain the target system;

[0061] Step S300: Analyze the target system and divide the data information into first static data and first dynamic data;

[0062] Step S400: Map the first static data to the target system to obtain the second static data, wherein the second static data is the first static data migrated to the target system;

[0063] Step S500: Decompose the processing logic of the target system to obtain multiple sub-processing logics;

[0064] Step S600: Based on the first dynamic data, the static data mapped to the target system is processed in batches through multiple sub-processing logics to obtain the second dynamic data, which is the same data in the target system as the first dynamic data.

[0065] In step S400 above, it is necessary to establish the association between the target system and the source system. Based on the association between the target system and the source system, the first static data is mapped to the target system to obtain the second static data. For example, the association between the target system and the source system can be established by building an intermediate table, and then the first static data can be mapped into the target system, thus preparing for the production of dynamic data. The intermediate table is an intermediate file generated during the data migration process. Based on the intermediate table, the mapping of the first static data is completed. Data migration includes three stages: data extraction, data transformation, and data loading. In these stages, the mapping is responsible for defining its guiding rules to complete the data migration.

[0066] Therefore, it can be seen that linking the target system with the source system is mainly done through some intermediate tables. In these intermediate tables, some static data of the source system is first filled in, and then the process of producing dynamic data further enriches the intermediate tables.

[0067] In step S600 above, after obtaining multiple sub-processing logics, each step is triggered by batch processing, and then the first static data is processed in batches based on multiple sub-processing logics to obtain the second dynamic data. The second dynamic data is the result data after the first dynamic data is migrated and mapped.

[0068] As can be seen from the above process, the data to be migrated is stored in the source system, and the target system is completely empty. Therefore, the data to be migrated can be generated in the form of an intermediate table first, and then it can be fully imported into the target system.

[0069] However, as the target system's functionality gradually improves, more functions in the source system can be implemented by the target system. Therefore, more data needs to be migrated into the target system. During this process, since the target system has been running for some time and has already generated some data, the method described above for importing all data from the source system into the target system is no longer applicable. Continuing to use the above process for data migration may lead to data loss, and the data migration process is highly unreliable.

[0070] Based on this, embodiments of this application provide a data migration method to improve the reliability of the data migration process.

[0071] Figure 3 An exemplary flowchart of a data migration method provided in an embodiment of this application is shown, such as... Figure 3 As shown, the method includes:

[0072] Step 301: Obtain each first transaction data in the system to be migrated and each second transaction data in the target system; the first transaction data is the transaction data corresponding to each unfinished transaction in the system to be migrated.

[0073] For example, the system to be migrated here is the old system, where transactions are processed before the migration. In practical applications, the old system's transaction processing is not complete; it requires data support from other source systems. For instance, in the old system, transaction processing includes transaction management, message processing, balance management, and accounting, while transaction verification and clearing / settlement need to be handled in other systems or web pages. Therefore, in another possible implementation, the old system and multiple other source systems can be collectively referred to as the system to be migrated, and the data within them can be collectively referred to as the first transaction data.

[0074] Since the target system is already operational, it also contains second transaction data. However, due to the incomplete functionality of the target system, the fields in the second transaction data are smaller than those in the first transaction data. Furthermore, because the architectures of the target system and the system to be migrated are different, the structures of the first and second transaction data may also differ. In addition, for the same transaction, the transaction number format in the first and second transaction data may also differ significantly.

[0075] During data migration, it is not necessary to migrate completed historical data; only incomplete transaction data needs to be migrated to the target system. Incomplete transaction data refers to transactions that occurred before the migration date, but whose completion date is after the migration date. For example, for a bond transaction, if the transaction date is before the migration date and the settlement date is after the migration date, then this transaction is an incomplete transaction.

[0076] Step 302: For any unfinished transaction in the system to be migrated, determine whether the target system contains the second transaction data corresponding to the unfinished transaction; the second transaction data corresponding to the unfinished transaction is generated when the target system has the first-stage function and processes the unfinished transaction; the first-stage function is a part of the function in the system to be migrated.

[0077] Prior to the migration date, the target system had already gone live, but only the first phase of functionality existed. The first phase of functionality was still incomplete and could handle some relatively simple transactions. For example, it could create a transaction number corresponding to a transaction in the transaction management function, and this transaction number might be different from the transaction number in the system to be migrated.

[0078] Step 303: If there is second transaction data corresponding to the unfinished transaction, then at least based on the first transaction data of the unfinished transaction in the system to be migrated, generate third transaction data that conforms to the target system with second-stage functions; the third transaction data is an updated version of the second transaction data; the second-stage functions are more than the first-stage functions.

[0079] When there is second transaction data in the target system, after the third transaction data is generated, the third transaction data is identified as the updated version and stored in the target system. It is possible for the second and third transaction data to coexist, only with different version numbers.

[0080] Step 304: Store the third transaction data in the target system.

[0081] Through the above process, the first transaction data is obtained, and the first transaction data is incomplete transaction data. Then, it is determined in the target system whether there is second transaction data corresponding to the first transaction. If there is second transaction data corresponding to incomplete transactions, the generated third transaction data is used as an updated version of the second transaction data. Thus, after the third transaction data is stored in the target system, the target system contains not only the second transaction data but also the third transaction data. This ensures that no data is lost during the migration process, thereby achieving the reliability of the data migration process.

[0082] For example, the above process can be applied to migrate data from the system to be migrated to the isolated environment of the target system. Figure 4 This illustration shows an application scenario provided by an embodiment of the present application, such as... Figure 4 As shown, an isolated environment is independent of both the source and target systems. It can be deployed on any terminal or server and can run independently. During migration, using an isolated environment does not affect the normal transaction processing in either the source or target systems.

[0083] In step 303 above, if there is no second transaction data corresponding to the unfinished transaction, then at least based on the first transaction data of the unfinished transaction in the system to be migrated, a fourth transaction data conforming to the target system with the second stage function is generated; the fourth transaction data is the first version of the unfinished transaction in the target system; and the fourth transaction data is stored in the target system.

[0084] Prior to the migration date, the second-phase functionality had not yet been implemented in the target system. Therefore, the data in the target system was incomplete, containing only the first-phase functionality. After generating the fourth transaction data, which is the complete transaction data required for the second-phase functionality, and since the fourth transaction data did not exist in the target system, it represents the first version corresponding to the incomplete transactions. This ensures that the second-phase functionality can be fully implemented.

[0085] In one possible implementation, the second-stage functionality includes the first functionality, but the system to be migrated does not possess the first functionality. For example, a clearing and settlement function. Since the clearing and settlement function is not present in the system to be migrated, before the migration date, clearing and settlement of a transaction can only be achieved through other systems or web pages.

[0086] In this case, step 303 is specifically implemented as follows: based on the first transaction data of the unfinished transaction in the system to be migrated and the fifth transaction data of the unfinished transaction in other source systems with the first function, generate the third transaction data that conforms to the target system with the second stage function.

[0087] In the above method, if the system to be migrated does not have the first function, it means that the first function is a newly launched function. The data required to implement this new function is obtained from other source systems. Therefore, the fifth transaction data in other source systems can be obtained to generate the third transaction data that conforms to the target system with the second stage function.

[0088] In one possible implementation, the second-stage function includes a second function, and the system to be migrated has a third function corresponding to the second function; the first transaction data format generated by the second function is different from the second transaction data format generated by the third function. For example, both are transaction management functions. When the transaction management function is implemented in the system to be migrated, a new transaction is numbered 002345, while in the target system, the transaction management function in the second-stage function is numbered A01109002345 for the same new transaction. That is, when a new transaction comes in, it will run simultaneously in both the system to be migrated and the target system, and the different systems will have different numbers for this transaction.

[0089] In this case, step 303 is specifically implemented as follows: based on the first transaction data of the unfinished transactions in the system to be migrated, the first transaction data format, and the second transaction data format, generate third transaction data that conforms to the target system with second-stage functions.

[0090] Using the transaction number example above, the first transaction data format corresponds to a transaction-only number: 002345, and the second transaction data format corresponds to a type + number: A01109002345. After obtaining the first and second transaction data formats, the third transaction data, which conforms to the target system with the second-stage function, can be generated based on these formats.

[0091] By using the above method, we can distinguish whether there is a third function corresponding to the second function in the system to be migrated. If there is a third function, it means that the target system and the system to be migrated only have different data formats for the same function. Therefore, the third transaction data can be generated based on the existing first and second data formats.

[0092] The following describes how to obtain the first transaction data:

[0093] Example 1:

[0094] Determine the transaction date and settlement date of each transaction in the system to be migrated; determine the incomplete transactions based on the transaction date and settlement date. For example, in bond trading, if a bond trading transaction occurs before the migration date (i.e., the transaction date is before the migration date), and the bond's maturity date (i.e., the settlement date) is after the migration date, then this bond transaction can be determined as an incomplete transaction.

[0095] Example 2:

[0096] Determine the fulfillment date of each transaction in the system to be migrated. If the fulfillment date is later than the data migration time, it is determined to be an incomplete transaction.

[0097] In the above approach, different methods are used to determine whether a transaction is incomplete for different product types, thereby distinguishing between historical transactions and transactions that need to be migrated. Historical transactions do not need to be migrated, thus achieving the screening of transactions that need to be migrated in the migration system.

[0098] In one possible implementation, before obtaining the first transaction data in the system to be migrated and the second transaction data in the target system, it is also necessary to obtain environment variables. These environment variables exist in an isolated environment and can be used to characterize whether the target system is undergoing data migration. If the environment variable is a first value, the first value is changed to a second value. When the environment variable is a second value, it indicates that the target system is undergoing data migration.

[0099] By setting an environment variable in the above way, the migration process can be controlled. Data migration can only be performed when the environment variable is set to the second value, thus ensuring the security of the migration process.

[0100] Based on the same technical concept, embodiments of this application also provide a data migration apparatus. Figure 5 The illustration shows a schematic diagram of a data migration apparatus provided in an embodiment of this application. This apparatus can perform the aforementioned data migration method, such as... Figure 5 As shown, the device includes:

[0101] The acquisition module is used to acquire each first transaction data in the system to be migrated and each second transaction data in the target system; the first transaction data is the transaction data corresponding to each incomplete transaction in the system to be migrated.

[0102] The determination module is used to determine whether the target system contains second transaction data corresponding to any unfinished transaction in the system to be migrated; the second transaction data corresponding to the unfinished transaction is generated when the target system processes the unfinished transaction when it has the first-stage function; the first-stage function is a part of the function in the system to be migrated.

[0103] The generation module is used to generate, if there is second transaction data corresponding to the unfinished transaction, at least based on the first transaction data of the unfinished transaction in the system to be migrated, third transaction data conforming to the target system with second-stage functions; the third transaction data is an updated version of the second transaction data; the second-stage functions are more than the first-stage functions;

[0104] A storage module is used to store the third transaction data in the target system.

[0105] In one possible implementation, if no second transaction data corresponding to the unfinished transaction exists, the generation module is specifically used to generate fourth transaction data conforming to the target system with second-stage functions, based at least on the first transaction data of the unfinished transaction in the system to be migrated; the fourth transaction data is the first version of the unfinished transaction in the target system; and the storage module is used to store the fourth transaction data in the target system.

[0106] In one possible implementation, the second-stage function includes the first function, and the system to be migrated does not have the first function; the generation module is specifically used to generate third transaction data that conforms to the target system having the second-stage function based on the first transaction data of the unfinished transactions in the system to be migrated and the fifth transaction data of the unfinished transactions in other source systems having the first function.

[0107] In one possible implementation, the second-stage function includes a second function, and the system to be migrated has a third function corresponding to the second function; the first transaction data format generated by the second function is different from the second transaction data format generated by the third function; the generation module is specifically used to: generate third transaction data that conforms to the target system having the second-stage function based on the first transaction data of the unfinished transactions in the system to be migrated, the first transaction data format, and the second transaction data format.

[0108] In one possible implementation, the acquisition module is specifically used for:

[0109] Determine the transaction date and settlement date of each transaction in the system to be migrated; determine the outstanding transactions based on the transaction date and settlement date; or

[0110] Determine the fulfillment date of each transaction in the system to be migrated. If the fulfillment date is later than the data migration time, it is determined to be an incomplete transaction.

[0111] In one possible implementation, the acquisition module is further configured to: acquire environmental variables, which are used to characterize whether the target system is performing data migration;

[0112] If the environment variable has a first value, then the first value is changed to a second value, which is used to characterize the target system performing data migration.

[0113] Based on the same technical concept, this embodiment of the invention also provides a computer program product that, when run on a processor, implements the method shown in the above embodiments.

[0114] Based on the same technical concept, embodiments of the present invention also provide a computing device, including: a memory for storing program instructions;

[0115] The processor is used to call program instructions stored in the memory and execute the methods shown in the above embodiments according to the obtained program.

[0116] Based on the same technical concept, embodiments of the present invention also provide a computer-readable storage medium that implements the method shown in the above embodiments when the computer program product is run on a processor.

[0117] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0118] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0119] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0120] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0121] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A data migration method, characterized by, The method comprises: acquiring each first transaction data in the to-be-migrated system and each second transaction data in the target system; the each first transaction data is the transaction data corresponding to each uncompleted transaction in the to-be-migrated system; the uncompleted transaction is a transaction whose transaction occurrence time is before the migration day and whose transaction completion time is after the migration day; for any uncompleted transaction in the to-be-migrated system, determining whether the second transaction data corresponding to the uncompleted transaction exists in the target system; the second transaction data corresponding to the uncompleted transaction is generated when the target system has a first-stage function and processes the uncompleted transaction; the first-stage function is part of the function in the to-be-migrated system; if the second transaction data corresponding to the uncompleted transaction exists, generating third transaction data conforming to the target system having a second-stage function according to at least the first transaction data of the uncompleted transaction in the to-be-migrated system; the third transaction data is an updated version of the second transaction data; the second-stage function is more than the first-stage function; storing the third transaction data into the target system; the version number of the third transaction data is different from the version number of the second transaction data; the target system contains the second transaction data and the third transaction data.

2. The method of claim 1, wherein, if the second transaction data corresponding to the uncompleted transaction does not exist, generating fourth transaction data conforming to the target system having a second-stage function according to at least the first transaction data of the uncompleted transaction in the to-be-migrated system; the fourth transaction data is the first version of the uncompleted transaction in the target system; storing the fourth transaction data into the target system.

3. The method of claim 1, wherein, the second-stage function includes a first function, and the to-be-migrated system does not have the first function; generating third transaction data conforming to the target system having a second-stage function according to at least the first transaction data of the uncompleted transaction in the to-be-migrated system, comprises: generating third transaction data conforming to the target system having a second-stage function according to the first transaction data of the uncompleted transaction in the to-be-migrated system and fifth transaction data of the uncompleted transaction in other source systems having the first function.

4. The method of claim 1, wherein, the second-stage function includes a second function, and the to-be-migrated system has a third function corresponding to the second function; the first transaction data generated by the second function has a format different from that of the second transaction data generated by the third function; generating third transaction data conforming to the target system having a second-stage function according to at least the first transaction data of the uncompleted transaction in the to-be-migrated system, comprises: generating third transaction data conforming to the target system having a second-stage function according to the first transaction data of the uncompleted transaction in the to-be-migrated system, the format of the first transaction data and the format of the second transaction data.

5. The method of claim 1, wherein, the each first transaction data is obtained by the following method, comprising: determining the transaction day and the delivery day of each transaction in the to-be-migrated system; determining the uncompleted transaction according to the transaction day and the delivery day; or Determine the settlement date of each transaction in the system to be migrated, and if the settlement date is later than the data migration time, determine that it is an uncompleted transaction.

6. The method according to any one of claims 1 to 5, wherein, Before obtaining each first transaction data in the system to be migrated and each second transaction data in the target system, further comprising: Obtain an environment variable, which is used to represent whether the target system is in data migration; If the environment variable is a first value, change the first value to a second value, which is used to represent that the target system is in data migration.

7. A data migration apparatus, characterized by comprising: The device comprises: An obtaining module, configured to obtain each first transaction data in the system to be migrated and each second transaction data in the target system; the each first transaction data is the transaction data corresponding to each uncompleted transaction in the system to be migrated; the uncompleted transaction is a transaction whose transaction occurrence time is before the migration date and whose transaction completion time is after the migration date; A determining module, configured to determine, for any uncompleted transaction in the system to be migrated, whether the target system stores second transaction data corresponding to the uncompleted transaction; the second transaction data corresponding to the uncompleted transaction is generated when the target system has a first stage function and processes the uncompleted transaction; the first stage function is part of the function in the system to be migrated; A generating module, configured to, if the second transaction data corresponding to the uncompleted transaction is stored, generate third transaction data conforming to the target system having a second stage function according to at least the first transaction data of the uncompleted transaction in the system to be migrated; the third transaction data is an updated version of the second transaction data; the second stage function is more than the first stage function; A storage module, configured to store the third transaction data into the target system; the version number of the third transaction data is different from that of the second transaction data; the target system contains the second transaction data and the third transaction data.

8. A computer program product, characterised in that, The computer program product, when running on a processor, implements the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, which, when executed, performs the method of any one of claims 1 to 6.

10. A computing device, comprising: Comprise: A memory, configured to store program instructions; A processor, configured to invoke the program instructions stored in the memory, and perform the method of any one of claims 1 to 6 according to the obtained program instructions.

Citation Information

Patent Citations

  • Data migration method and system

    CN113010489A

  • Transaction processing method and device based on data migration, computer equipment and medium

    CN115858489A

  • Data migration method and device, equipment and storage medium

    CN116627942A