Data calibration method and system for data migration

CN117520293BActive Publication Date: 2026-09-29INTELLIGENT INTER CONNECTION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311320919.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-12
Publication Date
2026-09-29
Estimated Expiration
2043-10-12

AI Technical Summary

Technical Problem

[0003]本申请通过提供了用于数据迁移的数据校准方法及系统,旨在解决现有大规模数据迁移中无法保证迁移数据准确性的技术问题

Benefits of technology

[0008]由于采用了交互原始数据库确定待迁移数据集,获取数据集字段集并划分待迁移数据,在源端生成字段校验码、内容校验码和关联校验码,传输迁移数据,在目标端重新生成对应校验码,最后基于源、目标两端校验码集实现数据校验的技术方案,解决了现有大规模数据迁移中无法保证迁移数据准确性的技术问题,达到了通过验证码多重验证保证迁移数据准确性的技术效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117520293B_ABST
    Figure CN117520293B_ABST
Patent Text Reader

Abstract

The application discloses a data calibration method and system for data migration, and belongs to the field of data migration, wherein the method comprises the following steps: interacting with an original traffic database, determining a to-be-migrated data set in the original database; obtaining a database field set of the to-be-migrated data set, wherein the database field set comprises a plurality of database fields; dividing the to-be-migrated data set based on the database field set, and obtaining a plurality of to-be-migrated data; obtaining a first verification code set based on the plurality of database fields and the plurality of to-be-migrated data; synchronously transmitting the plurality of to-be-migrated data to a target traffic database, and obtaining a second verification code set; and obtaining a data verification result based on the first verification code set and the second verification code set. The application solves the technical problem that the accuracy of migrated data cannot be ensured in the existing large-scale data migration, and achieves the technical effect that the accuracy of migrated data is ensured through multiple verification of verification codes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data migration, and more specifically to a data calibration method and system for data migration. Background Technology

[0002] With the rapid development of information technology, the amount of data in various business systems is growing explosively. To adapt to the needs of business changes, it is often necessary to migrate existing data to new business systems. Large-scale data migration places higher demands on data integrity and consistency. Existing data migration methods mostly use direct copying or conversion copying, which are prone to data loss or corruption during network transmission and storage. When the data volume is huge, manually checking each piece of data is too costly and cannot effectively verify the results. Once the migrated data has inconsistencies, duplications, omissions, or other problems, it will seriously affect the operation of the new system and cause losses. Summary of the Invention

[0003] This application provides a data calibration method and system for data migration, aiming to solve the technical problem that the accuracy of migrated data cannot be guaranteed in existing large-scale data migration.

[0004] In view of the above problems, this application provides a data calibration method and system for data migration.

[0005] The first aspect disclosed in this application provides a data calibration method for data migration. The method includes: interacting with an original traffic database to determine a dataset to be migrated within the original database; obtaining a database field set for the dataset to be migrated, the database field set containing multiple database fields; partitioning the dataset to be migrated based on the database field set to obtain multiple data items to be migrated, wherein each database field corresponds one-to-one with each data item to be migrated; generating multiple first-field verification codes based on the multiple database fields, generating multiple first-content verification codes based on the multiple data items to be migrated, and generating multiple first-association verification codes based on the multiple database fields and the multiple data items to be migrated, thereby obtaining a first verification code set; synchronously transmitting the multiple data items to be migrated to a target traffic database to generate second-field verification codes, second-content verification codes, and second-association verification codes, thereby obtaining a second verification code set; and obtaining a data verification result based on the first verification code set and the second verification code set.

