Master-Slave Data Consistency Verification via Extracted Checkpoint Keys
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for verifying data consistency between a master device and a slave device in database systems are resource-intensive and lack accuracy, as they rely on numerous commands in Structured Query Language (SQL) that burden system resources and cannot identify specific inconsistent data.
Innovation Solution
A method and device that acquire data files from both devices, recover data using checkpoint and log files, generate data with primary keys and characteristic values, and compare these to determine consistency, thereby reducing resource usage and improving accuracy.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If numerous SQL commands are used for data verification, then data consistency can be checked, but system resources are heavily occupied and service processing is affected
Solution Approach 1:
The patent extracts only the necessary characteristic values (primary keys and verification values) from the data files and log files, rather than verifying all data. This extraction approach allows consistency checking without requiring numerous SQL commands, thus reducing resource occupation while maintaining verification reliability
Solution Approach 2:
The patent performs preliminary data preparation by pre-extracting primary keys and calculating verification values during data synchronization. This preliminary action enables faster verification later without requiring extensive real-time SQL commands, improving service processing capability during verification
2Reliability
If data verification is performed using traditional methods, then consistency can be determined, but specific inconsistent data cannot be identified
Solution Approach 1:
The patent segments the verification process into two parts: primary key comparison for locating specific records and verification value comparison for confirming inconsistencies. This segmentation enables both consistency determination and precise identification of inconsistent data, as primary keys provide exact record locations while verification values confirm data differences
3Reliability
If checkpoint and log files are used for data recovery, then data can be restored, but data acquisition time increases
Solution Approach 1:
The patent extracts only the essential elements (primary keys and verification values) from checkpoint and log files during data recovery, rather than recovering complete data sets. This selective extraction maintains data recovery capability while significantly reducing data acquisition time and resource consumption
Data Source
AI summary
Disclosed is a method and device for verifying consistency of data of a master device and a slave device. The method comprises: acquiring first data of the master device and the slave device, respectively, each first data comprising a data file of a checkpoint and a log file; recovering data according to received first data of the master device and the slave device respectively to acquire second data of the master device and the slave device, each second data being data recovered according to data file of the checkpoint and the log file; generating third data of the master device and the slave device according to the second data of the master device and the slave device, each third data comprising second data and primary keys and characteristic values of second data; comparing third data of the master device with third data of the slave device; and outputting verification results.


