Heterogeneous data synchronization method and system

Through flexible adaptation layers and distributed consistency algorithms and other technical means, flexibility, consistency, performance and security issues in heterogeneous data synchronization are solved, and an efficient, reliable and secure heterogeneous data synchronization solution is achieved.

CN119166645AInactive Publication Date: 2024-12-20HEBEI TONGFU SHARING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411199584.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing heterogeneous data synchronization technology lacks flexibility and universality, it is difficult to deal with differences between different data sources, and data consistency is difficult to ensure in a distributed environment, synchronization performance and efficiency are low, data security is insufficient, and synchronization is solved. The solution is complex and difficult to maintain.

Method used

Adopt flexible adaptation layer, distributed consistency algorithm, efficient data transmission mechanism and complete security strategies to realize data analysis and conversion through data adapters, build a data mapping engine, use distributed consistency algorithm and transaction management strategy, and combine it with Multi-threaded processing and data compression transmission, real-time monitoring and alarm modules ensure data security and privacy protection.

Benefits of technology

It realizes efficient, reliable, secure and easy-to-use heterogeneous data synchronization, which can seamlessly connect multiple data sources, ensure data consistency and integrity, reduce synchronization delays, improve efficiency, ensure data security and privacy protection, and simplify operations Dimension process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166645A_ABST
    Figure CN119166645A_ABST
Patent Text Reader

Abstract

The invention relates to a heterogeneous data synchronization method and system.The method comprises the steps that environment information is configured, a data source and a target database are specified, and data stored in the data source and data stored in the target database belong to heterogeneous data; configuring a data adapter according to the data source and the target database, reading data from the data source or the target database through the data adapter, and performing data analysis and conversion processing when reading the data from the data source to obtain data meeting the data format requirement of the target database; constructing a data mapping engine, and maintaining field mapping information and data type conversion information; and starting a data synchronization task, and writing the data meeting the data format requirement of the target database into the target database based on a distributed consistency algorithm. According to the invention, by introducing a flexible adaptation layer, a distributed consistency algorithm, an efficient data transmission mechanism and a perfect security policy, a heterogeneous data synchronization solution which is efficient, reliable, safe and easy to use is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a heterogeneous data synchronization method and system. Background Art

[0002] In the field of modern information technology, data synchronization refers to the process of maintaining data consistency and coordination between different data sources. Heterogeneous data synchronization involves data consistency and update between multiple data sources with different structures, formats or storage mechanisms. This synchronization is particularly important in scenarios such as distributed systems, data warehouses, and cross-platform applications. In the existing field of heterogeneous data synchronization, existing technologies face multiple challenges.

[0003] First, due to the diversity of data source formats and structures, including relational databases, NoSQL databases, file systems, and API interfaces, existing technologies often lack flexibility and versatility, and it is difficult to efficiently handle the differences between different data sources.

[0004] Due to the significant differences in formats and structures between data sources, such as relational databases, NoSQL databases, file systems, API interfaces, etc., existing technologies often lack flexibility and versatility in dealing with these differences. Traditional data synchronization methods usually rely on specific data formats or protocols and are difficult to adapt to diverse data sources.

[0005] Secondly, ensuring data consistency is particularly difficult in a distributed environment, as data inconsistency is prone to occur due to network delays, system failures, or node failures.

[0006] Ensuring data consistency in a heterogeneous environment is a huge challenge. Existing technologies are prone to data inconsistency when processing distributed transactions and concurrent operations, especially in the case of network delays, system failures, or node failures.

[0007] Again, in terms of synchronization performance and efficiency, there are performance bottlenecks when processing large-scale data, and traditional batch or scheduled synchronization methods may cause delays and excessive load.

[0008] Existing data synchronization methods often have performance bottlenecks when processing large-scale data. When the data volume is large and the updates are frequent, traditional batch processing or scheduled synchronization methods may cause synchronization delays and excessive system load, affecting overall performance and user experience.

[0009] Secondly, data security and privacy protection are also important issues, and there may be risks of data leakage during data transmission and storage.

