An agent-based heterogeneous database data synchronization method and system

By using intelligent agent clusters to achieve dynamic metadata detection, adaptive mapping rule generation, and fault self-healing in heterogeneous database synchronization, the high maintenance cost and low success rate problems in heterogeneous database synchronization are solved, and the automation level and stability of the system are improved.

CN123178171APending Publication Date: 2026-11-27LONGYING ZHIDA (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611408340.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies for heterogeneous database synchronization suffer from high maintenance costs, low synchronization success rates, inability to adapt to dynamically changing business scenarios, lack of self-healing capabilities, and performance overload issues in high-concurrency scenarios.

Method used

It adopts intelligent agent cluster initialization, dynamically detects metadata through data detection intelligent agents, adaptively generates mapping rules, dynamically schedules synchronization strategies, and has the ability to automatically detect and self-heal faults, realizing multi-agent collaboration and automatically adjusting mapping rules and synchronization strategies.

Benefits of technology

It enables automatic rule adaptation without manual configuration when the database table structure changes, reducing manual maintenance costs by 90%, shortening fault recovery time to within 5 minutes, increasing the success rate of synchronization tasks to 99.5%, and reducing the time that business systems are affected by 80%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178171A_ABST
    Figure CN123178171A_ABST
Patent Text Reader

Abstract

The application discloses a heterogeneous database data synchronization method and system based on agents, and the data synchronization method comprises the following steps: step S1, agent cluster initialization; step S2, source end and target end metadata dynamic detection; step S3, self-adaptive mapping rule generation; step S4, dynamic synchronization strategy scheduling; and step S5, automatic fault monitoring and self-recovery. Through multi-agent cooperation, the mapping rule is automatically generated, the synchronization strategy is dynamically adjusted, manual configuration of a static template is not needed, when the database table structure is changed, rule adaptation can be automatically completed within 1 minute, and 90% of manual maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data synchronization, and in particular to a method and system for synchronizing heterogeneous databases based on intelligent agents. Background Technology

[0002] In enterprise digital transformation, the coexistence of heterogeneous databases (such as MySQL, MongoDB, Hive, DWS, etc.) has become the norm, and data synchronization is a core part of data integration and analysis. Traditional synchronization solutions mostly use rule-based hard-coded scripts or fixed ETL tools. When the database schema changes, the network fluctuates, or the data format differs, manual intervention is required to adjust the rules, resulting in high maintenance costs, low synchronization success rates, and an inability to adapt to dynamically changing business scenarios.

[0003] In recent years, some solutions have introduced automated synchronization mechanisms to achieve cross-database synchronization through predefined field mapping templates, but there are still obvious shortcomings: ① It only supports static mapping rules and cannot automatically recognize newly added fields and data type conversion logic. When the table structure changes, the template needs to be reconfigured. ② It lacks the ability to self-heal from abnormalities. When data conflicts, connection timeouts or other faults occur, synchronization is interrupted directly, requiring manual troubleshooting and recovery. ③ It cannot dynamically adjust the synchronization strategy according to the amount of data and the database load, which can easily cause performance overload of the source or target database in high-concurrency scenarios. Summary of the Invention

[0004] In view of the above problems, the present invention is proposed to provide a heterogeneous database data synchronization method and system based on intelligent agents to overcome or at least partially solve the above problems.

[0005] According to one aspect of the present invention, a heterogeneous database data synchronization method based on an intelligent agent is provided, the data synchronization method comprising: Step S1: Initialize the agent cluster; Step S2: Dynamic detection of metadata at the source and target ends; Step S3: Adaptive mapping rule generation; Step S4: Dynamic synchronization strategy scheduling; Step S5: Automatic fault detection and self-healing.

[0006] Optionally, step S1: agent cluster initialization specifically includes: Deploy a multi-agent cluster comprising a configuration management agent, a data detection agent, a mapping rule agent, a synchronization execution agent, and a fault monitoring agent. Each agent communicates through a message bus and shares the synchronization task context.

[0007] Optionally, step S2: dynamic detection of source and target metadata specifically includes: The data detection agent periodically collects schema information, data types, index structures, and current load status of the source and target databases, updates the metadata to the shared context, and automatically triggers the mapping rule update process when a table structure change is detected.

[0008] Optionally, step S3: adaptive mapping rule generation specifically includes: The mapping rule agent automatically generates field mapping, type conversion, and data cleaning rules based on shared context metadata and heterogeneous database field conversion rules. When encountering unknown data types, it calls a large language model to assist in generating conversion logic, which takes effect after being reviewed by the configuration management agent.

[0009] Optionally, step S4: dynamic synchronization strategy scheduling specifically includes: The synchronous execution agent automatically selects strategies such as full synchronization, incremental synchronization, and sharded parallel synchronization based on the current data volume and the load status of the source / target end. When the target library load is detected to exceed the threshold, the synchronization concurrency is automatically reduced or the task is paused.

[0010] Optionally, step S5: automatic fault detection and self-healing specifically includes: The fault monitoring agent collects error logs, connection status, and data consistency verification results in real time during the synchronization process. When faults such as connection timeout or field mapping failure occur, it automatically triggers retry, rule correction, and data compensation processes. If the fault cannot be automatically recovered, it generates alarm information and retains the current synchronization point, and resumes synchronization from the breakpoint after manual intervention.

[0011] This invention also provides an agent-based heterogeneous database data synchronization system, which applies the above-described agent-based heterogeneous database data synchronization method. The data synchronization system includes: The agent module is used for agent cluster initialization. The data source module is used for dynamic detection of metadata at both the source and target ends. External support module for adaptive mapping rule generation; The dynamic synchronization module is used for dynamic synchronization strategy scheduling. The fault monitoring module is used for automatic fault detection and self-healing.

[0012] This invention provides a heterogeneous database data synchronization method and system based on intelligent agents. The data synchronization method includes: step S1: intelligent agent cluster initialization; step S2: dynamic detection of source and target metadata; step S3: adaptive mapping rule generation; step S4: dynamic synchronization strategy scheduling; and step S5: automatic fault monitoring and self-healing. Through multi-agent collaboration, mapping rules are automatically generated and synchronization strategies are dynamically adjusted, eliminating the need for manual configuration of static templates. When the database table structure changes, rule adaptation can be automatically completed within one minute, reducing manual maintenance costs by 90%.

[0013] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 A flowchart of a heterogeneous database data synchronization method based on an intelligent agent provided in an embodiment of the present invention; Figure 2 A detailed flowchart of a heterogeneous database data synchronization method based on an intelligent agent, provided for an embodiment of the present invention; Figure 3 This invention provides a schematic diagram of the workflow of a heterogeneous database data synchronization system based on an intelligent agent, as shown in an embodiment of the present invention. Figure 4 This is a block diagram of a heterogeneous database data synchronization system based on an intelligent agent, provided as an embodiment of the present invention. Detailed Implementation

[0016] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0017] The terms "comprising" and "having," and any variations thereof, in the specification, embodiments, claims, and drawings of this invention are intended to cover non-exclusive inclusion, such as including a series of steps or units.

