Data sharing and deployment system and method of cross-hierarchical regional independent system, and medium
By employing a hybrid mode of centralized read/write and local disaster recovery backup, along with intelligent routing switching, the issues of data consistency and business continuity in the central-regional distributed system are resolved, enabling efficient data synchronization and system maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-03-20
AI Technical Summary
In existing technologies, the central-regional distributed system architecture makes it difficult to guarantee global data consistency, resulting in data synchronization conflicts and high system maintenance difficulty. Furthermore, the system will be paralyzed when the central node fails, affecting business continuity.
It adopts a hybrid mode of centralized read/write and local disaster recovery backup, and achieves data consistency and business continuity by using a service registry center for efficient and intelligent routing switching, combined with a data synchronization layer and network health detection components.
When the network connection is normal, it ensures data consistency and uniformity, and automatically switches to local backup when the network fails, thereby improving the system's business continuity, reducing resource consumption, and simplifying system maintenance.
Smart Images

Figure CN121705367A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of computer data interaction, specifically relating to data sharing and deployment systems, methods, and media for independent systems across different levels and regions. Background Technology
[0002] Many large organizations commonly employ a two-tiered distributed system architecture: a central node and regional nodes. In this architecture, the central node and each regional node typically possess completely independent technical components, including application services, databases, and even a registry. While this design ensures a high degree of autonomy and independence for each regional business, it struggles to guarantee consistency for fundamental data requiring global uniformity and strong consistency, such as organizational structures, user permissions, and public dictionaries. This leads to difficulties in managing global data consistency. If data synchronization between the central node and regional nodes is required, numerous data synchronization interfaces need to be developed in the node regions. Under network fluctuations or high-concurrency scenarios, this can result in numerous data synchronization structure conflicts or data inconsistencies. The extensive data interfaces and interactions between nodes also significantly increase the maintenance complexity of the system architecture. Furthermore, all regional nodes depend on the central node, placing immense pressure on its network and processing capabilities. If a regional node loses connection with the central node or the central node crashes, related system functions will be completely paralyzed, severely impacting the continuity of business operations.
[0003] Therefore, in view of the above-mentioned problems existing in the prior art, the present invention discloses a data sharing and deployment system, method and medium for cross-level regional independent systems. Summary of the Invention
[0004] This invention discloses a data sharing and deployment system, method, and medium for cross-level regional independent systems. It adopts a hybrid mode of centralized reading and writing and local disaster recovery backup, and performs efficient and intelligent routing switching through a service registration center. This ensures both data consistency and business continuity of the regional system.
[0005] This invention is achieved through the following technical solution: A data sharing and deployment system for cross-level regional independent systems includes a central node and several regional nodes. The regional nodes deploy a business application layer and a local database, while the central node deploys a unified database. The business application layer is used to deploy at least two functionally identical basic service instances on the regional nodes. The basic service instances are configured to point to the local database and the unified database. A data synchronization layer is established between the unified database and the local database. The regional nodes are equipped with a network health detection component for detecting the network connection status between the regional nodes and the central node.
[0006] To better realize the present invention, a registration center layer is further included, which is used to register basic service instances and switch basic service instances based on the network connection between regional nodes and the central node.
[0007] To better realize the present invention, both the central node and the regional nodes are further equipped with a business service layer and a basic service layer. The business service layer is used to receive and exchange business service data between the central node and the regional nodes, and the basic service layer is used to receive and exchange basic service data between the central node and the regional nodes.
[0008] To better realize the present invention, a data tracing layer is further included, which is connected to the central node and the regional nodes, and is used to compare the data consistency between the central node and the regional nodes.
[0009] The data sharing and deployment method for independent systems across different levels and regions includes the following steps: Step 1: Deploy a central service instance on the central node and a local service instance on the regional node through the business application layer. The central service instance and the local service instance have the same function. Step 2: Establish a data synchronization channel between the unified database and the local database; Step 3: Configure the central service instance to be online so that it can be discovered by the business application layer; configure the local service instance to be offline so that it cannot be discovered by the business application layer. Step 4: Detect the network connection status between the central node and the regional nodes using the network health detection component. If the network connection status is normal, proceed to step 5; if the network connection status is abnormal, proceed to step 6. Step 5: The business application layer discovers and executes the central service instance. All data requests and data read / write processes are executed through a unified database. Step 6: The network health detection component calls the registration API of the central service instance and the local service instance, configures the central service instance to be offline and the local service instance to be online. The business application layer discovers and executes the local service instance, and all data requests and data read and write processes are executed through the local database.
[0010] To better implement this invention, further, during the execution of step 6, the network connection status between the central node and the regional nodes is detected in real time through the network health detection component. If the network connection status remains abnormal, step 6 continues to be executed; if the network connection status returns to normal, the central service instance is configured to be online and the local service instance is configured to be offline, and step 5 is executed.
[0011] To better implement this invention, furthermore, when the network connection status is abnormal, the data change records of the central node are collected through the data synchronization layer; after the network connection status is restored to normal, the data consistency between the central node and the regional nodes is detected through the data balancing layer. If the data of the central node and the regional nodes are inconsistent, the data balancing layer calls the data change records to update the data of the regional nodes to be consistent with the data of the central node.
[0012] To better realize the present invention, furthermore, when the network connection is normal, the data synchronization layer will synchronize any data changes in the unified database to the local database in real time.
[0013] A data sharing and deployment medium for cross-level regional independent systems, wherein the medium stores a computer program, and when the computer program is executed, a data sharing and deployment method for cross-level regional independent systems is implemented.
[0014] Compared with the prior art, the present invention has the following advantages and beneficial effects: (1) Under normal network connection status between the central node and regional nodes, all read and write operations are directly connected to the unified database of the central node, fundamentally ensuring the uniformity and authority of the data. Combined with the data synchronization layer for real-time synchronization of data between the central node and regional nodes, the real-time consistency between backup data and master data is ensured; (2) This invention, through the design of dual basic service instances and dynamic routing, realizes the real-time switching between the central service instance and the local service instance when a network failure occurs between the central node and the regional node, and performs degradation processing based on the data in the local database of the regional node, which greatly improves the business continuity of the regional system. (3) The present invention uses CDC technology for data-level synchronization. Compared with the traditional interface synchronization method, it has the advantages of higher real-time performance, stronger reliability and lower resource consumption. It also realizes the physical and logical decoupling of the data source and the data consumer, simplifying the system architecture. (4) The entire process of fault detection, service switching, and recovery is automatically completed by the network health detection component without manual intervention, thus achieving efficient system operation and maintenance. Attached Figure Description
[0015] Figure 1 This is a schematic flowchart of the method of the present invention; Figure 2 This is a schematic diagram of instance back-cutting; Figure 3 This is a schematic diagram of the system architecture of the present invention. Detailed Implementation
[0016] Example 1: This embodiment discloses a data sharing and deployment system for independent systems across different hierarchical regions, such as... Figure 3 As shown, it includes a central node and several regional nodes. The regional nodes are equipped with a business application layer and a local database, while the central node is equipped with a unified database. The business application layer is used to deploy at least two identical basic service instances on the regional nodes. The basic service instances are configured to point to the local database and the unified database. A data synchronization layer is established between the unified database and the local database. A network health detection component is set on one side of the regional nodes to detect the network connection between the regional nodes and the central node.
[0017] Furthermore, the system also includes a registration center layer, which is used to register basic service instances and switch basic service instances based on the network connection between regional nodes and the central node.
[0018] Furthermore, both the central node and the regional nodes are equipped with a business service layer and a basic service layer. The business service layer is used to receive and exchange business service data between the central node and the regional nodes, and the basic service layer is used to receive and exchange basic service data between the central node and the regional nodes.
[0019] Furthermore, the system also includes a data balancing layer, which is connected to the central node and regional nodes, and is used to compare the data consistency between the central node and the regional nodes.
[0020] Data sharing and deployment methods for independent systems across different levels and regions, such as Figure 1 As shown, it includes the following steps: Step 1: Deploy a central service instance on the central node and a local service instance on the regional node through the business application layer. The central service instance and the local service instance have the same function. Step 2: Establish a data synchronization channel between the unified database and the local database; Step 3: Configure the central service instance to be online so that it can be discovered by the business application layer; configure the local service instance to be offline so that it cannot be discovered by the business application layer. Step 4: Detect the network connection status between the central node and the regional nodes using the network health detection component. If the network connection status is normal, proceed to step 5; if the network connection status is abnormal, proceed to step 6. Step 5: The business application layer discovers and executes the central service instance. All data requests and data read / write processes are executed through a unified database. Step 6: The network health detection component calls the registration API of the central service instance and the local service instance, configures the central service instance to be offline and the local service instance to be online. The business application layer discovers and executes the local service instance, and all data requests and data read and write processes are executed through the local database.
[0021] Furthermore, such as Figure 2 As shown, during the execution of step 6, the network connection status between the central node and the regional nodes is detected in real time through the network health detection component. If the network connection status remains abnormal, step 6 continues to be executed; if the network connection status returns to normal, the central service instance is configured to be online and the local service instance is configured to be offline, and step 5 is executed.
[0022] Furthermore, when the network connection is abnormal, the data change records of the central node are collected through the data synchronization layer; after the network connection is restored to normal, the data alignment layer detects the data consistency between the central node and the regional nodes. If the data of the central node and the regional nodes are inconsistent, the data alignment layer calls the data change records to update the data of the regional nodes to be consistent with the data of the central node.
[0023] Furthermore, when the network connection is normal, the data synchronization layer will synchronize any data changes in the unified database to the local database in real time.
[0024] A data sharing and deployment medium for cross-level regional independent systems, wherein the medium stores a computer program, and when the computer program is executed, a data sharing and deployment method for cross-level regional independent systems is implemented.
[0025] Example 2: This embodiment discloses a data sharing and deployment method for cross-level regional independent systems, which is an improvement on Embodiment 1, specifically as follows: The business application layer deploys dual service instances, meaning two identical basic service instances are deployed on the central node and each regional node. These basic service instances include a central service instance and a local service instance. The central service instance's database connection configuration points to a unified database, while the local service instance's database connection configuration points to a local database.
[0026] Using tools based on CDC technology, such as Flink CDC, a data synchronization layer can be built from a unified database to various local databases. This data synchronization layer constructs a real-time synchronized data stream. The working principle is as follows: Flink jobs use CDC technology to capture the binary logs of the unified database in real time, parsing out all data addition, deletion, and modification operations. Flink converts these operations into data streams and applies them to the local databases of all region nodes efficiently and with low latency by synchronizing the data streams. This makes each region node's local database a real-time updated, logically read-only copy of the unified database.
[0027] Configure the Nacos registry center in the registry center layer, and initialize the basic service instances in the Nacos registry center. Specifically, set the "Central Service Instance" to the "UP" state so that it can be discovered by the business application layer. Set the "Local Service Instance" to the "DOWN" state so that it cannot be discovered and invoked by the business application layer under normal circumstances.
[0028] The network health detection component checks the network connection status between the central node and regional nodes. If the network connection between the central node and regional nodes is unobstructed and in a normal state, then the system enters normal operation mode. The Nacos registry can only discover "central service instances" that are "online". Therefore, all requests to basic data, such as permission verification and querying the organizational tree, are automatically routed to the central service instance. All data read and write requests access the unified database directly through the "central service instance," ensuring that all read operations retrieve the latest and most accurate data; all write operations are also processed through the unified database, eliminating data conflicts at the source and guaranteeing strong data consistency. During normal operation, the CD-Flink data synchronization layer continuously works, synchronizing any data changes in the unified database to the local database in real time for data updates and backups.
[0029] If the network connection between the central node and regional nodes is interrupted or times out, and the connection is in an abnormal state, then the system will enter the disaster recovery mode. The network health detection component immediately invokes the Nacos registry's API to automatically switch service states. The "central service instance," unavailable due to the inability to connect to the data source, is set to "down," while the "local service instance," connected to the local backup database, is set to "up." Business application layers within the region can quickly detect the change in available basic service instances to "local service instances" through the Nacos registry's service heartbeat and discovery mechanisms. All subsequent new requests will be automatically routed to the local service instance, providing services based on the last synchronized backup data from the local database. Although new data added to the central node during the network outage cannot be obtained, core basic functions remain available, ensuring the continuity of basic business operations.
[0030] Once the network connection between the regional node and the central node is restored to normal, execute the recovery mode: The network health detection component triggers the Nacos registry's API call again, performs a service status rollback, sets the "Central Service Instance" back to "Up" and sets the "Local Service Instance" back to "Down".
[0031] At this point, business traffic automatically and seamlessly switches back to the "central service instance," restoring access to the latest data in the unified database and returning to normal operation. During network outages, the CD-Flink data synchronization layer accumulates data change records in the unified database. Once network connectivity is restored, the CD-Flink data synchronization layer automatically and quickly replays these accumulated data change records. The data balancing layer then uses these change records to bring the data state of the local database back up to complete consistency with the unified database, preparing data for the next potential failure.
[0032] The rest of this embodiment is the same as that of Embodiment 1, so it will not be described again.
[0033] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.
Claims
1. A data sharing and deployment system for cross-level regional independent systems, characterized in that, It includes a central node and several regional nodes. The regional nodes are equipped with a business application layer and a local database, while the central node is equipped with a unified database. The business application layer is used to deploy at least two identical basic service instances on the regional nodes. The basic service instances are configured to point to the local database and the unified database. A data synchronization layer is established between the unified database and the local database. A network health detection component is set on one side of the regional nodes to detect the network connection between the regional nodes and the central node.
2. The data sharing and deployment system for a cross-level regional independent system according to claim 1, characterized in that, It also includes a registration center layer, which is used to register basic service instances and switch basic service instances based on the network connection between regional nodes and the central node.
3. The data sharing and deployment system for a cross-level regional independent system according to claim 2, characterized in that, Both the central node and the regional nodes are equipped with a business service layer and a basic service layer. The business service layer is used to receive and exchange business service data between the central node and the regional nodes, and the basic service layer is used to receive and exchange basic service data between the central node and the regional nodes.
4. The data sharing and deployment system for a cross-level regional independent system according to claim 3, characterized in that, It also includes a data balancing layer, which is connected to the central node and regional nodes, and is used to compare the data consistency between the central node and the regional nodes.
5. A method for data sharing and deployment in a cross-level regional independent system, implemented based on the system described in any one of claims 1-4, characterized in that, Includes the following steps: Step 1: Deploy a central service instance on the central node and a local service instance on the regional node through the business application layer. The central service instance and the local service instance have the same function. Step 2: Establish a data synchronization channel between the unified database and the local database; Step 3: Configure the central service instance to be online so that it can be discovered by the business application layer; configure the local service instance to be offline so that it cannot be discovered by the business application layer. Step 4: Detect the network connection status between the central node and the regional nodes using the network health detection component. If the network connection status is normal, proceed to step 5; if the network connection status is abnormal, proceed to step 6. Step 5: The business application layer discovers and executes the central service instance. All data requests and data read / write processes are executed through a unified database. Step 6: The network health detection component calls the registration API of the central service instance and the local service instance, configures the central service instance to be offline and the local service instance to be online. The business application layer discovers and executes the local service instance, and all data requests and data read and write processes are executed through the local database.
6. The data sharing and deployment method for a cross-level regional independent system according to claim 5, characterized in that, During step 6, the network health detection component monitors the network connection status between the central node and the regional nodes in real time. If the network connection status remains abnormal, step 6 continues. If the network connection status returns to normal, the central service instance is configured to be online and the local service instance is configured to be offline, and step 5 is executed.
7. The data sharing and deployment method for a cross-level regional independent system according to claim 6, characterized in that, When the network connection is abnormal, the data change records of the central node are collected through the data synchronization layer. After the network connection is restored to normal, the data matching layer checks the data consistency between the central node and the regional nodes. If the data of the central node and the regional nodes are inconsistent, the data matching layer calls the data change records to update the data of the regional nodes to be consistent with the data of the central node.
8. A data sharing and deployment method for a cross-level regional independent system according to claim 6, characterized in that, When the network connection is normal, the data synchronization layer will synchronize any data changes in the unified database to the local database in real time.
9. A data sharing and deployment medium for a cross-level regional independent system, characterized in that, The medium stores a computer program, which, when executed, implements the method described in any one of claims 5-8.