[0006] Another aspect of this application discloses a data calibration system for data migration, comprising: a migration dataset determination unit for interacting with an original traffic database and determining the dataset to be migrated in the original database; a database field set unit for obtaining a database field set of the dataset to be migrated, the database field set containing multiple database fields; a dataset partitioning unit for partitioning the dataset to be migrated based on the database field set and obtaining multiple data to be migrated, wherein the multiple database fields correspond one-to-one with the multiple data to be migrated; a first verification code set unit for generating multiple first field verification codes based on the multiple database fields, generating multiple first content verification codes based on the multiple data to be migrated, and generating multiple first association verification codes based on the multiple database fields and the multiple data to be migrated, thereby obtaining a first verification code set; a second verification code set unit for synchronously transmitting the multiple data to be migrated to a target traffic database, generating second field verification codes, second content verification codes, and second association verification codes, thereby obtaining a second verification code set; and a data verification result unit for obtaining a data verification result based on the first verification code set and the second verification code set.

[0007] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0008] This technical solution, which uses an interactive original database to determine the dataset to be migrated, obtains the dataset field set and divides the data to be migrated, generates field verification codes, content verification codes and association verification codes on the source side, transmits the migration data, regenerates the corresponding verification codes on the target side, and finally realizes data verification based on the verification code sets at both the source and target sides, solves the technical problem that the accuracy of migrated data cannot be guaranteed in existing large-scale data migrations, and achieves the technical effect of ensuring the accuracy of migrated data through multiple verification codes.

[0009] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description

[0010] Figure 1 This application provides a schematic flowchart of a data calibration method for data migration.

[0011] Figure 2 This application provides a flowchart illustrating the process of obtaining a database field set in a data calibration method for data migration.

[0012] Figure 3 A schematic diagram of a data calibration system for data migration is provided for an embodiment of this application.

[0013] Explanation of reference numerals in the attached figures: Migration dataset determination unit 11, database field set unit 12, dataset partitioning unit 13, first verification code set unit 14, second verification code set unit 15, data verification result unit 16. Detailed Implementation

[0014] The overall concept of the technical solution provided in this application is as follows:

[0015] This application provides a data calibration method and system for data migration. First, the scope of the migrated data is determined, and the correspondence between fields and data is clarified, preparing for the subsequent generation of various check codes. Then, three types of check codes are generated in the source database for fields, content, and relationships, forming a complete source-side check code set for comprehensive data evaluation. Next, the migrated data is transmitted to the target database, and corresponding field check codes, content check codes, and relationship check codes are regenerated on the target side, forming a complete target-side check code set to verify the data status after migration. Finally, by comparing the consistency of the check codes at the source and target ends, it is determined whether errors were introduced during the migration process, and the specific reasons for data inconsistencies are located to accurately assess the migration quality.

[0016] After introducing the basic principles of this application, various non-limiting embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0017] Example 1

[0018] like Figure 1 As shown in the embodiments of this application, a data calibration method for data migration is provided, the method comprising:

[0019] Interact with the original traffic database to determine the dataset to be migrated within the original database;

[0020] In this embodiment, the original transportation database is the source database that needs to be migrated, including multiple two-dimensional tables. Each two-dimensional table contains multiple fields (columns) and multiple records (rows). The two-dimensional tables correspond to entities in the transportation system, such as user tables, order tables, and vehicle tables. The dataset to be migrated is the set of data that needs to be synchronously transmitted to the target database. It may be all the data in the original transportation database or a portion of it.

[0021] On the user interface, select the table names to be migrated from the original transportation database to form a set of table names to be migrated. Iterate through the set of table names to be migrated, use the table name as the query condition, and use the SELECT statement to query all records of the table. Return the dataset to be migrated to provide source data for subsequent data verification and migration operations.

[0022] Obtain the database field set of the dataset to be migrated, wherein the database field set contains multiple database fields;

[0023] Furthermore, this step specifically includes:

[0024] The table structure of the original traffic database is identified to obtain the original database table structure;

[0025] Based on the original database table structure, obtain multiple original database fields;

[0026] Obtain multiple target database fields from the target traffic database, and reconstruct the multiple original database fields based on the multiple target database fields to obtain multiple database fields;

[0027] The multiple database fields constitute a database field set.