[0018] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0019] like Figure 1 As shown, a heterogeneous database data synchronization method based on intelligent agents is disclosed. The data synchronization method includes: step S1: intelligent agent cluster initialization; step S2: dynamic detection of source and target metadata; step S3: adaptive mapping rule generation; step S4: dynamic synchronization strategy scheduling; and step S5: automatic fault monitoring and self-healing.

[0020] like Figure 2 As shown, a heterogeneous database data synchronization method based on intelligent agents includes: S1. Agent Cluster Initialization: Deploy a multi-agent cluster including a configuration management agent, a data detection agent, a mapping rule agent, a synchronization execution agent, and a fault monitoring agent. Each agent communicates through a message bus and shares the synchronization task context.

[0021] S2. Dynamic detection of source and target metadata: The data detection agent periodically collects schema information, data types, index structures, and current load status of the source and target databases, updates the metadata to the shared context, and automatically triggers the mapping rule update process when a table structure change is detected.

[0022] S3. Adaptive Mapping Rule Generation: The mapping rule agent automatically generates field mapping, type conversion, and data cleaning rules based on the shared context's metadata and heterogeneous database field conversion rules. When encountering unknown data types, it calls a large language model to assist in generating conversion logic, which takes effect after being reviewed by the configuration management agent.

[0023] S4. Dynamic Synchronization Strategy Scheduling: The synchronization execution agent automatically selects strategies such as full synchronization, incremental synchronization, and sharded parallel synchronization based on the current data volume and the load status of the source / target end. When the target library load is detected to exceed the threshold, the synchronization concurrency is automatically reduced or the task is paused to avoid affecting the operation of the business system.

