Data migration verification method and device, equipment, medium and program product
By acquiring and transforming database information, data migration verification is achieved, solving the problem of low efficiency in traditional manual verification, improving the accuracy and consistency of data migration, and supporting the stable operation of financial business.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-07
AI Technical Summary
In the process of data migration in the financial industry, traditional manual verification methods are inefficient and cannot ensure that the data from the old system is accurately and completely migrated to the new system, or guarantee the consistency of the data before and after the migration.
By acquiring information from the first and second databases, converting data types and encoding methods, storing the data in the second database, and performing reverse conversion for data migration verification, the verification results are generated by field comparison, thus achieving automated data migration verification.
It improves the efficiency of data migration verification, ensures the accuracy and consistency of data in the new system, and supports the continuity and compliance of financial business.
Smart Images

Figure CN121807809A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data technology, and in particular to a data migration verification method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] In the financial industry, accounting systems serve as a core support system, and their functionality and performance continuously evolve with the expansion of business and the increasing complexity of financial markets. When financial institutions decide to build a new core accounting system, data migration becomes a crucial step in the transition from the old to the new system. New systems often employ more advanced architectures, technologies, and algorithms, aiming to provide more efficient processing capabilities, more flexible functional expansion, and stronger risk management capabilities. However, the vast amount of historical data accumulated in the old system is a valuable asset for financial institutions. This data contains critical information such as customer information, transaction records, and accounting details, which are of great significance to the continuity, compliance, and decision analysis of financial operations. Ensuring the accurate and complete migration of data from the old system to the new system, and guaranteeing data consistency before and after the migration, is a crucial prerequisite for the successful upgrade of the accounting system.
[0003] In actual data migration processes, verifying the consistency of migrated data faces numerous challenges. The data volume of core accounting systems in the financial industry is typically extremely large, and traditional manual verification methods are inadequate, requiring manual migration and verification of each data item, resulting in low data migration verification efficiency. Summary of the Invention
[0004] Therefore, it is necessary to provide a data migration verification method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the efficiency of data migration verification in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a data migration verification method, the method comprising:
[0006] Obtain the first database information and first data from the first database, and obtain the second database information from the second database;
[0007] Based on the first database information and the second database information, the first data is converted into the second data;
[0008] The second data is stored in the second database to achieve data migration between the first database and the second database;
[0009] The second data is reverse-converted to obtain the third data, and the second data is verified by data migration based on the third data and the first data to obtain the verification result.
[0010] As one embodiment, the step of converting the first data into second data based on the first database information and the second database information includes:
[0011] Extract the first data type and the first encoding method from the first database information, and extract the second data type and the second encoding method from the second database information;
[0012] Filter the target data from the first data;
[0013] Based on the first data type, the first encoding method, the second data type, and the second encoding method, the target data is converted into second data.
[0014] As one embodiment, the first data includes multiple sub-data; the step of filtering target data from the first data includes:
[0015] Select the target data that was not filtered and was generated the latest from the multiple sub-data sets;
[0016] After converting the target data into second data according to the first data type, the first encoding method, the second data type, and the second encoding method, the above method further includes:
[0017] Return to the process of selecting the target data that has not been filtered and has the latest data generation time from the plurality of sub-data, until all of the sub-data have been filtered.
[0018] As one embodiment, the inverse transformation of the second data to obtain the third data includes:
[0019] Based on the first data type, the first encoding method, the second data type, and the second encoding method, construct a reverse mapping rule;
[0020] According to the reverse mapping rule, the second data is reverse-transformed to obtain the third data.
[0021] As one embodiment, the step of performing data migration verification on the second data based on the third data and the first data to obtain a verification result includes:
[0022] The third data and the first data are compared by field to obtain field comparison information;
[0023] Based on the field comparison information, the second data is subjected to data migration verification to obtain the verification result.
[0024] As one embodiment, the step of performing data migration verification on the second data based on the field comparison information to obtain the verification result includes:
[0025] If the name field comparison information in the field comparison information indicates that the data name field of the third data is inconsistent with the data name field of the first data, then a verification result indicating missing migration data is generated.
[0026] If the name field comparison information in the field comparison information indicates that the data name field of the third data is consistent with the data name field of the first data, then the second data is verified by data migration based on the business field comparison information in the field comparison information to obtain the verification result.
[0027] Secondly, this application also provides a data migration verification apparatus, comprising:
[0028] The data acquisition module is used to acquire the first database information and first data of the first database, and to acquire the second database information of the second database;
[0029] A data conversion module is used to convert the first data into second data based on the first database information and the second database information;
[0030] A data migration module is used to store the second data in the second database to realize data migration between the first database and the second database;
[0031] The data conversion module is also used to reverse convert the second data to obtain the third data;
[0032] The migration verification module is used to perform data migration verification on the second data based on the third data and the first data, and obtain the verification result.
[0033] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the processor performs the following steps when executing the computer program:
[0034] Obtain the first database information and first data from the first database, and obtain the second database information from the second database;
[0035] Based on the first database information and the second database information, the first data is converted into the second data;
[0036] The second data is stored in the second database to achieve data migration between the first database and the second database;
[0037] The second data is reverse-converted to obtain the third data, and the second data is verified by data migration based on the third data and the first data to obtain the verification result.
[0038] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0039] Obtain the first database information and first data from the first database, and obtain the second database information from the second database;
[0040] Based on the first database information and the second database information, the first data is converted into the second data;
[0041] The second data is stored in the second database to achieve data migration between the first database and the second database;
[0042] The second data is reverse-converted to obtain the third data, and the second data is verified by data migration based on the third data and the first data to obtain the verification result.
[0043] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0044] Obtain the first database information and first data from the first database, and obtain the second database information from the second database;
[0045] Based on the first database information and the second database information, the first data is converted into the second data;
[0046] The second data is stored in the second database to achieve data migration between the first database and the second database;
[0047] The second data is reverse-converted to obtain the third data, and the second data is verified by data migration based on the third data and the first data to obtain the verification result.
[0048] The aforementioned data migration verification method, apparatus, computer equipment, computer-readable storage medium, and computer program product, by acquiring first database information and first data from a first database, and acquiring second database information from a second database; converting the first data into second data based on the first database information and the second database information; storing the second data in the second database to achieve data migration between the first and second databases; performing a reverse conversion on the second data to obtain third data, and performing data migration verification on the second data based on the third data and the first data to obtain a verification result; performing data conversion based on the first and second database information to make the converted second data match the second database, thereby storing the second data in the second database to achieve data migration between the first and second databases; and performing a reverse conversion on the second data to perform data migration verification based on the second and third data, thus achieving automated data migration verification throughout the entire process and improving the efficiency of data migration verification. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a diagram illustrating the application environment of a data migration verification method in one embodiment.
[0051] Figure 2 This is a flowchart illustrating a data migration verification method in one embodiment;
[0052] Figure 3 This is a structural block diagram of a data migration verification device in one embodiment;
[0053] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0055] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0056] As an example, the data migration verification method provided in this application can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated on server 104 or placed on a cloud or other network server. Server 104 obtains first database information and first data from a first database, and second database information from a second database; based on the first and second database information, it converts the first data into second data; it stores the second data in the second database to achieve data migration between the first and second databases; it reverse-converts the second data to obtain third data, and verifies the data migration based on the third data and the first data to obtain a verification result. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminal 102 can be a user terminal, and server 104 can push at least one of the verification result, second data, and third data to terminal 102.
[0057] In one exemplary embodiment, such as Figure 2 As shown, a data migration verification method is provided, which is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 202 to 208. Wherein:
[0058] Step 202: Obtain the first database information and first data of the first database, and obtain the second database information of the second database.
[0059] In step 202, the first database is the database awaiting data migration out, and the second database is the database awaiting data migration in. Both the first and second databases can be MySQL (Relational Database Management System) databases. The information in the first database includes at least one of a first data type and a first encoding method, and the information in the second database includes at least one of a second data type and a second encoding method. All data types mentioned herein (including but not limited to the aforementioned first and second data types) include at least one of data categories and data formats.
[0060] Understandably, MySQL databases, as the core data repository for the long-term business operations of financial institutions, have accumulated massive amounts of financial business data, covering a full range of business data from customer account opening information and various financial transaction records to accounting details. This data serves as the original data source for data migration. MySQL databases store this data using their unique storage structure and management methods, ensuring efficient data read / write and transaction processing capabilities.
[0061] Optionally, the above method also includes: backing up each piece of data in the first database to the third database.
[0062] The third database could be Hive (a data warehouse infrastructure based on Hadoop that uses simple SQL statements (HQL) to query and analyze data stored in HDFS and converts the SQL statements into MapReduce programs for data processing).
[0063] Thus, backing up the data in the first database using a third database provides additional security for the data in the first database. Furthermore, Hive databases can map structured data files to a database table and provide SQL-like query functionality, making data analysis more intuitive and efficient. Utilizing Hadoop's distributed computing capabilities for large-scale data processing lays a solid foundation for subsequent data verification.
[0064] Step 204: Convert the first data into second data based on the first database information and the second database information.
[0065] For example, step 204 includes: extracting a first data type and a first encoding method from the first database information, and extracting a second data type and a second encoding method from the second database information; filtering target data from the first data; and converting the target data into second data according to the first data type, the first encoding method, the second data type, and the second encoding method.
[0066] As one embodiment, the first data includes multiple sub-data; the step of filtering target data from the first data includes: selecting target data that has not been filtered and has the latest data generation time from the multiple sub-data; after converting the target data into second data according to the first data type, the first encoding method, the second data type, and the second encoding method, the above method further includes: returning to the step of selecting target data that has not been filtered and has the latest data generation time from the multiple sub-data until all the sub-data have been filtered.
[0067] Understandably, considering that the amount of data waiting to be migrated in the first database may be massive, the latest (i.e., newest) target data will be migrated first to achieve a gradual data migration of the first database.
[0068] The second database can be more up-to-date in terms of architecture and technology compared to the first database.
[0069] Thus, the second database can better meet the requirements of financial business development for system performance, functional scalability, and risk management capabilities. During the data migration process, the conversion of the first database ensures that the data in the first database can be accurately migrated to the second database, and the storage structure and encoding method of the data in the second database can adapt to the business logic and processing flow of the second database.
[0070] Step 206: Store the second data in the second database to achieve data migration between the first database and the second database.
[0071] Step 208: Inversely transform the second data to obtain the third data, and perform data migration verification on the second data based on the third data and the first data to obtain the verification result.
[0072] For example, the reverse transformation of the second data to obtain the third data includes: constructing a reverse mapping rule based on the first data type, the first encoding method, the second data type, and the second encoding method; and performing a reverse transformation of the second data according to the reverse mapping rule to obtain the third data.
[0073] For example, based on the third data and the first data, data migration verification is performed on the second data to obtain a verification result, including: comparing the fields of the third data and the first data to obtain field comparison information; and performing data migration verification on the second data based on the field comparison information to obtain a verification result.
[0074] Specifically, the third data and the first data are compared by field comparison. The field comparison information can be obtained by associating the name field, thereby comparing according to the business fields that have name association.
[0075] Further, based on the field comparison information, data migration verification is performed on the second data to obtain a verification result, including: if the name field comparison information in the field comparison information indicates that the data name field of the third data is inconsistent with the data name field of the first data, then a verification result indicating missing migration data is generated; if the name field comparison information in the field comparison information indicates that the data name field of the third data is consistent with the data name field of the first data, then based on the business field comparison information in the field comparison information, data migration verification is performed on the second data to obtain a verification result.
[0076] Specifically, the generation of verification results representing missing migration data can be handled using the `ifnull` function, which identifies any missing portions. Optionally, a `where` clause can be used to mark name fields that do not match the name field of the third data.
[0077] Thus, the IFNULL function is used to handle potential null values, converting them into specific identifiers before comparison. The comparison results determine the consistency of each field across the two tables, filtering out inconsistent records. Finally, the outer WHERE clause further filters out records with inconsistent fields, quickly pinpointing problematic rows during data migration and providing precise clues for subsequent data repair and troubleshooting.
[0078] Optionally, the first and second data can be data in the loan table (an important data table in the financial industry's accounting system, carrying rich financial business information, whose structure is closely related to the core processes and key elements of financial loan business).
[0079] It is understandable that the `id` field of the `loan` table is of type `bigint(20)` (a system data type in Transact-SQL used to store integers exceeding the range of the `int` data type), and is an auto-incrementing primary key used to uniquely identify each loan record. In database operations, the primary key ensures the uniqueness and integrity of data, facilitating quick location and retrieval of specific records. During data migration and verification, the consistency of the `id` field is one of the important bases for judging data accuracy. If the `id` field is inconsistent before and after migration, it may lead to data association errors, affecting subsequent business processing. The `customer_id` field in the `loan` table is also of type `bigint(20)`. It is a foreign key associated with the `customer` table, used to identify the customer to which the loan record belongs. Through the `customer_id` field, the `loan` table can be associated with the `customer` table to obtain detailed customer information, such as basic customer information and credit records. In financial business, the accurate association between customer information and loan information is of great significance for risk assessment and customer management. During data migration verification, it is necessary to ensure the consistency of the `customer_id` field in the existing system and the new system to ensure the correct correspondence between customers and loan records. The `loan_id` field is of type `varchar` (variable-length string) (64), and is the loan receipt number. As a unique identifier for the business, it has extremely high business importance. Each loan transaction has a unique `loan_id`, which runs through the entire business process of loan application, approval, disbursement, and repayment, and is used to track and manage the progress of the loan transaction. During the data migration process, the accuracy and consistency of `loan_id` are directly related to the integrity and traceability of loan transaction data. If `loan_id` is incorrect or inconsistent, it may lead to chaotic loan transaction data and make it impossible to accurately query and statistically analyze loan information. The `Amt` (stored amount) field is of type `decimal` (18,2), accurate to the cent, and represents the loan amount. The loan amount is one of the core data of the loan business, which is directly related to the financial institution's capital allocation and returns, as well as the borrowing cost of customers. During the data migration and verification process, the accuracy of the `amt` field is crucial. Any error in the amount may lead to serious financial risks and customer disputes.
[0080] In the above data migration verification method, first database information and first data from a first database are obtained, and second database information from a second database is obtained; the first data is converted into second data based on the first database information and the second database information; the second data is stored in the second database to achieve data migration between the first database and the second database; the second data is reverse-converted to obtain third data, and data migration verification is performed on the second data based on the third data and the first data to obtain a verification result. Data conversion is performed based on the first database information and the second database information to make the converted second data match the second database, thereby storing the second data in the second database to achieve data migration between the first database and the second database. The reverse conversion of the second data allows for data migration verification based on the second data and the third data, thus achieving automated data migration verification throughout the entire process and improving the efficiency of data migration verification.
[0081] As a detailed embodiment, the process involves: acquiring first database information and first data from a first database; acquiring second database information from a second database; extracting a first data type and a first encoding method from the first database information; extracting a second data type and a second encoding method from the second database information; selecting target data that has not been filtered and has the latest data generation time from the plurality of sub-data; repeating the process of selecting target data that has not been filtered and has the latest data generation time from the plurality of sub-data until all the sub-data have been filtered; converting the target data into second data according to the first data type, the first encoding method, the second data type, and the second encoding method; and storing the second data in the second database to achieve data exchange between the first database and the second database. According to the migration process, based on the first data type, the first encoding method, the second data type, and the second encoding method, a reverse mapping rule is constructed. According to the reverse mapping rule, the second data is inversely transformed to obtain the third data, and the fields of the third data and the first data are compared to obtain field comparison information. If the name field comparison information in the field comparison information indicates that the data name field of the third data is inconsistent with the data name field of the first data, a verification result indicating missing migration data is generated. If the name field comparison information in the field comparison information indicates that the data name field of the third data is consistent with the data name field of the first data, then according to the business field comparison information in the field comparison information, data migration verification is performed on the second data to obtain a verification result.
[0082] Thus, by acquiring the first database information and first data from the first database, and the second database information from the second database; converting the first data into second data based on the first database information and the second database information; storing the second data in the second database to achieve data migration between the first database and the second database; performing a reverse conversion on the second data to obtain third data, and verifying the data migration based on the third data and the first data to obtain a verification result; performing data conversion based on the first database information and the second database information to make the converted second data match the second database, thereby storing the second data in the second database to achieve data migration between the first database and the second database; and performing a reverse conversion on the second data to perform data migration verification based on the second data and the third data, the entire automated data migration verification process is realized, improving the efficiency of data migration verification.
[0083] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0084] Based on the same inventive concept, this application also provides a data migration verification apparatus for implementing the data migration verification method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data migration verification apparatus embodiments provided below can be found in the limitations of the data migration verification method described above, and will not be repeated here.
[0085] In one exemplary embodiment, such as Figure 3 As shown, a data migration verification device is provided, comprising: a data acquisition module, a data conversion module, a data migration module, and a migration verification module, wherein:
[0086] The data acquisition module is used to acquire the first database information and first data of the first database, and to acquire the second database information of the second database.
[0087] The data conversion module is used to convert the first data into second data based on the first database information and the second database information.
[0088] The data migration module is used to store the second data in the second database to realize data migration between the first database and the second database.
[0089] The data conversion module is also used to reverse convert the second data to obtain the third data.
[0090] The migration verification module is used to perform data migration verification on the second data based on the third data and the first data, and obtain the verification result.
[0091] In one embodiment, the data conversion module is further configured to: extract a first data type and a first encoding method from the first database information, and extract a second data type and a second encoding method from the second database information; filter target data from the first data; and convert the target data into second data according to the first data type, the first encoding method, the second data type, and the second encoding method.
[0092] In one embodiment, the first data includes multiple sub-data; the data conversion module is further configured to: select target data that has not been filtered and has the latest data generation time from the multiple sub-data; after converting the target data into second data according to the first data type, the first encoding method, the second data type, and the second encoding method, the data conversion module is further configured to: return to the execution of selecting target data that has not been filtered and has the latest data generation time from the multiple sub-data until all the sub-data have been filtered.
[0093] In one embodiment, the data conversion module is further configured to: construct a reverse mapping rule based on the first data type, the first encoding method, the second data type, and the second encoding method; and perform a reverse conversion on the second data according to the reverse mapping rule to obtain the third data.
[0094] In one embodiment, the migration verification module is further configured to: perform field comparison between the third data and the first data to obtain field comparison information; and perform data migration verification on the second data based on the field comparison information to obtain a verification result.
[0095] In one embodiment, the migration verification module is further configured to generate a verification result indicating missing migration data if the name field comparison information in the field comparison information indicates that the data name field of the third data is inconsistent with the data name field of the first data; and to perform data migration verification on the second data according to the business field comparison information in the field comparison information to obtain a verification result if the name field comparison information in the field comparison information indicates that the data name field of the third data is consistent with the data name field of the first data.
[0096] Each module in the aforementioned data migration verification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0097] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a data migration verification method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0098] Those skilled in the art will understand that Figure 4The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0099] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0100] Obtain the first database information and first data from the first database, and obtain the second database information from the second database;
[0101] Based on the first database information and the second database information, the first data is converted into the second data;
[0102] The second data is stored in the second database to achieve data migration between the first database and the second database;
[0103] The second data is reverse-converted to obtain the third data, and the second data is verified by data migration based on the third data and the first data to obtain the verification result.
[0104] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0105] Extract the first data type and the first encoding method from the first database information, and extract the second data type and the second encoding method from the second database information;
[0106] Filter the target data from the first data;
[0107] Based on the first data type, the first encoding method, the second data type, and the second encoding method, the target data is converted into second data.
[0108] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0109] Select the target data that was not filtered and was generated the latest from the multiple sub-data sets;
[0110] After converting the target data into second data according to the first data type, the first encoding method, the second data type, and the second encoding method, the above method further includes:
[0111] Return to the process of selecting the target data that has not been filtered and has the latest data generation time from the plurality of sub-data, until all of the sub-data have been filtered.
[0112] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0113] Based on the first data type, the first encoding method, the second data type, and the second encoding method, construct a reverse mapping rule;
[0114] According to the reverse mapping rule, the second data is reverse-transformed to obtain the third data.
[0115] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0116] The third data and the first data are compared by field to obtain field comparison information;
[0117] Based on the field comparison information, the second data is subjected to data migration verification to obtain the verification result.
[0118] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0119] If the name field comparison information in the field comparison information indicates that the data name field of the third data is inconsistent with the data name field of the first data, then a verification result indicating missing migration data is generated.
[0120] If the name field comparison information in the field comparison information indicates that the data name field of the third data is consistent with the data name field of the first data, then the second data is subjected to data migration verification based on the business field comparison information in the field comparison information to obtain the verification result.
[0121] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0122] Obtain the first database information and first data from the first database, and obtain the second database information from the second database;
[0123] Based on the first database information and the second database information, the first data is converted into the second data;
[0124] The second data is stored in the second database to achieve data migration between the first database and the second database;
[0125] The second data is reverse-converted to obtain the third data, and the second data is verified by data migration based on the third data and the first data to obtain the verification result.
[0126] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0127] Extract the first data type and the first encoding method from the first database information, and extract the second data type and the second encoding method from the second database information;
[0128] Filter the target data from the first data;
[0129] Based on the first data type, the first encoding method, the second data type, and the second encoding method, the target data is converted into second data.
[0130] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0131] Select the target data that was not filtered and was generated the latest from the multiple sub-data sets;
[0132] After converting the target data into second data according to the first data type, the first encoding method, the second data type, and the second encoding method, the above method further includes:
[0133] Return to the process of selecting the target data that has not been filtered and has the latest data generation time from the plurality of sub-data, until all of the sub-data have been filtered.
[0134] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0135] Based on the first data type, the first encoding method, the second data type, and the second encoding method, construct a reverse mapping rule;
[0136] According to the reverse mapping rule, the second data is reverse-transformed to obtain the third data.
[0137] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0138] The third data and the first data are compared by field to obtain field comparison information;
[0139] Based on the field comparison information, the second data is subjected to data migration verification to obtain the verification result.
[0140] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0141] If the name field comparison information in the field comparison information indicates that the data name field of the third data is inconsistent with the data name field of the first data, then a verification result indicating missing migration data is generated.
[0142] If the name field comparison information in the field comparison information indicates that the data name field of the third data is consistent with the data name field of the first data, then the second data is subjected to data migration verification based on the business field comparison information in the field comparison information to obtain the verification result.
[0143] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0144] Obtain the first database information and first data from the first database, and obtain the second database information from the second database;
[0145] Based on the first database information and the second database information, the first data is converted into the second data;
[0146] The second data is stored in the second database to achieve data migration between the first database and the second database;
[0147] The second data is reverse-converted to obtain the third data, and the second data is verified by data migration based on the third data and the first data to obtain the verification result.
[0148] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0149] Extract the first data type and the first encoding method from the first database information, and extract the second data type and the second encoding method from the second database information;
[0150] Filter the target data from the first data;
[0151] Based on the first data type, the first encoding method, the second data type, and the second encoding method, the target data is converted into second data.
[0152] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0153] Select the target data that was not filtered and was generated the latest from the multiple sub-data sets;
[0154] After converting the target data into second data according to the first data type, the first encoding method, the second data type, and the second encoding method, the above method further includes:
[0155] Return to the process of selecting the target data that has not been filtered and has the latest data generation time from the plurality of sub-data, until all of the sub-data have been filtered.
[0156] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0157] Based on the first data type, the first encoding method, the second data type, and the second encoding method, construct a reverse mapping rule;
[0158] According to the reverse mapping rule, the second data is reverse-transformed to obtain the third data.
[0159] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0160] The third data and the first data are compared by field to obtain field comparison information;
[0161] Based on the field comparison information, the second data is subjected to data migration verification to obtain the verification result.
[0162] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0163] If the name field comparison information in the field comparison information indicates that the data name field of the third data is inconsistent with the data name field of the first data, then a verification result indicating missing migration data is generated.
[0164] If the name field comparison information in the field comparison information indicates that the data name field of the third data is consistent with the data name field of the first data, then the second data is verified by data migration based on the business field comparison information in the field comparison information to obtain the verification result.
[0165] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0166] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0167] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0168] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A data migration verification method, characterized in that, The method includes: Obtain the first database information and first data from the first database, and obtain the second database information from the second database; Based on the first database information and the second database information, the first data is converted into the second data; The second data is stored in the second database to achieve data migration between the first database and the second database; The second data is reverse-converted to obtain the third data, and the second data is verified by data migration based on the third data and the first data to obtain the verification result.
2. The method according to claim 1, characterized in that, The step of converting the first data into second data based on the first database information and the second database information includes: Extract the first data type and the first encoding method from the first database information, and extract the second data type and the second encoding method from the second database information; Filter the target data from the first data; Based on the first data type, the first encoding method, the second data type, and the second encoding method, the target data is converted into second data.
3. The method according to claim 2, characterized in that, The first data includes multiple sub-data; the step of filtering target data from the first data includes: Select the target data that was not filtered and was generated the latest from the multiple sub-data sets; After converting the target data into second data according to the first data type, the first encoding method, the second data type, and the second encoding method, the above method further includes: Return to the process of selecting the target data that has not been filtered and has the latest data generation time from the plurality of sub-data, until all of the sub-data have been filtered.
4. The method according to claim 2, characterized in that, The step of inversely transforming the second data to obtain the third data includes: Based on the first data type, the first encoding method, the second data type, and the second encoding method, construct a reverse mapping rule; According to the reverse mapping rule, the second data is reverse-transformed to obtain the third data.
5. The method according to claim 1, characterized in that, The step of performing data migration verification on the second data based on the third data and the first data to obtain the verification result includes: The third data and the first data are compared by field to obtain field comparison information; Based on the field comparison information, the second data is subjected to data migration verification to obtain the verification result.
6. The method according to claim 5, characterized in that, The step of performing data migration verification on the second data based on the field comparison information to obtain the verification result includes: If the name field comparison information in the field comparison information indicates that the data name field of the third data is inconsistent with the data name field of the first data, then a verification result indicating missing migration data is generated. If the name field comparison information in the field comparison information indicates that the data name field of the third data is consistent with the data name field of the first data, then the second data is subjected to data migration verification based on the business field comparison information in the field comparison information to obtain the verification result.
7. A data migration verification device, characterized in that, The device includes: The data acquisition module is used to acquire the first database information and first data of the first database, and to acquire the second database information of the second database; A data conversion module is used to convert the first data into second data based on the first database information and the second database information; A data migration module is used to store the second data in the second database to realize data migration between the first database and the second database; The data conversion module is also used to reverse convert the second data to obtain the third data; The migration verification module is used to perform data migration verification on the second data based on the third data and the first data, and obtain the verification result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.