[0028] In a preferred embodiment, the database field set is an abstraction of the original database table structure, containing all field information of the data tables corresponding to the dataset to be migrated. First, for each table in the dataset to be migrated, a table structure query statement is constructed for that table. These queries are executed sequentially, and the database returns the table structure for each table, including field names, data types, key information, etc., thus obtaining the original database table structure. Second, for each table's table structure information in the original database table structure, the key-value pairs in the table structure object are traversed, where the key is the field name and the value is the field data type. The field names are extracted and added sequentially to the original field name set, resulting in multiple original database fields.

[0029] After extracting the original database field names, a correspondence is established between the target database table structure information and the original database table structure information. This identifies the original database table corresponding to each target database table structure, as well as the corresponding field information. For each target database table, its corresponding original database field is retrieved from the original database table structure. The original database field information is analyzed based on the target database table structure, checking attributes such as field name, type, and length to determine if the original database fields meet the requirements of the target database table structure. For original database fields that do not meet the requirements, appropriate transformations are performed to ensure their attributes are consistent with the target database fields. After field attribute checks and transformations, the original database fields matching the target database fields are obtained. These field information is identified as multiple database fields, and finally, these multiple database fields are grouped into a database field set.

[0030] The dataset to be migrated is divided based on the database field set to obtain multiple data items to be migrated, wherein each database field corresponds one-to-one with each data item to be migrated.

[0031] In this embodiment, multiple database fields are extracted from a database field set. These fields are traversed to obtain a single database field. Based on this field, a data query is performed on the dataset to be migrated. The retrieved data is extracted and used as a single piece of data to be migrated, and then mapped to the corresponding database field. This process of querying and extracting data from the database fields in the database field set is repeated to obtain multiple pieces of data to be migrated.

[0032] Furthermore, embodiments of this application also include:

[0033] Build a CAPTCHA generator;

[0034] The verification code generator outputs a unique verification code based on the input content. Different input content will produce different verification codes, while the same input content will produce the same verification code.

[0035] The input content includes database fields, data to be migrated, and associated data between the database fields and the data to be migrated;

[0036] The first verification code set and the second verification code set are obtained through the verification code generator.

[0037] In one feasible implementation, the CAPTCHA generator is the core module for data verification. Its function is to generate a unique CAPTCHA based on different input content. The CAPTCHA is a string of numbers, letters, and other symbols used to identify the corresponding input content. Different input content will generate different CAPTCHAs, while the same input content will generate the same CAPTCHA. The input content specifically refers to three types of data in the data verification scenario: database fields, data to be migrated, and associated data between database fields and data to be migrated. Database fields are the field names in the database table structure; data to be migrated are the data records that need to be migrated to the target database; and associated data is data constructed by inserting database fields into the data to be migrated.

[0038] A CAPTCHA generation algorithm is designed using hash algorithms such as MD5 to generate a fixed-length alphanumeric CAPTCHA based on the input content. After the CAPTCHA generator is built, the database fields from the original database, the data to be migrated, and related data are used as input to generate the first CAPTCHA set. After the data migration is completed, a second CAPTCHA set is generated based on the corresponding data in the target database, thereby verifying the data before and after the migration.

[0039] Generate multiple first field verification codes based on the multiple database fields, generate multiple first content verification codes based on the multiple data to be migrated, generate multiple first association verification codes based on the multiple database fields and the multiple data to be migrated, and obtain a first verification code set;

[0040] Furthermore, embodiments of this application also include:

[0041] Obtain the first database field, and based on the first database field, obtain the first data to be migrated;

[0042] Set the text expansion ratio;

[0043] Obtain the first data character count of the first data to be migrated, and obtain the first field increment based on the ratio of the first data character count to the text expansion;

[0044] Obtain the character count of the first field of the first database field, copy the first database field based on the first character increment, and obtain N first field texts;

[0045] The N first field texts are randomly inserted into the first data to be migrated to obtain the first associated data. At the same time, the insertion positions of the N first field texts are recorded to obtain the insertion position set.

[0046] Input the first associated data into the verification code generator to obtain the first associated verification code;

[0047] Add the first associated verification code to the plurality of first associated verification codes.