[0024] S5. Automatic Fault Detection and Self-Healing: The fault monitoring agent collects error logs, connection status, and data consistency verification results in real time during the synchronization process. When faults such as connection timeout or field mapping failure occur, it automatically triggers retry, rule correction, and data compensation processes. If the fault cannot be automatically recovered, an alarm message is generated and the current synchronization point is retained. Synchronization will continue from the breakpoint after manual intervention.

[0025] like Figure 4 The diagram shown is a module composition diagram. The implementation steps for using this product are as follows: (1) First, the rule definition, execution scheduling and state detection of the data synchronization task are completed in the intelligent agent module, which serves as the core scheduling unit of the entire system.

[0026] (2) The external support module calls the large language model to generate mapping rules, implements asynchronous message passing through the queue middleware, and relies on the historical synchronization log library for task tracing.

[0027] (3) Through the shared context and message bus mechanism provided by the communication layer module, decoupled communication and state synchronization between modules are realized.

[0028] (4) The data source module connects to the source database cluster and the target database cluster to complete the efficient reading and writing of heterogeneous data.

[0029] like Figure 3 The diagram shows the specific components and workflow of a heterogeneous database data synchronization system based on intelligent agents.

[0030] (1) Agent Cluster Layer The intelligent agent cluster layer consists of multiple dedicated intelligent agents and is the "brain" of the entire system. It is responsible for business logic orchestration, data flow control, anomaly monitoring and configuration management, and is the core scheduling layer connecting external support, data sources and message bus.

[0031] Includes modules and their relationships: Mapping rule agent: responsible for defining and maintaining the rule logic of data synchronization / transformation, connecting downwards to the "historical synchronization log library" in the "external support layer" (used to record the history of rule execution), and cooperating with other agents (such as synchronization execution and data probing) to ensure data mapping consistency.

[0032] Synchronous Execution Agent: The core execution engine, responsible for driving the synchronization process of data from source to target. It connects both the "source database cluster" and the "target database cluster," acting as the direct executor of data flow, and is guided by the "mapping rule agent."

[0033] Data detection agent: Responsible for metadata detection, structure comparison, and change detection of source / target databases, providing preliminary judgment basis for synchronization execution and ensuring the accuracy and integrity of data synchronization.

[0034] Configuration management agent: Manages various configuration parameters required for system operation (such as synchronization frequency, data source connection information, rule switches, etc.), and broadcasts configuration changes to other agents through the "shared context / message bus".

[0035] Fault monitoring agent: Real-time monitoring of the operating status of each agent, data synchronization success rate, anomaly logs, etc. When anomalies are detected, alarms or automatic recovery mechanisms are triggered through the "shared context / message bus" to ensure system stability.

[0036] (2) External support layer It provides auxiliary capabilities to intelligent agent clusters, including AI capability invocation, asynchronous task queues, and historical data backtracking, thereby improving the system's intelligence and observability.

[0037] Includes modules and their relationships: Large Language Model Module: Provides natural language understanding capabilities for the "mapping rule intelligent agent", supports the automatic generation or optimization of data mapping rules through text description (such as "mapping the mobile number field of the user table to the mobile field of the target database"), and realizes intelligent configuration of rules.

[0038] Queue middleware: Provides asynchronous task buffering capabilities for "synchronous execution agents", handles high concurrency or time-consuming operations (such as full synchronization of large tables), avoids blocking the main process, and improves system throughput and stability.

[0039] Historical synchronization log library: records the execution details of each synchronization task (time, status, data volume, error code, etc.), which can be used by the "mapping rule agent" to analyze historical behavior and optimize rules; the "fault monitoring agent" can also be used for root cause analysis.

[0040] (3) Data source layer—the carrier of data input and output It stores actual business data and serves as both the source and destination for data synchronization operations. It supports various heterogeneous databases, demonstrating system compatibility and scalability.

[0041] Includes modules and their relationships: Source database cluster types: MySQL / PostgreSQL / GasussDB, etc. The starting point of the data is read by the "synchronous execution agent", the "data detection agent" scans the structure, and the "mapping rule agent" defines the field mapping relationship.