[0010] In the process of data synchronization, data security and privacy protection are also issues that need to be considered. In the process of data transmission and storage, existing technologies may have security risks such as data leakage and unauthorized access.

[0011] Finally, existing synchronization solutions are complex and difficult to maintain, requiring professional technicians to operate, which increases operation and maintenance costs and technical barriers.

[0012] Existing data synchronization solutions are often complex and difficult to configure and maintain. They require professional technicians to set up and manage, which increases the operation and maintenance costs and technical barriers of enterprises.

[0013] The information disclosed in this background technology section is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to those skilled in the art. Summary of the invention

[0014] In view of the defects existing in the prior art, the purpose of the present invention is to provide a heterogeneous data synchronization method and system, which aims to provide an efficient, reliable, secure and easy-to-use heterogeneous data synchronization solution by introducing a flexible adaptation layer, a distributed consistency algorithm, an efficient data transmission mechanism and a complete security strategy.

[0015] In order to achieve the above purpose, the technical solution adopted by the present invention is:

[0016] A heterogeneous data synchronization method, characterized by comprising the following steps:

[0017] Configure environment information, specify a data source and a target database, where the data stored in the data source and the target database are heterogeneous data;

[0018] Configure the data adapter according to the data source and target database, and read data from the data source or target database through the data adapter. When reading data from the data source, perform data analysis and conversion to obtain data that meets the data format requirements of the target database.

[0019] Build a data mapping engine to maintain field mapping information and data type conversion information;

[0020] Start a data synchronization task and write data that meets the data format requirements of the target database into the target database based on the distributed consistency algorithm.

[0021] Based on the above technical solution, the data adapter maintains a field mapping table for storing the set values ​​of the mapping relationship between the specified fields in the data source and the target database;

[0022] The data adapter also maintains a fault-tolerant processing strategy library, and configures and stores at least one error data processing strategy for errors that may occur during data parsing and conversion processing.

[0023] On the basis of the above technical solution, the data adapter maintains a message queue, performs data synchronization by means of caching and batch operations, and reduces the number of interactions between the data source and the target database.

[0024] On the basis of the above technical solution, the data adapter has an access interface of the HTTP API data source, the access interface configures the API request parameter set to send the HTTP request to the API server, and after the access interface receives the response returned by the API server, obtains the status code, response header and response body, completes the content type identification of the response body, and uses the corresponding parser to parse the response body;

[0025] When the data structure returned by the API changes frequently, dynamically parse the data returned by the API by establishing mapping rules;

[0026] When requests are frequent and the data structure returned by the API does not change often, the data returned by the API is parsed through the cache mechanism.

[0027] Based on the above technical solution, the written data is verified in the target database, specifically including:

[0028] Verify record counts to ensure data entries are consistent;

[0029] Compare field values ​​to ensure that the values ​​do not change after synchronization;

[0030] Check data type and data format;

[0031] Define data quality rules and check whether the data meets specific business rules and constraints based on scripts;

[0032] Record the above verification results and generate a report.

[0033] Based on the above technical solution, the data mapping engine provides a graphical interface or a JSON / YAML configuration file for defining the mapping relationship between the source data and the target relational database table structure;

[0034] The data mapping engine can load field mapping plug-ins, data type conversion plug-ins, and complex query condition setting plug-ins to ensure the accuracy and efficiency of data conversion.

[0035] Based on the above technical solution, the data synchronization task has an embedded data consistency guarantee mechanism, including transaction management, optimistic locking / pessimistic locking strategies, and conflict detection and automatic resolution logic, to ensure that the data in the target database remains consistent and complete in complex scenarios such as concurrent writing or network delays.

[0036] Based on the above technical solution, the data synchronization task improves the efficiency of data synchronization and reduces resource consumption through multi-threaded processing, batch processing, and data compression transmission;

[0037] Through the real-time data capture mechanism, when data changes occur in the data source, the data synchronization task is immediately started.

[0038] Based on the above technical solution, the data synchronization task uses a monitoring and alarm module to monitor the synchronization task status and performance indicators in real time, and automatically notify the administrator when an abnormal situation occurs.

[0039] A heterogeneous data synchronization system, characterized by comprising:

[0040] Configuration management module, used to configure environment information;

[0041] Data adapter, used to read data from a data source or a target database through a data adapter, and perform data analysis and conversion when reading data from a data source to obtain data that meets the data format requirements of the target database;

[0042] Data mapping engine, used to maintain field mapping information and data type conversion information;

[0043] The data synchronization module is used to write data that meets the data format requirements of the target database into the target database based on a distributed consistency algorithm.

[0044] The heterogeneous data synchronization method and system described in the present invention have the following beneficial effects:

[0045] By introducing a flexible adaptation layer, it can seamlessly connect to a variety of heterogeneous data sources, including relational databases, NoSQL databases, file systems, and API interfaces, improving the versatility and adaptability of the system.

[0046] The distributed consistency algorithm and sophisticated transaction management strategy are used to ensure the consistency and integrity of data in a complex distributed environment;

[0047] In terms of performance and efficiency, the incremental synchronization mechanism and real-time data capture technology greatly reduce synchronization delay and improve synchronization efficiency, making it suitable for large-scale data synchronization scenarios;

[0048] In terms of data security and privacy protection, encryption technology and access control mechanisms are used to ensure the security of data during transmission and storage;

[0049] It achieves high compatibility, data consistency guarantee, high performance and efficiency, data security and privacy protection, ease of use and maintainability, as well as excellent fault tolerance and recovery capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The present invention has the following accompanying drawings:

[0051] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0052] Figure 1 A flowchart of a first embodiment of a heterogeneous data synchronization method according to the present invention.

[0053] Figure 2 System architecture diagram of Embodiment 1 of a heterogeneous data synchronization system described in the present invention. DETAILED DESCRIPTION

[0054] The present invention is further described in detail below in conjunction with the accompanying drawings. The detailed description is an explanation made in conjunction with the exemplary embodiments of the present invention, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0055] like Figure 1 As shown, the present invention provides a heterogeneous data synchronization method, comprising the following steps:

[0056] Configure environment information, specify a data source and a target database, where the data stored in the data source and the target database are heterogeneous data;

[0057] For example, the data source is MySQL, and the target database is Elasticsearch; the synchronization method is used to synchronize heterogeneous data in the data source to the target relational database; the data source and the target database are any of the following and they are different:

[0058] MySQL, a relational database management system (RDBMS), uses structured query language (SQL) to query and manage data;

[0059] MongoDB, a non-relational database (NoSQL), also known as a document storage database;

[0060] Elasticsearch, a search engine based on Lucene. It provides full-text search capabilities and can quickly index, search, and analyze large amounts of data;

[0061] HTTP API refers to an application programming interface (API) implemented using the HTTP protocol;

[0062] Configure the data adapter according to the data source and target database, and read data from the data source or target database through the data adapter. When reading data from the data source, perform data analysis and conversion to obtain data that meets the data format requirements of the target database.

[0063] The data adapter maintains a field mapping table for storing setting values ​​for mapping relationships between specified fields in the data source and the target database;

[0064] The data adapter also maintains a fault-tolerant processing strategy library, which configures and stores at least one error data processing strategy for errors that may occur during data parsing and conversion processing (such as field mismatch, data type incompatibility, etc.);

[0065] For example, configure the MySQL data adapter to read data from MySQL, and configure the Elasticsearch data adapter to read data from Elasticsearch; when reading data from MySQL, perform data parsing and conversion to obtain data that meets the data format requirements of Elasticsearch;

[0066] The data adapter implements a flexible adaptation layer design, which can provide customized data reading interfaces for multiple data sources, including MySQL, MongoDB, Elasticsearch, and HTTP API. This design enables the system to easily access various heterogeneous data sources without requiring extensive modifications or custom development of the data source itself, greatly enhancing the compatibility and scalability of the system. In the complex and ever-changing enterprise IT environment, this solution can cross the data structure, protocol, and interface differences between multiple database systems (such as relational databases, NoSQL databases), operating systems, and application software to achieve seamless docking and efficient synchronization.

[0067] Build a data mapping engine to maintain field mapping information and data type conversion information;