[0048] In a preferred embodiment, before data migration, data identifiers, i.e., verification codes, are generated based on the data content of the original database for subsequent verification. The first field verification code is generated by a verification code generator using database fields as input, resulting in multiple first field verification codes. The first content verification code is generated by a verification code generator using the data to be migrated as input, resulting in multiple first content verification codes. The first association verification code is generated by a verification code generator using database fields and corresponding associated data in the data to be migrated as input, resulting in multiple first association verification codes.

[0049] Preferably, multiple first-associative CAPTCHAs are generated based on multiple database fields and multiple sets of data to be migrated. First, a specific field from the multiple database fields is obtained as the first database field, and the corresponding data to be migrated is also obtained as the first set of data to be migrated. Second, a text expansion ratio is set. The text expansion ratio is a parameter used to control the amount of text inserted, with a value ranging from 0 to 100%, representing the proportion of the inserted text to the original data to be migrated. For example, setting the text expansion ratio to 10% means that the inserted text is 10% of the original data to be migrated. Then, the first set of data to be migrated is read, its text content is traversed, and the text length is obtained, which is the first data character count. Based on the first data character count and the pre-set text expansion ratio, the amount of text to be inserted, i.e., the first field increment, is calculated. This dynamically calculates the amount of text to be inserted according to the set text expansion ratio, providing parameters for generating the associated CAPTCHA.

[0050] Subsequently, the first database field is read, its length is obtained, and the number of characters in the first field is determined. The first database field is then copied incrementally to obtain multiple copies of the first database field text, resulting in N first field texts. Next, a random number generator generates N random positions, and these N first field texts are inserted into the corresponding positions of the first data content to be migrated. After inserting the field text, the first associated data is obtained, and the insertion positions are recorded and saved as a set of positions for later generation of the second associated verification code. Then, the first associated data is used as input parameters to the previously constructed verification code generator. The verification code generator calculates and outputs the corresponding associated verification code according to the designed algorithm logic; the returned output is the first associated verification code. This process is repeated to obtain the associated verification codes for all database fields, resulting in multiple first associated verification codes.

[0051] By processing the database fields, the data to be migrated, and the associated data in sequence, a verification code generator generates corresponding verification codes, which are then aggregated to produce the first verification code set. This set is used to verify the integrity and correctness of the data migration, thus achieving the purpose of data verification.

[0052] The multiple data to be migrated are synchronously transmitted to the target traffic database, and a second field verification code, a second content verification code, and a second association verification code are generated to obtain a second verification code set.

[0053] Furthermore, embodiments of this application also include:

[0054] Multiple data transmission channels are built based on the aforementioned database fields;

[0055] Obtain the first data transmission channel; after the first data to be migrated has been transmitted through the first data transmission channel, obtain the second field verification code and the second content verification code.

[0056] Retrieve the insertion position set and generate the second associated verification code.

[0057] In a preferred embodiment, once the verification codes for all the data to be migrated in the original database are generated, the complete first verification code set is obtained, and the data migration operation is then carried out.

[0058] First, based on multiple database fields in the original database, an equal number of database connection channels are established between the original and target databases, resulting in multiple data transmission channels. Each connection channel is used to transmit the data to be migrated related to the corresponding database field, allowing for the differentiation and independent transmission of data from different fields. Then, the multiple data to be migrated are synchronously transmitted to the target traffic database through these multiple data transmission channels. An arbitrary data transmission channel is selected as the first data transmission channel. After the migration of the first set of data to be migrated is completed on this channel, a corresponding second field verification code and a second content verification code are generated in the target database. Simultaneously, the insertion position set of previously recorded data is retrieved. Based on the position information in the position set, the transmitted database fields are inserted into the migrated data according to their positions, and then a second association verification code is generated. Finally, the second field verification code, the second content verification code, and the second association verification code are aggregated into a second verification code set, providing verification code support for data calibration.

[0059] The data verification result is obtained based on the first verification code set and the second verification code set.