[0042] Target database cluster: Hive / MySQL / GaussDB, etc. The data endpoint is written by the "synchronous execution agent", the "data detection agent" verifies the structure matching, and the "mapping rule agent" ensures semantic consistency.

[0043] (4) Message bus layer As a system-level event bus, it enables asynchronous communication, state broadcasting, and event-driven operations across modules and agents, serving as a key infrastructure for system decoupling and elastic scaling.

[0044] Includes modules and their relationships: Shared context / message bus: All agents interact with it: publish events (such as "configuration update", "synchronization failure"), subscribe to events (such as "listen for new configuration", "receive alarms"), and share runtime context (such as the current synchronization task ID, data partition range, etc.).

[0045] Beneficial effects: This invention achieves automatic generation of mapping rules and dynamic adjustment of synchronization strategies through multi-agent collaboration, eliminating the need for manual configuration of static templates. When the database table structure changes, the rules can be automatically adapted within 1 minute, reducing manual maintenance costs by 90%. It has the ability to automatically heal itself from faults, reducing the recovery time for common synchronization faults from an average of 2 hours to less than 5 minutes, and increasing the success rate of synchronization tasks to over 99.5%. The dynamic load awareness mechanism can prevent synchronous tasks from consuming too many database resources, reducing the duration of business system disruptions by 80%.

[0046] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A heterogeneous database data synchronization method based on intelligent agents, characterized in that, The data synchronization method includes: Step S1: Initialize the agent cluster; Step S2: Dynamic detection of metadata at the source and target ends; Step S3: Adaptive mapping rule generation; Step S4: Dynamic synchronization strategy scheduling; Step S5: Automatic fault detection and self-healing.

2. The heterogeneous database data synchronization method based on intelligent agents according to claim 1, characterized in that, Step S1: Agent cluster initialization specifically includes: Deploy a multi-agent cluster comprising a configuration management agent, a data detection agent, a mapping rule agent, a synchronization execution agent, and a fault monitoring agent. Each agent communicates through a message bus and shares the synchronization task context.

3. The heterogeneous database data synchronization method based on intelligent agents according to claim 1, characterized in that, Step S2: Dynamic detection of source and target metadata specifically includes: The data detection agent periodically collects schema information, data types, index structures, and current load status of the source and target databases, updates the metadata to the shared context, and automatically triggers the mapping rule update process when a table structure change is detected.

4. The heterogeneous database data synchronization method based on intelligent agents according to claim 1, characterized in that, Step S3: Adaptive mapping rule generation specifically includes: The mapping rule agent automatically generates field mapping, type conversion, and data cleaning rules based on shared context metadata and heterogeneous database field conversion rules. When encountering unknown data types, it calls a large language model to assist in generating conversion logic, which takes effect after being reviewed by the configuration management agent.

5. The heterogeneous database data synchronization method based on intelligent agents according to claim 1, characterized in that, Step S4: Dynamic synchronization strategy scheduling specifically includes: The synchronous execution agent automatically selects strategies such as full synchronization, incremental synchronization, and sharded parallel synchronization based on the current data volume and the load status of the source / target end. When the target library load is detected to exceed the threshold, the synchronization concurrency is automatically reduced or the task is paused.

6. The heterogeneous database data synchronization method based on intelligent agents according to claim 1, characterized in that, Step S5: Automatic fault detection and self-healing specifically includes: The fault monitoring agent collects error logs, connection status, and data consistency verification results in real time during the synchronization process. When faults such as connection timeout or field mapping failure occur, it automatically triggers retry, rule correction, and data compensation processes. If the fault cannot be automatically recovered, it generates alarm information and retains the current synchronization point, and resumes synchronization from the breakpoint after manual intervention.

7. A heterogeneous database data synchronization system based on intelligent agents, employing the heterogeneous database data synchronization method based on intelligent agents as described in any one of claims 1-6, characterized in that, The data synchronization system includes: The agent module is used for agent cluster initialization. The data source module is used for dynamic detection of metadata at both the source and target ends. External support module for adaptive mapping rule generation; The dynamic synchronization module is used for dynamic synchronization strategy scheduling. The fault monitoring module is used for automatic fault detection and self-healing.