Multi-node cmdb block refinement data synchronization method and system
By introducing a synchronization channel mechanism and an incremental update model, the problems of complex API calls and complex network configurations in multi-node CMDB data synchronization are solved, achieving efficient and stable data synchronization, simplifying the operation process and improving the overall stability of the system.
Patent Information
- Application Number
- CN202510078911.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-01-17
AI Technical Summary
Existing multi-node CMDB data synchronization methods suffer from problems such as high API call complexity, complex cross-domain network configuration, low data synchronization efficiency, and susceptibility to network failures.
A synchronization channel mechanism is introduced, employing incremental updates and an event-driven model. By configuring synchronization channels and scheduled tasks, combined with network reachability detection and correction judgment, fine-grained data synchronization is achieved.
It improves data consistency and system stability, simplifies operation processes, reduces the difficulty for users to understand and use complex technical tools, saves bandwidth and computing resources, and improves synchronization efficiency.
Smart Images

Figure CN120030086B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data synchronization, in particular to a multi-node CMDB block refinement data synchronization method and system. BACKGROUND
[0002] The configuration management database (CMDB) is a logical database that contains information about the entire life cycle of configuration items and the relationships between them, including physical relationships, real-time communication relationships, non-real-time communication relationships, and dependency relationships.
[0003] Multi-node CMDB refers to an architectural design that distributes CMDB data storage and processing across multiple physical or logical nodes. This design can improve system availability, scalability, and performance. Each node can be responsible for a specific data shard or region, enabling more refined data management and faster data access speeds.
[0004] However, maintaining data consistency across multiple nodes is a significant challenge. Since different nodes may simultaneously read and write to the same data, an efficient data synchronization mechanism is required to ensure that all nodes have the latest and consistent state of the data. Data synchronization mechanisms mainly include full synchronization and incremental synchronization:
[0005] 1. Full synchronization: This is the simplest and most direct method, which periodically replicates all data from the master node to other nodes. Although this method is easy to implement, it is inefficient, especially when the data volume is large, as it consumes a large amount of bandwidth and may result in a long period of data unavailability.
[0006] 2. Incremental synchronization: Compared to full synchronization, incremental synchronization only transmits data that has changed since the last synchronization. This greatly reduces the amount of data transmitted, improving synchronization efficiency. However, it requires a reliable change detection mechanism, and in some cases (such as partial failure retries), additional logic may be required to ensure eventual consistency.
[0007] Current existing data synchronization methods mainly include the following steps and processes:
[0008] 1. A CMDB (such as platform A) exposes a specific port (such as port 60010) and defines the corresponding API path, allowing other systems to access the services provided by platform A;
[0009] 2. Another CMDB (such as platform B) sets up synchronization configurations, configuring how to connect to platform A, and saves these configuration information in its own database;
[0010] 3. B platform pulls data from A platform full synchronization by initiating HTTP requests or using other protocols, and stores data into local database;
[0011] 4. B platform performs incremental synchronization regularly, only pulling data changed since last synchronization, and incremental synchronization timing pulls to database.
[0012] However, the existing data synchronization method, especially the process of exposing a specific port (such as port 60010) of a CMDB (such as A platform) and allowing another CMDB (such as B platform) to obtain data through the specific port, indeed has some obvious limitations and challenges. The existing data synchronization method has the following disadvantages:
[0013] 1. High complexity of API calls:
[0014] Users must have a deep understanding of the specific details of API interfaces, including parameter configuration, error handling mechanisms, etc. This increases development and maintenance costs, and it can be very difficult for non-technical personnel to understand and correctly use these APIs.
[0015] 2. Complex cross-domain network configuration:
[0016] When cross-domain operations are involved, network configuration becomes exceptionally complex. Not only does it need to ensure network connectivity between the two platforms, but it also needs to consider firewall rules, security policies, and other factors. In addition, traffic control in different network environments is a major challenge, which can lead to performance bottlenecks or security risks. SUMMARY
[0017] In view of this, the purpose of the present application is to provide a multi-node CMDB block fine-grained data synchronization method and system, which introduces a synchronization channel mechanism, enhances data consistency, ensures that CMDB data between different regions always remains up-to-date and consistent, reduces management risks caused by data asynchronization, simplifies the operation process, reduces the difficulty of users to understand and use complex technical tools, improves work efficiency, improves system reliability, increases network accessibility and synchronization correction judgment functions, effectively prevents data synchronization failure problems caused by network failures or configuration errors, and enhances the overall stability of the system, optimizes resource utilization, uses an event-driven model and incremental update strategy, and only transmits necessary data changes, thereby saving bandwidth and computing resources and improving synchronization efficiency.
[0018] The present application provides a multi-node CMDB block fine-grained data synchronization method, comprising the following steps:
[0019] S1, a CMDB configuration synchronization channel is set, and a synchronization timing task is set; the configuration synchronization channel comprises: a specified source area T1 and a target area T2, a new synchronization channel is configured in the CMDB of the T2 area, a proper synchronization type is selected, and the synchronization channel is started to ensure that the synchronization channel can normally listen to data changes from the T1 area;
[0020] The setting of the synchronization timing task comprises: according to business requirements, one or more timing tasks are set in the T2 area, the timing task will trigger a data synchronization process associated with the configured synchronization channel at regular intervals; the time interval and execution strategy parameters of the timing task are configured to meet the specific synchronization frequency requirements;
[0021] S2, before each synchronization starts, it is judged whether the service port of the T1 area is connected, it is checked whether the service port of the T1 area can be accessed, and the network connection is ensured to be stable; if the detection fails, an error log is recorded and an alarm is sent to the administrator; if the detection succeeds, the step S3 is entered;
[0022] S3, the latest synchronization channel configuration information is obtained from the T1 area through API calling, which is used to guide subsequent data conversion and processing work;
[0023] S4, according to the synchronization channel configuration information obtained from the T1 area, the synchronization channel is formally established in the T2 area, and the synchronization channel is started to receive data; once the synchronization channel is started, it enters a preparation state and waits for the timing task to trigger the actual data synchronization operation;
[0024] S5, the timing task set in the step S1 is associated with the created synchronization channel in the step S4, and the timing synchronization is started;
[0025] Specifically, the previously set timing task needs to be associated with the created synchronization channel to start the timing synchronization;
[0026] The timing task can be manually triggered to operate, or can be automatically started according to a preset time table, without manual intervention;
[0027] S6, each time the timing task is triggered, a series of correction judgments are first performed, if all the correction items are verified, the synchronization process is formally started; if any correction item fails to pass the verification, the synchronization attempt is stopped, and detailed reason explanation is recorded for subsequent analysis.
[0028] The present application sets a synchronization correction judgment function, when the user modifies the model field, after the modification is completed, the correction can be performed first, and then the data is manually pulled, and the timing task is set.
[0029] Further, the synchronization type in the selecting appropriate synchronization type of the S1 step includes: full synchronization, incremental synchronization, event-driven;
[0030] The full synchronization is to synchronize all model instances of the T1 region to corresponding model instances of the T2 region.
[0031] The incremental synchronization is to synchronize model instances of the T1 region to corresponding model instances of the T2 region according to time period changes.
[0032] The event-driven is to synchronize mirror instances of models of the T1 region and corresponding models of the T2 region, and changes of the model instances of the T1 region or the model instances of the T2 region will cause changes of the mirror instances, and the changes are synchronized to the other end region to keep consistent.
[0033] The application introduces an incremental update mechanism to only transmit changed data parts, and combines an event-driven model to ensure quick response to configuration changes, so that bandwidth occupation and synchronization time are reduced, near real-time data synchronization is realized, and the method is more efficient than the full synchronization method.
[0034] Further, the method of the S5 step of associating the created synchronization channel with the set timing task of the S1 step includes:
[0035] The id number of the created synchronization channel and the configuration information of the synchronization channel are associated with the set timing task, so that each timing task can accurately act on the correct synchronization channel.
[0036] Further, the synchronization channel configuration information in the S3 step of obtaining the latest synchronization channel configuration information from the T1 region includes: data mapping rules and filtering conditions.
[0037] Further, the execution of a series of correction judgments in the S6 step includes: verifying the validity of source data, and the method of verifying the validity of the source data includes: obtaining corresponding data by calling an API path corresponding to a service port of the T1 region at each synchronization, analyzing the data, and judging whether the data is valid.
[0038] The application further provides a multi-node CMDB block fine data synchronization system for realizing the multi-node CMDB block fine data synchronization method.
[0039] Configuration synchronization channel and timing task module: used for CMDB configuration synchronization channel, setting synchronization timing task; the configuration synchronization channel comprises: specifying source area T1 and target area T2, configuring a new synchronization channel in the CMDB of T2 area, and selecting a proper synchronization type, starting the synchronization channel, so that the synchronization channel can normally listen to data changes from T1 area; the setting synchronization timing task comprises: according to business requirements, setting one or more timing tasks in T2 area, the timing task will trigger the data synchronization process associated with the configured synchronization channel periodically; the time interval and execution strategy parameters of the timing task are configured to meet the specific synchronization frequency requirements;
[0040] Network reachability detection module: used for judging whether the service port of T1 area is connected before each synchronization starts, checking whether the service port of T1 area can be accessed, and ensuring that the network connection is stable; if the detection fails, an error log is recorded and an alarm is sent to the administrator; if the detection succeeds, the S3 step is entered;
[0041] Synchronization configuration pulling module: used for acquiring the latest synchronization channel configuration information from T1 area through API calling, for guiding subsequent data conversion and processing work;
[0042] Synchronization channel creation module: used for formally establishing a synchronization channel in T2 area according to the synchronization channel configuration information acquired from T1 area, and starting the synchronization channel to receive data; once the synchronization channel is started, it enters a preparation state and waits for the timing task to trigger the actual data synchronization operation;
[0043] Configuration associated timing task module: used for associating the timing task set in S1 step with the created synchronization channel in S4 step in T2 area, and starting the timing synchronization;
[0044] Timing task correction judgment module: used for executing a series of correction judgments when the timing task is triggered each time, if all correction items are verified, the synchronization process is formally started; if any correction item fails to pass the verification, the synchronization attempt is stopped, and detailed reason explanation is recorded for subsequent analysis.
[0045] The present application introduces a synchronization channel mechanism, which can bring the following several significant beneficial effects in practical application:
[0046] 1. Enhance data consistency:
[0047] Through the intelligent mapping engine and the incremental update mechanism, the CMDB data between different areas is always kept up-to-date and consistent, and the management risk caused by asynchronous data is reduced.
[0048] 2. Simplify operation process:
[0049] With the help of the visual workflow editor and the advanced API package, the difficulty for users to understand and use the complex technical tools is greatly reduced, and the work efficiency is improved.
[0050] 3. Improve system reliability:
[0051] The network reachability and pre-correction judgment functions are added, which effectively prevent the data synchronization failure problem caused by network failure or configuration error, and enhance the overall stability of the system.
[0052] 4. Optimize resource utilization:
[0053] The event-driven model and the incremental update strategy are adopted, only the necessary data change part is transmitted, the bandwidth and the computing resource are greatly saved, and the synchronization efficiency is improved.
[0054] 5. Support flexible expansion:
[0055] The flexible mapping rule and the synchronization strategy supporting dynamic adjustment are designed, the changes of the business demand and the technical environment can be quickly adapted, and a good foundation is provided for the future system upgrade.
[0056] The application also provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the steps of the multi-node CMDB block refinement data synchronization method.
[0057] The application also provides a computer device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the program to realize the steps of the multi-node CMDB block refinement data synchronization method.
[0058] Compared with the prior art, the application has the beneficial effects that:
[0059] The multi-node CMDB block refinement data synchronization method and system provided by the application introduces a synchronization channel mechanism, enhances data consistency, ensures that CMDB data in different regions always remains up-to-date and consistent, reduces management risks caused by asynchronous data, simplifies the operation process, greatly reduces the difficulty of users to understand and use complex technical tools, improves work efficiency, improves system reliability, increases network reachability and synchronization correction judgment functions, effectively prevents data synchronization failure problems caused by network failures or configuration errors, enhances the overall stability of the system, optimizes resource utilization, uses an event-driven model and an incremental update strategy to only transmit necessary data changes, greatly saves bandwidth and computing resources, and effectively improves synchronization efficiency, and supports flexible expansion, can quickly adapt to changes in business requirements and technical environment, and provides a good foundation for future system upgrades. BRIEF DESCRIPTION OF DRAWINGS
[0060] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included only to illustrate preferred embodiments and are not to be considered as limiting of the present application.
[0061] In the drawings:
[0062] Figure 1 A flowchart of the multi-node CMDB block refinement data synchronization method of the application;
[0063] Figure 2 A schematic diagram of the computer device of the embodiment of the application. DETAILED DESCRIPTION
[0064] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same numbers are used to indicate the same components in different drawings. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of devices and products consistent with some aspects of the present disclosure, as detailed in the appended claims.
[0065] The terms used in the present disclosure are merely for the purpose of describing specific embodiments, and are not intended to limit the present disclosure. The singular forms "a", "an" and "the" used in the present disclosure and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein means and includes any or all possible combinations of one or more associated listed items.
[0066] It should be understood that, although the terms first, second, third, etc. can be employed in this disclosure to describe various information, the information should not be limited to these terms. These terms are only used to differentiate one piece of information from another piece of information of the same type. For example, without departing from the scope of the disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon" or "in response to determining".
[0067] The embodiments of the present application are further described below.
[0068] The embodiments of the present application provide a multi-node CMDB block refinement data synchronization method, as shown in the accompanying drawings, comprising the following steps: Figure 1
[0069] S1, CMDB configuration synchronization channel, set synchronization timing task; the configuration synchronization channel includes: specifying source area T1 and target area T2, configuring a new synchronization channel in the CMDB of T2 area, selecting appropriate synchronization type, starting the synchronization channel, and ensuring that the synchronization channel can normally listen to the data changes from T1 area;
[0070] The setting of the synchronization timing task includes: according to the business requirement, setting one or more timing tasks in the T2 area, the timing task will trigger the data synchronization process associated with the configured synchronization channel periodically; configure the time interval and execution strategy parameters of the timing task to meet the specific synchronization frequency requirement;
[0071] The synchronization type in the step of selecting appropriate synchronization type includes: full synchronization, incremental synchronization, event-driven;
[0072] Among them, the full synchronization is to synchronize all model instances in T1 area to the corresponding model instances in T2 area;
[0073] The incremental synchronization is to synchronize the model instances in T1 area to the corresponding model instances in T2 area according to the time period change;
[0074] The event-driven is to synchronize the mirror instance of the model in T1 area and the corresponding model in T2 area. The change of the model instance in T1 area or the change of the model instance in T2 area will cause the change of the mirror instance, and the synchronization to the other end area keeps consistent.
[0075] The embodiment introduces the incremental update mechanism, only the changed data part is transmitted; at the same time, combined with the event-driven model, the rapid response to configuration change is ensured, which can not only reduce the bandwidth occupation and synchronization time, but also realize the near real-time data synchronization, and is more efficient than the full synchronization method.
[0076] S2, before starting each synchronization, judging whether the service port of T1 area is connected, checking whether the service port of T1 area can be accessed, ensuring the stability of network connection; if the detection fails, recording error log and sending alarm to the administrator; if the detection succeeds, entering S3 step;
[0077] S3, acquiring the latest synchronization channel configuration information from T1 area through API calling, for guiding subsequent data conversion and processing work;
[0078] The synchronization channel configuration information in the latest synchronization channel configuration information acquired from T1 area includes: data mapping rule, filtering condition.
[0079] S4, according to the synchronization channel configuration information acquired from T1 area, formally establishing a synchronization channel in T2 area, and opening the synchronization channel to receive data; once the synchronization channel is opened, it enters the preparation state, waiting for the timing task to trigger the actual data synchronization operation;
[0080] S5, associating the timing task set in S1 step with the created synchronization channel in S4 step in T2 area, and opening timing synchronization;
[0081] Specifically, the previously set timing task needs to be associated with the created synchronization channel to start timing synchronization;
[0082] The timing task can be manually triggered for operation, or automatically started according to the preset time table, without manual intervention;
[0083] The method of associating the timing task set in S1 step with the created synchronization channel in S4 step includes:
[0084] The id number of the created synchronization channel and the configuration information of the synchronization channel are associated with the set timing task, so that each timing task can accurately act on the correct synchronization channel.
[0085] S6, when the timing task is triggered each time, a series of correction judgments are first executed, if all correction items are verified, the synchronization process is formally started; if any correction item is not verified, this synchronization attempt is stopped, and detailed reason explanation is recorded for subsequent analysis.
[0086] The series of correction judgments include: verifying the validity of source data, the method of verifying the validity of source data includes: acquiring corresponding data by calling the API path corresponding to the service port of T1 area at each synchronization, analyzing the data, and judging whether the data is valid.
[0087] The embodiment of the present application also provides a multi-node CMDB block refinement data synchronization system for implementing the multi-node CMDB block refinement data synchronization method as described above, comprising:
[0088] A configuration synchronization channel and timing task module is configured to synchronize a CMDB configuration channel and set a synchronization timing task; the configuration synchronization channel comprises: a specified source area T1 and a target area T2, a new synchronization channel is configured in the CMDB of the T2 area, an appropriate synchronization type is selected, and the synchronization channel is started to ensure that the synchronization channel can normally listen to data changes from the T1 area; the setting of the synchronization timing task comprises: according to business requirements, one or more timing tasks are set in the T2 area, the timing task will trigger a data synchronization process associated with the configured synchronization channel at regular intervals; the time interval and execution strategy parameters of the timing task are configured to meet the specific synchronization frequency requirements;
[0089] A network reachability detection module is configured to judge whether the service port of the T1 area is connected before each synchronization starts, check whether the service port of the T1 area can be accessed, and ensure that the network connection is stable; if the detection fails, an error log is recorded and an alarm is sent to the administrator; if the detection succeeds, the S3 step is entered;
[0090] A synchronization configuration pulling module is configured to obtain the latest synchronization channel configuration information from the T1 area through API calling, and is used to guide subsequent data conversion and processing work;
[0091] A synchronization channel creating module is configured to establish a synchronization channel in the T2 area according to the synchronization channel configuration information obtained from the T1 area, and start the synchronization channel to receive data; once the synchronization channel is started, it enters a preparation state and waits for the timing task to trigger the actual data synchronization operation;
[0092] A configuration associated timing task module is configured to associate the timing task set in the S1 step with the created synchronization channel in the S4 step in the T2 area, and start the timing synchronization;
[0093] A timing task correction judgment module is configured to execute a series of correction judgments when the timing task is triggered each time, and if all correction items are verified, the synchronization process is formally started; if any correction item fails to pass the verification, the synchronization attempt is stopped, and detailed reason explanation is recorded for subsequent analysis.
[0094] The multi-node CMDB block refinement data synchronization method and system of the embodiment enhances data consistency by introducing a synchronization channel mechanism, ensures that CMDB data in different regions always remains up-to-date and consistent, reduces management risks caused by asynchronous data, simplifies the operation process, greatly reduces the difficulty of users to understand and use complex technical tools, improves work efficiency, improves system reliability, increases network reachability and synchronization correction judgment functions, effectively prevents data synchronization failure problems caused by network failures or configuration errors, and enhances the overall stability of the system, optimizes resource utilization, uses an event-driven model and incremental update strategy to only transmit necessary data changes, greatly saves bandwidth and computing resources, and effectively improves synchronization efficiency.
[0095] The embodiment of the present application also provides a computer device, Figure 2 is a structural schematic diagram of a computer device provided by the embodiment of the present application; as shown in the figure Figure 2 The computer device comprises an input system 23, an output system 24, a memory 22 and a processor 21; the memory 22 is used for storing one or more programs; when the one or more programs are executed by the one or more processors 21, the one or more processors 21 implement the multi-node CMDB block refinement data synchronization method provided by the above embodiment; wherein the input system 23, the output system 24, the memory 22 and the processor 21 can be connected through a bus or other means, Figure 2 For example, the bus connection is taken as an example.
[0096] The memory 22 is a kind of readable and writable storage medium of computing device, which can be used to store software programs, computer executable programs, such as the program instructions of the multi-node CMDB block refinement data synchronization method described in the embodiment of the present application; the memory 22 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application program required by a function; the data storage area can store data created according to the use of the device and the like; in addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage device; in some examples, the memory 22 can further include a memory remotely arranged with respect to the processor 21, and these remote memories can be connected to the device through a network. Examples of the above network include the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0097] The input system 23 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the device; the output system 24 can include a display device such as a display screen.
[0098] The processor 21 performs various function applications and data processing of the device by running software programs, instructions and modules stored in the memory 22, that is, implements the multi-node CMDB block refinement data synchronization method described above.
[0099] The computer device provided above can be used to execute the multi-node CMDB block refinement data synchronization method provided by the above embodiments, and has the corresponding functions and advantages.
[0100] The embodiment of the present application also provides a storage medium containing computer executable instructions, which are used to execute the multi-node CMDB block refinement data synchronization method provided by the above embodiments when executed by a computer processor. The storage medium is any various types of memory device or storage device, and the storage medium includes: installation medium, such as CD-ROM, floppy disk or tape system; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic medium (such as hard disk or optical storage); register or other similar types of memory elements, etc.; the storage medium can also include other types of memory or combinations thereof; in addition, the storage medium can be located in the first computer system where the program is executed, or can be located in a different second computer system, which is connected to the first computer system through a network (such as the Internet); the second computer system can provide program instructions to the first computer for execution. The storage medium includes two or more storage media that can reside in different locations (for example, in different computer systems connected through a network). The storage medium can store program instructions (for example, specifically implemented as a computer program) executable by one or more processors.
[0101] Of course, the storage medium containing computer executable instructions provided by the embodiment of the present application is not limited to the multi-node CMDB block refinement data synchronization method described in the above embodiment, and can also execute the related operations in the multi-node CMDB block refinement data synchronization method provided by any embodiment of the present application.
[0102] So far, the technical solutions of the present application have been described in combination with the preferred embodiments, but those skilled in the art can easily understand that the protection scope of the present application is obviously not limited to these specific embodiments. Those skilled in the art can make equivalent changes or replacements to the related technical features without departing from the principles of the present application, and the technical solutions after the changes or replacements will fall within the protection scope of the present application.
[0103] The above merely illustrates the preferred embodiments of the present application, and is not used to limit the present application; for those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for multi-node CMDB chunk refinement data synchronization, characterized in that, The method comprises the following steps: S1, a CMDB configuration synchronization channel is set up, and a synchronization timing task is set; The configuration synchronization channel comprises: specifying a source area T1 and a target area T2, configuring a new synchronization channel in the CMDB of the T2 area, selecting an appropriate synchronization type, starting the synchronization channel, and ensuring that the synchronization channel can normally listen to data changes from the T1 area; The setting of the synchronization timing task comprises: setting one or more timing tasks in the T2 area according to business requirements, the timing task will trigger a data synchronization process associated with the configured synchronization channel at regular intervals; the time interval and execution strategy parameters of the timing task are configured to meet the specific synchronization frequency requirements; S2, before each synchronization starts, it is judged whether the service port of the T1 area is connected, and it is checked whether the service port of the T1 area can be accessed to ensure stable network connection; if the detection fails, an error log is recorded and an alarm is sent to the administrator; if the detection succeeds, step S3 is entered; S3, the latest synchronization channel configuration information is obtained from the T1 area through API calling, which is used to guide the subsequent data conversion and processing work; S4, according to the synchronization channel configuration information obtained from the T1 area, a synchronization channel is formally established in the T2 area, and the synchronization channel is started to receive data; once the synchronization channel is started, it enters the preparation state and waits for the timing task to trigger the actual data synchronization operation; S5, the timing task set in step S1 is associated with the created synchronization channel in step S4 in the T2 area, and the timing synchronization is started; S6, each time the timing task is triggered, a series of correction judgments are first performed, if all the correction items are verified, the synchronization process is formally started; if any correction item fails to pass the verification, this synchronization attempt is stopped, and detailed reason explanation is recorded for subsequent analysis.
2. The multi-node CMDB chunked refinement data synchronization method of claim 1, wherein, The synchronization type in the selection of the appropriate synchronization type in the S1 step comprises: full synchronization, incremental synchronization, and event-driven; The full synchronization is to synchronize all model instances in the T1 area to the corresponding model instances in the T2 area; The incremental synchronization is to synchronize the model instances in the T1 area to the corresponding model instances in the T2 area according to time period changes; The event-driven is to synchronize the mirror instances of the models in the T1 area and the corresponding models in the T2 area, the model instance changes in the T1 area or the model instance changes in the T2 area will cause changes in the mirror instances, and the synchronization to the other end area keeps consistent.
3. The multi-node CMDB chunked refinement data synchronization method of claim 1, wherein, The method for associating the created synchronization channel with the timing task set in step S1 in step S5 comprises: The id number of the created synchronization channel and the configuration information of the synchronization channel are associated with the set timing task, so that each timing task can accurately act on the correct synchronization channel.
4. The multi-node CMDB chunked refinement data synchronization method of claim 1, wherein, The synchronization channel configuration information in the S3 step comprises: data mapping rules and filtering conditions.
5. The multi-node CMDB chunked refinement data synchronization method of claim 1, wherein, The execution of the series of correction judgments of the S6 step includes verifying validity of source data, and the method for verifying validity of source data includes: acquiring corresponding data by calling an API path corresponding to a service port of a T1 region at each synchronization, parsing the data, and judging whether the data is valid.
6. A multi-node CMDB chunked refined data synchronization system for implementing the multi-node CMDB chunked refined data synchronization method according to any one of claims 1-5, characterized in that, It comprises: A configuration synchronization channel and timing task module: used for configuring a CMDB configuration synchronization channel and setting a synchronization timing task; The configuration synchronization channel comprises: specifying a source region T1 and a target region T2, configuring a new synchronization channel in the CMDB of the T2 region, selecting an appropriate synchronization type, starting the synchronization channel, and ensuring that the synchronization channel can normally listen to data changes from the T1 region; the setting of the synchronization timing task comprises: setting one or more timing tasks in the T2 region according to business requirements, the timing task will trigger a data synchronization process associated with the configured synchronization channel at regular intervals; the time interval and execution strategy parameters of the timing task are configured to meet the specific synchronization frequency requirements; A network reachability detection module: used for judging whether the service port of the T1 region is connected before each synchronization starts, checking whether the service port of the T1 region can be accessed, and ensuring stable network connection; if the detection fails, an error log is recorded and an alarm is sent to the administrator; if the detection succeeds, the S3 step is entered; A synchronization configuration pulling module: used for acquiring the latest synchronization channel configuration information from the T1 region through API calling, for guiding subsequent data conversion and processing work; A synchronization channel creation module: used for establishing a synchronization channel in the T2 region according to the synchronization channel configuration information acquired from the T1 region, and starting the synchronization channel to receive data; once the synchronization channel is started, it enters a preparation state and waits for the timing task to trigger the actual data synchronization operation; A configuration associated timing task module: used for associating the timing task set in the S1 step with the created synchronization channel in the S4 step in the T2 region, and starting the timing synchronization; A timing task correction judgment module: used for executing a series of correction judgments at each timing task trigger, if all correction items are verified, the synchronization process is formally started; if any correction item fails to pass the verification, this synchronization attempt is stopped, and detailed reason explanation is recorded for subsequent analysis.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that The program is executed by the processor to realize the steps of the multi-node CMDB block fine data synchronization method of any one of claims 1-5.
8. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to realize the steps of the multi-node CMDB block fine data synchronization method of any one of claims 1-5.
Citation Information
Patent Citations
Timing task execution method and device
CN108958915A
Integrated intelligent operation and maintenance control method, system and operation and maintenance platform
CN114548833A