[0060] Furthermore, embodiments of this application also include:

[0061] Retrieve the first database field;

[0062] Based on the first database field, a first set of verification codes is extracted from the original traffic database, and a second set of verification codes is extracted from the target traffic database.

[0063] Expand the first verification code set and the second verification code set, compare the verification codes in them, and obtain the field verification result, content verification result, and association verification result;

[0064] Add the field validation result, the content validation result, and the association validation result to the data validation result.

[0065] In a preferred embodiment, firstly, the database field set is traversed, and any one database field is selected as the first database field. Then, in the original database, a first set of verification codes related to the first database field is queried; similarly, in the target database, a second set of verification codes related to the first database field is queried. Subsequently, the first and second sets of verification codes are expanded, and field verification codes, content verification codes, and association verification codes are compared according to the verification code type. If the comparison result is true or false, a field verification result, a content verification result, and an association verification result are formed. Next, the three verification results are added to a unified data verification result set, and all database fields are verified sequentially to finally form a complete data verification result.

[0066] By extracting the relevant verification codes field by field and verifying them one by one, a complete data verification result was obtained, including the verification status of fields, content, and associations, thus completing the data calibration.

[0067] Furthermore, embodiments of this application also include:

[0068] If any one of the field validation results, the content validation result, or the association validation result fails, a retransmission instruction is generated.

[0069] Based on the retransmission instruction, data migration is performed again through the data transmission channel.

[0070] In a preferred embodiment, after obtaining the data validation result, the validation result is checked to determine the pass / fail status of the field, content, and association validation results. If any validation result is false, i.e., the validation fails, an instruction is generated to retransmit the data. Upon receiving the retransmission instruction, the database field that failed the validation is located, and the migration of the related data for that field is re-executed on the corresponding data transmission channel. In other words, if any inconsistency occurs in the validation results, retransmission is performed until the final validation passes completely.

[0071] By checking and judging the verification results, and selectively retransmitting only the problematic data instead of retransmitting the entire dataset, efficiency can be improved and the re-migration can be completed.

[0072] In summary, the data calibration method for data migration provided in this application has the following technical effects:

[0073] The process involves interacting with the original traffic database to determine the dataset to be migrated, thus defining the target data range for subsequent verification. The database field set of the dataset to be migrated is obtained, containing multiple database fields. Based on this field set, the dataset is divided into multiple data points to be migrated, with each database field corresponding to a specific data point, clarifying the field-data correspondence for subsequent verification code generation. Multiple first-field verification codes, multiple first-content verification codes, and multiple first-association verification codes are generated based on the database fields and the migrated data, resulting in a first verification code set. These three types of verification codes comprehensively assess data integrity. The migrated data is then synchronously transmitted to the target traffic database, generating second-field verification codes, second-content verification codes, and second-association verification codes, resulting in a second verification code set and the corresponding verification result at the target end. Finally, the data verification result is obtained based on the first and second verification code sets to achieve accurate data verification.

[0074] Example 2

[0075] Based on the same inventive concept as the data calibration method for data migration in the foregoing embodiments, such as Figure 3 As shown in the figure, this application embodiment provides a data calibration system for data migration, the system comprising:

[0076] Migration dataset determination unit 11 is used to interact with the original traffic database and determine the dataset to be migrated in the original database.

[0077] Database field set unit 12 is used to obtain the database field set of the dataset to be migrated, wherein the database field set contains multiple database fields;

[0078] The dataset partitioning unit 13 is used to partition the dataset to be migrated based on the database field set to obtain multiple data to be migrated, wherein the multiple database fields correspond one-to-one with the multiple data to be migrated;

[0079] The first verification code set unit 14 is used to generate multiple first field verification codes based on the multiple database fields, generate multiple first content verification codes based on the multiple data to be migrated, generate multiple first association verification codes based on the multiple database fields and the multiple data to be migrated, and obtain a first verification code set.