[0068] Start a data synchronization task and write data that meets the data format requirements of the target database into the target database based on a distributed consistency algorithm, such as Raft, Paxos, etc., to ensure that during the data synchronization process in a distributed environment, data consistency and integrity can be maintained even under adverse conditions such as network delays, system failures, or node failures.

[0069] On the basis of the above technical solution, the data adapter maintains a message queue, performs data synchronization by means of caching and batch operations, and reduces the number of interactions between the data source and the target database.

[0070] On the basis of the above technical solution, the data adapter has an access interface of the HTTP API data source, the access interface configures the API request parameter set to send the HTTP request to the API server, and after the access interface receives the response returned by the API server, obtains the status code, response header and response body, completes the content type identification of the response body, and uses the corresponding parser to parse the response body;

[0071] When the data structure returned by the API changes frequently, dynamically parse the data returned by the API by establishing mapping rules;

[0072] When requests are frequent and the data structure returned by the API does not change often, the data returned by the API is parsed through the cache mechanism.

[0073] Based on the above technical solution, the written data is verified in the target database, specifically including:

[0074] Verify record counts to ensure data entries are consistent;

[0075] Compare field values ​​to ensure that the values ​​do not change after synchronization;

[0076] Check data type and data format;

[0077] Define data quality rules and check whether the data meets specific business rules and constraints based on scripts;

[0078] Record the above verification results and generate a report.

[0079] Based on the above technical solution, the data mapping engine provides a graphical interface or a JSON / YAML configuration file for defining the mapping relationship between the source data and the target relational database table structure;

[0080] The data mapping engine can load field mapping plug-ins, data type conversion plug-ins, and complex query condition setting plug-ins to ensure the accuracy and efficiency of data conversion.

[0081] Based on the above technical solution, the data synchronization task has an embedded data consistency guarantee mechanism, including transaction management, optimistic locking / pessimistic locking strategies, and conflict detection and automatic resolution logic, to ensure that the data in the target database remains consistent and complete in complex scenarios such as concurrent writing or network delays.

[0082] This embodiment implements sophisticated transaction management and lock strategies, and embeds transaction management, optimistic locking / pessimistic locking strategies, and conflict detection and automatic resolution logic, effectively avoiding data inconsistency problems caused by concurrent writing or data conflicts. These mechanisms work together to provide a solid data consistency guarantee for the system.

[0083] Based on the above technical solution, the data synchronization task improves the efficiency of data synchronization and reduces resource consumption through multi-threaded processing, batch processing, and data compression transmission;

[0084] Through the real-time data capture mechanism, when data changes occur in the data source, the data synchronization task is immediately started.

[0085] This embodiment can greatly reduce synchronization delay and improve user experience.

[0086] Based on the above technical solution, the data synchronization task uses a monitoring and alarm module to monitor the synchronization task status and performance indicators in real time, and automatically notify the administrator when an abnormal situation occurs.

[0087] On the basis of the above technical solution, the data synchronization task adopts an encrypted channel for data transmission to ensure the security of data during the transmission process.

[0088] When transmitting data, we must comply with international data protection regulations such as GDPR, implement privacy protection measures such as data desensitization and anonymization, and ensure data compliance.

[0089] For example: During data transmission, encryption technology (such as TLS / SSL protocol) is used to encrypt the transmission channel to ensure the security and integrity of data during transmission.

[0090] For example: set fine-grained access control permissions and strictly manage data access during the synchronization process to prevent unauthorized access and data leakage.

[0091] Based on the above technical solution, Figure 2 As shown, the present invention provides a heterogeneous data synchronization system, including:

[0092] Configuration management module, used to configure environment information;

[0093] Data adapter, used to read data from a data source or a target database through a data adapter, and perform data analysis and conversion when reading data from a data source to obtain data that meets the data format requirements of the target database;

[0094] Data mapping engine, used to maintain field mapping information and data type conversion information;

[0095] The data synchronization module is used to write data that meets the data format requirements of the target database into the target database based on a distributed consistency algorithm.

[0096] On the basis of the above technical solutions, it also includes:

[0097] Data consistency module, used to embed data consistency guarantee mechanism in data synchronization tasks;

[0098] Security and privacy module, used to provide encrypted channels for data synchronization tasks to transmit data;

[0099] The monitoring and alarm module is used to monitor the synchronization task status and performance indicators in real time, and automatically notify the administrator when abnormal situations occur.

[0100] The contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field.

[0101] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by those skilled in the art based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.

Claims

1. A heterogeneous data synchronization method, It is characterized in that The steps include: Configure environment information, specify a data source and a target database, where the data stored in the data source and the target database are heterogeneous data; Configure the data adapter according to the data source and target database, and read data from the data source or target database through the data adapter. When reading data from the data source, perform data analysis and conversion to obtain data that meets the data format requirements of the target database. Build a data mapping engine to maintain field mapping information and data type conversion information; Start a data synchronization task and write data that meets the data format requirements of the target database into the target database based on the distributed consistency algorithm.

2. A heterogeneous data synchronization method as claimed in claim 1, It is characterized in that The data adapter maintains a field mapping table for storing setting values ​​for mapping relationships between specified fields in the data source and the target database; The data adapter also maintains a fault-tolerant processing strategy library, and configures and stores at least one error data processing strategy for errors that may occur during data parsing and conversion processing.

3. A heterogeneous data synchronization method as claimed in claim 1, It is characterized in that The data adapter maintains a message queue and performs data synchronization by caching and batch operation, thereby reducing the number of interactions between the data source and the target database.

4. A heterogeneous data synchronization method as claimed in claim 1, It is characterized in that The data adapter has an access interface of the HTTPAPI data source, and the access interface configures the API request parameter set to send an HTTP request to the API server. After receiving the response returned by the API server, the access interface obtains the status code, response header and response body, completes the content type identification of the response body, and uses the corresponding parser to parse the response body; When the data structure returned by the API changes frequently, dynamically parse the data returned by the API by establishing mapping rules; When requests are frequent and the data structure returned by the API does not change often, the data returned by the API is parsed through the cache mechanism.

5. A heterogeneous data synchronization method as claimed in claim 1, It is characterized in that Verify the written data in the target database, including: Verify record counts to ensure data entries are consistent; Compare field values ​​to ensure that the values ​​do not change after synchronization; Check data type and data format; Define data quality rules and check whether the data meets specific business rules and constraints based on scripts; Record the above verification results and generate a report.

6. A heterogeneous data synchronization method as claimed in claim 1, It is characterized in that The data mapping engine provides a graphical interface or a JSON / YAML configuration file for defining the mapping relationship between the source data and the target relational database table structure; The data mapping engine can load field mapping plug-ins, data type conversion plug-ins, and complex query condition setting plug-ins to ensure the accuracy and efficiency of data conversion.

7. A heterogeneous data synchronization method as claimed in claim 1, It is characterized in that The data synchronization task has an embedded data consistency guarantee mechanism, including transaction management, optimistic locking / pessimistic locking strategies, and conflict detection and automatic resolution logic, to ensure that the data in the target database remains consistent and complete in complex scenarios such as concurrent writing or network delays.

8. A heterogeneous data synchronization method as claimed in claim 1, It is characterized in that The data synchronization task improves the efficiency of data synchronization and reduces resource consumption through multi-threaded processing, batch processing, and data compression transmission; Through the real-time data capture mechanism, when data changes occur in the data source, the data synchronization task is immediately started.

9. A heterogeneous data synchronization method as claimed in claim 1, It is characterized in that The data synchronization task uses a monitoring and alarm module to monitor the synchronization task status and performance indicators in real time, and automatically notify the administrator when an abnormal situation occurs.

10. A heterogeneous data synchronization system, It is characterized in that include: Configuration management module, used to configure environment information; Data adapter, used to read data from a data source or a target database through a data adapter, and perform data analysis and conversion when reading data from a data source to obtain data that meets the data format requirements of the target database; Data mapping engine, used to maintain field mapping information and data type conversion information; The data synchronization module is used to write data that meets the data format requirements of the target database into the target database based on a distributed consistency algorithm.