Data checking and complementing method in data integration process
By performing batch verification and completion of batch numbers generated during the big data integration process, the problem of difficult and time-consuming inconsistency analysis in massive data integration is solved, rapid processing of abnormal data is achieved, and data integration performance and consistency are improved. .
Patent Information
- Application Number
- CN202410479774.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-08-23
AI Technical Summary
In the process of big data integration, it is difficult to analyze and compensate for inconsistencies in massive data, and the data merging and analysis of different storage systems takes a long time, making it difficult to maintain data consistency.
By generating a batch number for the data, use the batch number to perform batch verification and completion. The generated batch number consists of time and serial number, add the batch number field, form a target table, and save the batch number and data volume. In the reconciliation table, record the primary key and batch number through the log table, check the batch numbers with interruptions and data volume inconsistencies one by one, and perform abnormal data analysis and compensation operations.
Quickly find and process inconsistent data, improve abnormal data processing performance during data integration, and ensure data consistency.
Smart Images

Figure CN118535557A
Abstract
Description
Technical Field
[0001] The invention discloses a method, which relates to the technical field of data analysis, and in particular to a method for checking and completing data in a data integration process. Background Art
[0002] Data integration service is an important business in the field of big data. In the process of data integration, there may be data problems, such as failure to perform incremental operations as required, system failure, failure to store data in time after retrieval, or even data loss. There may also be duplicate synchronization. In short, data inconsistency is likely to occur during the data integration process.
[0003] In order to maintain data consistency during the data integration process, the usual method is to compare the source table and the target table, find out the inconsistent data, and perform data compensation operations. However, for big data data integration services, there may be massive amounts of data, and it will be very difficult to analyze and find inconsistent data. In addition, the original table and the target table may come from different storage systems, making it difficult to merge and analyze. At the same time, the massive amounts of data in the original table and the target table make statistical analysis very time-consuming. Summary of the invention
[0004] In view of the problems of the prior art, the present invention provides a method for checking and completing data in a data integration process, which can quickly find inconsistent data and perform compensation operations when data inconsistency occurs in data integration.
[0005] The specific scheme proposed by the present invention is:
[0006] The present invention provides a method for checking and completing data in a data integration process, comprising:
[0007] Step 1: During the data integration process, a batch number is generated for the extracted data. The batch number consists of a time and a sequence number. The sequence number is generated in increments according to the expected data volume.
[0008] Add a batch number field to represent the batch number, form the target table of the data, and save the batch number and data volume in the reconciliation table;
[0009] Step 2: Data verification based on batch number:
[0010] The primary key and batch number of the data are recorded in the log table, and the batch numbers are checked one by one to see if there are any interrupted batch numbers. If there are interrupted batch numbers, the data corresponding to the interrupted batch numbers will be lost.
[0011] After checking the batch numbers, check the data volume and mark the batch numbers with inconsistent data volumes;
[0012] Step 3: Analyze the abnormal batch data according to the mark, find the data of the corresponding batch in the target table, and compare it with the data of the corresponding batch in the log table to obtain the abnormal data and perform compensation operations on the abnormal data.
[0013] Furthermore, in the data verification and completion method in the data integration process, step 1 generates a batch number for the extracted data, including: querying to obtain a batch of data, adding a batch number field, calculating the total number of data items, the minimum value of the incremental field, the maximum value of the incremental field, and recording the incremental field name.
[0014] Furthermore, the batch number in step 1 of the data verification and completion method in the data integration process is composed of time and serial number, including:
[0015] The batch number format is specified, in which the time is in front and the serial number is next to the time. The time format is yyyyMMdd, where yyyy represents the 4-digit year, MM represents the 2-digit month, and dd represents the 2-digit date. The serial number uses an 8-digit sequence, and the numbers increase in sequence, with 0s added to the leading digits to make up the number of digits.
[0016] Furthermore, in the method for checking and completing data in a data integration process, checking the amount of data in step 2 includes:
[0017] Query all batch number information and the expected data volume, and perform statistical query based on the batch number information this time. According to the batch number information this time, statistics are performed in the business table and compared with the expected data volume. If the statistical data volume is consistent with the expected data volume in the reconciliation table, no additional processing is required; otherwise, the batch number with inconsistent data volume is marked.
[0018] The present invention also provides a data checking and completing device in a data integration process, comprising a batch number management module, a checking module and an analysis module.
[0019] The batch number management module generates batch numbers for the extracted data during the data integration process. The batch number consists of time and sequence number. The sequence number is generated in increments according to the expected data volume.
[0020] Add a batch number field to represent the batch number, form the target table of the data, and save the batch number and data volume in the reconciliation table;
[0021] The verification module verifies data based on batch number:
[0022] The primary key and batch number of the data are recorded in the log table, and the batch numbers are checked one by one to see if there are any interrupted batch numbers. If there are interrupted batch numbers, the data corresponding to the interrupted batch numbers will be lost.
[0023] After checking the batch numbers, check the data volume and mark the batch numbers with inconsistent data volumes;
[0024] The analysis module analyzes abnormal batch data according to the mark, searches for the data of the corresponding batch in the target table, compares it with the data of the corresponding batch in the log table, obtains the abnormal data, and performs compensation operations on the abnormal data.
[0025] Furthermore, in the data integration process, the batch number management module in the data verification and completion device generates batch numbers from the data extracted, including: querying to obtain a batch of data, adding a batch number field, calculating the total number of data items, the minimum value of the incremental field, the maximum value of the incremental field, and recording the incremental field name.
[0026] Furthermore, the batch number management module in the data checking and completing device in the data integration process generates the batch number consisting of time and serial number, including:
[0027] The batch number format is specified, in which the time is in front and the serial number is next to the time. The time format is yyyyMMdd, where yyyy represents the 4-digit year, MM represents the 2-digit month, and dd represents the 2-digit date. The serial number uses an 8-digit sequence, and the numbers increase in sequence, with 0s added to the leading digits to make up the number of digits.
[0028] Furthermore, the checking module in the data checking and completion device in the data integration process checks the data volume, including:
[0029] Query all batch number information and the expected data volume, and perform statistical query based on the batch number information this time. According to the batch number information this time, statistics are performed in the business table and compared with the expected data volume. If the statistical data volume is consistent with the expected data volume in the reconciliation table, no additional processing is required; otherwise, the batch number with inconsistent data volume is marked.
[0030] The benefits of the present invention are:
[0031] The present invention provides a method for checking and completing data during data integration. When data inconsistency occurs, a method of adding batch numbers can be used to quickly find and process inconsistent data in batches, thereby improving the performance of abnormal data processing during data integration. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a schematic diagram of the application process of the method of the present invention. DETAILED DESCRIPTION
[0033] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0034] The present invention provides a method for checking and completing data in a data integration process, comprising:
[0035] Step 1: During the data integration process, a batch number is generated for the extracted data. The batch number consists of a time and a sequence number. The sequence number is generated in increments according to the expected data volume.
[0036] Add a batch number field to represent the batch number, form the target table of the data, and save the batch number and data volume in the reconciliation table;
[0037] Step 2: Data verification based on batch number:
[0038] The primary key and batch number of the data are recorded in the log table, and the batch numbers are checked one by one to see if there are any interrupted batch numbers. If there are interrupted batch numbers, the data corresponding to the interrupted batch numbers will be lost.
[0039] After checking the batch numbers, check the data volume and mark the batch numbers with inconsistent data volumes;
[0040] Step 3: Analyze the abnormal batch data according to the mark, find the data of the corresponding batch in the target table, and compare it with the data of the corresponding batch in the log table to obtain the abnormal data and perform compensation operations on the abnormal data.
[0041] In the process of data integration, various system failures such as network failures, data errors, disk problems, etc. may occur, and there will always be incomplete or duplicate data. In order to ensure the consistency of data, the method of the present invention uses the method of adding batch numbers to batch the data, and uses the idea of divide and conquer to improve the performance of abnormal data processing during data integration, facilitate data verification and data completion operations.
[0042] In some embodiments of the method of the present invention, the process may be as follows:
[0043] Step 1: During the data integration process, a batch number is generated for the extracted data. The batch number consists of a time and a sequence number. The sequence number is generated in increments according to the expected data volume.
[0044] Add a batch number field to represent the batch number to form the target table of the data, and save the batch number and data volume in the reconciliation table.
[0045] The process of generating a batch number may include: querying to obtain a batch of data, adding a batch number field, calculating the total number of data items, the minimum value of the incremental field, the maximum value of the incremental field, and recording the incremental field name.
[0046] During the data extraction process of data integration, an incremental batch number is generated, and the batch number can be represented by time + serial number. The time format can be yyyyMMdd, where yyyy represents the 4-digit year, MM represents the 2-digit month, and dd represents the 2-digit date, such as 20221109. Depending on the expected data volume, the serial number can be represented by an 8-digit sequence, such as increasing by 1 every day, and adding 0 in front to make up the number of digits. For example, the generated batch numbers are 2022110900000001, 2022110900000002, 2022110900000003….
[0047] During the extraction process, plan the amount of data to be extracted in each batch. Here, we take 10,000 data as an example. During the extraction process, you can add a counter to generate a serial number, and add a batch number field to save the batch number. Here, the field can be represented as batchid. For the 1st to 10,000th data, add a unified batch number 2022110900000001. For example, the original table is Table 1.
[0048] Table 1
[0049] id name 1 Zhang San 2 Li Si … … 10000 Zhang San
[0050] Then add the batch number field to generate the target table, Table 2.
[0051] Table 2
[0052]
[0053]
[0054] It is necessary to store batch number and data volume information additionally and save the information in the reconciliation table, Table 3.
[0055] Table 3
[0056] batchid (batch number) count(amount of data) 2022110900000001 10000 2022110900000002 10000 … … 2022110900000100 9980
[0057] Step 2: Data verification based on batch number:
[0058] The primary key and batch number of the data are recorded in the log table, such as Table 4.
[0059] Table 4
[0060] id batchid 1 2022110900000001 2 2022110900000002 … … 10000 2022110900000003
[0061] Check the batch numbers one by one to see if there are any interrupted batch numbers. Because the batch numbers are incremented and kept in order, as long as the date is generated according to the original batch number rules and the maximum serial number, it is easy to check. If there are interrupted batch numbers, the data corresponding to the interrupted batch numbers will be lost.
[0062] After checking the batch numbers, check the data volume and mark the batch numbers with inconsistent data volumes.
[0063] The data volume check in step 2 includes:
[0064] Query all batch number information and the expected data volume, and perform statistical query based on the batch number information this time. According to the batch number information this time, statistics are performed in the business table and compared with the expected data volume. If the statistical data volume is consistent with the expected data volume in the reconciliation table, no additional processing is required. You can also send a message to notify the original data provider to delete the log of the batch; otherwise, mark the batch number with inconsistent data volume.
[0065] Step 3: Analyze the abnormal batch data according to the mark, find the data of the corresponding batch in the target table, and compare it with the data of the corresponding batch in the log table to obtain the abnormal data and perform compensation operations on the abnormal data. At this time, the amount of data in each batch is very small, so it can be traversed and compared. For abnormal data, it can be analyzed and displayed, and a one-click processing function can be provided to compensate for the abnormal data.
[0066] The present invention also provides a data checking and completing device in a data integration process, comprising a batch number management module, a checking module and an analysis module.
[0067] The batch number management module generates batch numbers for the extracted data during the data integration process. The batch number consists of time and sequence number. The sequence number is generated in increments according to the expected data volume.
[0068] Add a batch number field to represent the batch number, form the target table of the data, and save the batch number and data volume in the reconciliation table;
[0069] The verification module verifies data based on batch number:
[0070] The primary key and batch number of the data are recorded in the log table, and the batch numbers are checked one by one to see if there are any interrupted batch numbers. If there are interrupted batch numbers, the data corresponding to the interrupted batch numbers will be lost.
[0071] After checking the batch numbers, check the data volume and mark the batch numbers with inconsistent data volumes;
[0072] The analysis module analyzes abnormal batch data according to the mark, searches for the data of the corresponding batch in the target table, compares it with the data of the corresponding batch in the log table, obtains the abnormal data, and performs compensation operations on the abnormal data.
[0073] As the information interaction, execution process and other contents between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention, the specific contents can be found in the description of the embodiment of the method of the present invention and will not be repeated here.
[0074] Likewise, when data inconsistency occurs in the device of the present invention, the method of adding batch numbers can be used to quickly find and process inconsistent data in batches, thereby improving the performance of abnormal data processing during data integration.
[0075] It should be noted that not all steps and modules in the above-mentioned processes and device structures are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.
[0076] The above-described embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or changes made by those skilled in the art based on the present invention are within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.
Claims
1. A method for checking and completing data in a data integration process, characterized by: include: Step 1: During the data integration process, a batch number is generated for the extracted data. The batch number consists of a time and a sequence number. The sequence number is generated in increments according to the expected data volume. Add a batch number field to represent the batch number, form the target table of the data, and save the batch number and data volume in the reconciliation table; Step 2: Data verification based on batch number: The primary key and batch number of the data are recorded in the log table, and the batch numbers are checked one by one to see if there are any interrupted batch numbers. If there are interrupted batch numbers, the data corresponding to the interrupted batch numbers will be lost. After checking the batch numbers, check the data volume and mark the batch numbers with inconsistent data volumes; Step 3: Analyze the abnormal batch data according to the mark, find the data of the corresponding batch in the target table, and compare it with the data of the corresponding batch in the log table to obtain the abnormal data and perform compensation operations on the abnormal data.
2. A method for checking and completing data in a data integration process according to claim 1, characterized in that the step of generating a batch number for the extracted data in step 1 comprises: Query to obtain a batch of data, add a batch number field, calculate the total number of data entries, the minimum value of the incremental field, the maximum value of the incremental field, and record the incremental field name.
3. A method for checking and completing data in a data integration process according to claim 1 or 2, characterized in that The batch number mentioned in step 1 consists of a time and a serial number, including: The batch number format is specified, in which the time is in front and the serial number is next to the time. The time format is yyyyMMdd, where yyyy represents the 4-digit year, MM represents the 2-digit month, and dd represents the 2-digit date. The serial number uses an 8-digit sequence, and the numbers increase in sequence, with 0s added to the leading digits to make up the number of digits.
4. The method for checking and completing data in a data integration process according to claim 1, characterized in that In step 2, check the data volume, including: Query all batch number information and the expected data volume, and perform statistical query based on the batch number information this time. According to the batch number information this time, statistics are performed in the business table and compared with the expected data volume. If the statistical data volume is consistent with the expected data volume in the reconciliation table, no additional processing is required; otherwise, the batch number with inconsistent data volume is marked.
5. A data checking and completion device in a data integration process, characterized in that Including batch number management module, verification module and analysis module, The batch number management module generates batch numbers for the extracted data during the data integration process. The batch number consists of time and sequence number. The sequence number is generated in increments according to the expected data volume. Add a batch number field to represent the batch number, form the target table of the data, and save the batch number and data volume in the reconciliation table; The verification module verifies data based on batch number: The primary key and batch number of the data are recorded in the log table, and the batch numbers are checked one by one to see if there are any interrupted batch numbers. If there are interrupted batch numbers, the data corresponding to the interrupted batch numbers will be lost. After checking the batch numbers, check the data volume and mark the batch numbers with inconsistent data volumes; The analysis module analyzes abnormal batch data according to the mark, searches for the data of the corresponding batch in the target table, compares it with the data of the corresponding batch in the log table, obtains the abnormal data, and performs compensation operations on the abnormal data.
6. The data checking and completing device in the data integration process according to claim 5 is characterized in that The batch number management module generates batch numbers from the data extracted, including: querying to obtain a batch of data, adding a batch number field, calculating the total number of data items, the minimum value of the incremental field, the maximum value of the incremental field, and recording the incremental field name.
7. A data checking and completing device in a data integration process according to claim 5 or 6, characterized in that batch The batch number generated by the number management module consists of time and serial number, including: The batch number format is specified, in which the time is in front and the serial number is next to the time. The time format is yyyyMMdd, where yyyy represents the 4-digit year, MM represents the 2-digit month, and dd represents the 2-digit date. The serial number uses an 8-digit sequence, and the numbers increase in sequence, with 0s added to the leading digits to make up the number of digits.
8. The data checking and completing device in the data integration process according to claim 5 is characterized in that The verification module verifies the data volume, including: Query all batch number information and the expected data volume, and perform statistical query based on the batch number information this time. According to the batch number information this time, statistics are performed in the business table and compared with the expected data volume. If the statistical data volume is consistent with the expected data volume in the reconciliation table, no additional processing is required; otherwise, the batch number with inconsistent data volume is marked.
Citation Information
Cited By
Civil aviation data acquisition method, system, equipment and medium
CN119848031A