[0080] The second verification code set unit 15 is used to synchronously transmit the multiple data to be migrated to the target traffic database, generate a second field verification code, a second content verification code, a second association verification code, and obtain a second verification code set.

[0081] The data verification result unit 16 is used to obtain the data verification result based on the first verification code set and the second verification code set.

[0082] Furthermore, the database field set unit 12 includes the following execution steps:

[0083] The table structure of the original traffic database is identified to obtain the original database table structure;

[0084] Based on the original database table structure, obtain multiple original database fields;

[0085] Obtain multiple target database fields from the target traffic database, and reconstruct the multiple original database fields based on the multiple target database fields to obtain multiple database fields;

[0086] The multiple database fields constitute a database field set.

[0087] Furthermore, embodiments of this application also include a verification code generator unit, which includes the following execution steps:

[0088] Build a CAPTCHA generator;

[0089] The verification code generator outputs a unique verification code based on the input content. Different input content will produce different verification codes, while the same input content will produce the same verification code.

[0090] The input content includes database fields, data to be migrated, and associated data between the database fields and the data to be migrated;

[0091] The first verification code set and the second verification code set are obtained through the verification code generator.

[0092] Furthermore, the first verification code set unit 14 includes the following execution steps:

[0093] Obtain the first database field, and based on the first database field, obtain the first data to be migrated;

[0094] Set the text expansion ratio;

[0095] Obtain the first data character count of the first data to be migrated, and obtain the first field increment based on the ratio of the first data character count to the text expansion;

[0096] Obtain the character count of the first field of the first database field, copy the first database field based on the first character increment, and obtain N first field texts;

[0097] The N first field texts are randomly inserted into the first data to be migrated to obtain the first associated data. At the same time, the insertion positions of the N first field texts are recorded to obtain the insertion position set.

[0098] Input the first associated data into the verification code generator to obtain the first associated verification code;

[0099] Add the first associated verification code to the plurality of first associated verification codes.

[0100] Furthermore, the first verification code set unit 15 includes the following execution steps:

[0101] Multiple data transmission channels are built based on the aforementioned database fields;

[0102] Obtain the first data transmission channel; after the first data to be migrated has been transmitted through the first data transmission channel, obtain the second field verification code and the second content verification code.

[0103] Retrieve the insertion position set and generate the second associated verification code.

[0104] Furthermore, the data verification result unit 16 includes the following execution steps:

[0105] Retrieve the first database field;

[0106] Based on the first database field, a first set of verification codes is extracted from the original traffic database, and a second set of verification codes is extracted from the target traffic database.

[0107] Expand the first verification code set and the second verification code set, compare the verification codes in them, and obtain the field verification result, content verification result, and association verification result;

[0108] Add the field validation result, the content validation result, and the association validation result to the data validation result.

[0109] Furthermore, the data verification result unit 16 also includes the following execution steps:

[0110] If any one of the field validation results, the content validation result, or the association validation result fails, a retransmission instruction is generated.

[0111] Based on the retransmission instruction, data migration is performed again through the data transmission channel.

[0112] In summary, any step of the method described above can be stored as a computer instruction or program in an unrestricted computer memory, and can be called and identified by an unrestricted computer processor to implement any method in the embodiments of this application, without any additional restrictions.

[0113] Furthermore, the "first" or "second" mentioned above may not only represent a sequential relationship, but may also represent a specific concept, and / or refer to the individual or collective selection of multiple elements. Clearly, those skilled in the art can make various modifications and variations to this application without departing from its scope. Therefore, if such modifications and variations fall within the scope of this application and its equivalents, this application intends to include such modifications and variations.

Claims

1. A data calibration method for data migration, characterized in that, The method includes: Interact with the original traffic database to determine the dataset to be migrated; Obtain the database field set of the dataset to be migrated, wherein the database field set contains multiple database fields; The dataset to be migrated is divided based on the database field set to obtain multiple data items to be migrated, wherein each database field corresponds one-to-one with each data item to be migrated. Generate multiple first field verification codes based on the multiple database fields, generate multiple first content verification codes based on the multiple data to be migrated, generate multiple first association verification codes based on the multiple database fields and the multiple data to be migrated, and obtain a first verification code set; The multiple data to be migrated are synchronously transmitted to the target traffic database, and a second field verification code, a second content verification code, and a second association verification code are generated to obtain a second verification code set. The data verification result is obtained based on the first verification code set and the second verification code set; This involves obtaining the database field set of the data to be migrated, wherein the database field set contains multiple database fields, including: The table structure of the original traffic database is identified to obtain the original database table structure; Based on the original database table structure, obtain multiple original database fields; Obtain multiple target database fields from the target traffic database, and reconstruct the multiple original database fields based on the multiple target database fields to obtain multiple database fields; The multiple database fields constitute a database field set; The method further includes: Build a CAPTCHA generator; The verification code generator outputs a unique verification code based on the input content. Different input content will produce different verification codes, while the same input content will produce the same verification code. The input content includes database fields, data to be migrated, and associated data between the database fields and the data to be migrated; The first verification code set and the second verification code set are obtained through the verification code generator; Among them, multiple first-association verification codes are generated based on the multiple database fields and the multiple data to be migrated, including: Obtain the first database field, and based on the first database field, obtain the first data to be migrated; Set the text expansion ratio; Obtain the first data character count of the first data to be migrated, and obtain the first field increment based on the ratio of the first data character count to the text expansion; Obtain the character count of the first field of the first database field, copy the first database field based on the increment of the first field, and obtain N text values ​​of the first field; The N first field texts are randomly inserted into the first data to be migrated to obtain the first associated data. At the same time, the insertion positions of the N first field texts are recorded to obtain the insertion position set. Input the first associated data into the verification code generator to obtain the first associated verification code; Add the first associated verification code to the plurality of first associated verification codes.

2. The method according to claim 1, characterized in that, The method further includes: Multiple data transmission channels are built based on the aforementioned database fields; Obtain the first data transmission channel. After the first data to be migrated is transmitted through the first data transmission channel, obtain the second field verification code and the second content verification code. Retrieve the insertion position set and generate the second associated verification code.

3. The method according to claim 2, characterized in that, Obtaining data verification results based on the first verification code set and the second verification code set includes: Retrieve the first database field; Based on the first database field, a first set of verification codes is extracted from the original traffic database, and a second set of verification codes is extracted from the target traffic database. Expand the first verification code set and the second verification code set, compare the verification codes in them, and obtain the field verification result, content verification result, and association verification result; Add the field validation result, the content validation result, and the association validation result to the data validation result.

4. The method according to claim 3, characterized in that, The method further includes: If any one of the field validation results, the content validation result, or the association validation result fails, a retransmission instruction is generated. Based on the retransmission instruction, data migration is performed again through the data transmission channel.

5. A data calibration system for data migration, characterized in that, The system for implementing the data calibration method for data migration according to any one of claims 1-4, the system comprising: A migration dataset determination unit is used to interact with the original traffic database and determine the dataset to be migrated in the original database. A database field set unit is used to obtain the database field set of the dataset to be migrated, wherein the database field set contains multiple database fields; A dataset partitioning unit is used to partition the dataset to be migrated based on the database field set to obtain multiple data items to be migrated, wherein the multiple database fields correspond one-to-one with the multiple data items to be migrated; The first verification code set unit is used to generate multiple first field verification codes based on the multiple database fields, generate multiple first content verification codes based on the multiple data to be migrated, generate multiple first association verification codes based on the multiple database fields and the multiple data to be migrated, and obtain a first verification code set. The second verification code set unit is used to synchronously transmit the multiple data to be migrated to the target traffic database, generate a second field verification code, a second content verification code, a second association verification code, and obtain a second verification code set. A data verification result unit is used to obtain a data verification result based on the first verification code set and the second verification code set.

Citation Information

Patent Citations

  • A data migration method and device

    CN109002474A

  • Data migration method based on message-oriented middleware and related equipment

    CN110334075A