WO2016082368A1 - Data consistency maintaining method, device and ptn transmission apparatus - Google Patents

Data consistency maintaining method, device and ptn transmission apparatus Download PDF

Info

Publication number
WO2016082368A1
WO2016082368A1 PCT/CN2015/073911 CN2015073911W WO2016082368A1 WO 2016082368 A1 WO2016082368 A1 WO 2016082368A1 CN 2015073911 W CN2015073911 W CN 2015073911W WO 2016082368 A1 WO2016082368 A1 WO 2016082368A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
configuration
source
data source
updated
Prior art date
Application number
PCT/CN2015/073911
Other languages
French (fr)
Chinese (zh)
Inventor
邓文博
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016082368A1 publication Critical patent/WO2016082368A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks

Definitions

  • the present invention relates to the field of data maintenance, and in particular, to a method, device, and PTN transmission device for maintaining data consistency.
  • T-MPLS is a packet-transport network technology standardized by ITU-T. It removes the ip connectionless forwarding feature of MPLS and increases end-to-end OAM and protection functions. a transfer protocol.
  • the device In a packet transmission device, the device needs to support the dynamic routing function. Many device providers directly develop PTN devices on the original router system platform. Therefore, the PTN device network management needs to support both CLI configuration and network management configuration. Due to different configuration inputs, data consistency maintenance of devices and network management becomes very important and difficult.
  • Patent No. CN103686984A discloses a data synchronization method, system and device, and relates to the field of communication technology, which is used for improving the operating efficiency of the main system and better ensuring data consistency between the primary and backup systems.
  • the backup system establishes a link with the peer system, and the peer system sends the configuration data of the service to the standby system through the link with the backup system, and when the primary system encounters an abnormality or receives a switching instruction, the backup is performed. The system continues to provide this service using the saved configuration data.
  • the active system does not need to synchronize the configuration data of the service to the standby system, thereby reducing the resource utilization of the primary system, improving the operating efficiency of the primary system, and better ensuring the between the primary and backup systems.
  • the consistency of the data is not required to synchronize the configuration data of the service to the standby system, thereby reducing the resource utilization of the primary system, improving the operating efficiency of the primary system, and better ensuring the between the primary and backup systems.
  • the above two systems and methods the first is to control the synchronization mechanism between the primary and backup data, the second is to use the server for data synchronization. None of them provides an automatic synchronization solution when data is inconsistent.
  • the embodiment of the present invention provides a solution as follows:
  • the embodiment of the present invention provides a method for maintaining data consistency, which is used in a first module, including: detecting that a first data source and a second data source are separately saved Selecting, as the reference data source for maintaining data consistency, from the first data source and the second data source when the first configuration data and the second configuration data for the operating condition of the first device are inconsistent; And the reference configuration data saved in the reference data source, updating the to-be-updated configuration data saved in the unselected data source of the first data source and the second data source, so that the updated data and the reference configuration are The data is consistent.
  • the selecting, as the reference data source for maintaining data consistency, the first data source and the second data source comprises: determining the first configuration data according to the first configuration data and the second configuration data. And a first configuration item different from the content in the second configuration data; and selecting the reference data source according to the first configuration item.
  • the selecting the reference data source according to the first configuration item comprises: outputting data of the first configuration item in the first configuration data and the second configuration data to a user interface;
  • the data source selected by the user through the user interface is used as the reference data source.
  • the data format of the configuration data saved in the first data source and the second data source is different, and the first data source is updated according to the reference configuration data saved in the selected reference data source.
  • the configuration data to be updated saved in the unselected data source of the second data source so that the updated data is consistent with the reference configuration data saved in the reference data source, including: data format of the reference configuration data Converting to the data format of the configuration data to be updated, and obtaining the converted data; replacing the data to be updated with the converted data; or determining according to the reference configuration data and the configuration data to be updated.
  • a second configuration item corresponding to the inconsistent data of the configuration data to be updated a second configuration item corresponding to the inconsistent data of the configuration data to be updated; the data format of the data of the second configuration item is converted into a data format of the configuration data to be updated, and the format is obtained.
  • the converted data is updated according to the format converted data, and the data of the corresponding configuration item in the configuration data to be updated is updated.
  • the first data source is a network management device of the first device
  • the second data source is a service processing module of the first device.
  • the second configuration data that is received by the first module after the service processing module changes the running data of the first device indicates that the first configuration data and the second configuration data are inconsistent.
  • the embodiment of the present invention further provides an apparatus for maintaining data consistency, which is used by the first module, and includes: a selecting module, configured to detect, respectively, the running status of the first device saved by the first data source and the second data source respectively When the first configuration data and the second configuration data are inconsistent, a reference data source that maintains data consistency is selected from the first data source and the second data source; and an update module is set to be based on the selected reference Data source
  • the saved reference configuration data is updated, and the configuration data to be updated saved in the unselected data source of the first data source and the second data source is updated, so that the updated data is consistent with the reference configuration data.
  • the selecting module includes: a first determining unit, configured to: when detecting that the first configuration data and the second configuration data that are saved by the first data source and the second data source respectively for the operating condition of the first device are inconsistent Determining, according to the first configuration data and the second configuration data, a first configuration item that is different in contents of the first configuration data and the second configuration data; and selecting a unit, configured to be according to the first configuration Item, select the reference data source.
  • a first determining unit configured to: when detecting that the first configuration data and the second configuration data that are saved by the first data source and the second data source respectively for the operating condition of the first device are inconsistent Determining, according to the first configuration data and the second configuration data, a first configuration item that is different in contents of the first configuration data and the second configuration data
  • selecting a unit configured to be according to the first configuration Item, select the reference data source.
  • the update module includes: a first conversion unit configured to convert a data format of the reference configuration data into a data format of the configuration data to be updated, to obtain converted data; and a replacement unit configured to And the second determining unit is configured to determine, according to the reference configuration data and the to-be-updated configuration data, the reference configuration data relative to the to-be-updated configuration data.
  • a second configuration item corresponding to the inconsistent data the second conversion unit is configured to convert the data format of the data of the second configuration item into a data format of the configuration data to be updated, to obtain format converted data;
  • the unit is configured to update data of the corresponding configuration item in the to-be-updated configuration data according to the format converted data.
  • the embodiment of the invention further provides a device PTN transmission device including the above-mentioned data consistency.
  • the data saved in the unselected data source is updated by selecting the reference data source and according to the saved reference configuration data, so that the update is consistent with the baseline configuration data, thereby realizing automatic synchronization resolution when the data is inconsistent.
  • FIG. 1 is a flow chart showing the steps of a method for maintaining data consistency according to an embodiment of the present invention
  • Figure 2 shows a system module diagram
  • Figure 3 shows a schematic diagram of data inconsistency monitoring
  • Figure 4 shows a flow chart of the main synchronization of the network management data
  • Figure 5 shows a flow chart based on device operation data
  • FIG. 6 is a structural block diagram of an apparatus for maintaining data consistency according to an embodiment of the present invention.
  • FIG. 1 is a flow chart showing the steps of a method for maintaining data consistency according to an embodiment of the present invention.
  • an embodiment of the present invention provides a method for maintaining data consistency, which is used in a first module, and includes the following steps:
  • Step 101 When it is detected that the first configuration data and the second configuration data that are respectively saved by the first data source and the second data source for the operating status of the first device are inconsistent, from the first data source and the second The data source is selected as the baseline data source for maintaining data consistency;
  • Step 102 Update, according to the selected reference configuration data saved in the reference data source, configuration data to be updated saved in the unselected data source of the first data source and the second data source, so that the updated data is updated.
  • the data is consistent with the baseline configuration data.
  • the data saved in the unselected data source is updated by selecting the reference data source and according to the saved reference configuration data, so that the update is consistent with the reference configuration data, thereby realizing automatic synchronization resolution when the data is inconsistent.
  • the first device is, for example, a PTN transmission device; the first data source is a network management device of a PTN transmission device; and the second data source is a service processing module of a PTN transmission device.
  • the selecting, as the reference data source for maintaining data consistency, from the first data source and the second data source may include:
  • the selecting the reference data source according to the first configuration item may include:
  • the data source selected by the user through the user interface is used as the reference data source.
  • the data format of the configuration data saved in the first data source and the second data source may be the same, and the reference configuration data saved in the selected reference data source is updated.
  • the configuration data to be updated saved in the unselected data source of the first data source and the second data source, so that the updated data is consistent with the reference configuration data saved in the reference data source may include:
  • the data format of the configuration data saved in the first data source and the second data source may be different.
  • Updating the to-be-updated configuration data saved in the unselected data source of the first data source and the second data source according to the selected reference configuration data saved in the reference data source, so that the updated data is Consistent with the baseline configuration data saved in the reference data source includes:
  • the first data source may be a network management device of the first device
  • the second data source may be a service processing module of the first device
  • the first module After the first module receives the second configuration data that is reported by the service processing module after the running data of the first device is changed, it indicates that the first configuration data and the second configuration data are inconsistent.
  • the preferred embodiment provides a method and system for maintaining master data consistency in a PTN device.
  • the preferred embodiment relates to data consistency maintenance of the main control board of the PTN transmission device, and in particular, to maintaining and repairing the main control configuration data in the PTN network device without interrupting the service, and ensuring that the device data and the network management data are consistent. .
  • the present invention proposes a real-time monitoring device data consistency under the premise of not interrupting the existing service as much as possible, and adopts corresponding when the data is inconsistent.
  • the measures are quickly repaired to ensure the healthy and stable operation of the equipment.
  • the preferred embodiment provides a method and system for consistency checking and maintenance of data sources between different data formats.
  • the user can monitor the device data in a real-time manner. If the inconsistency is found, the automatic data synchronization can be performed in a manner that minimizes the impact on the existing network service, and the data consistency between the device and the network management system is ensured.
  • the preferred embodiment adopts the following technical solutions, including the following steps:
  • Step A the data model on the device:
  • the configuration data on the device can be delivered from the NMS or through the CLI. Therefore, the Agent component must be added to the device, as shown in Figure 2 (showing the simple interaction between three data). The data from these two configuration sources is configured.
  • the Agent component must provide the following features:
  • the data configured by the CLI is the network management data format and is saved in the library.
  • the Agent component must notify the network management or device running data in real time when the data changes.
  • the Agent component is also the key to achieving consistent maintenance and repair.
  • Step B data consistency detection
  • Step C synchronization mechanism
  • consistency maintenance is performed. Then, the operation data of the device is batch-synchronized to the database maintained by the agent by the command, and then the network management uploads the database of the agent to the network management system by uploading, and overwrites the original data of the network management to realize the consistency of the three types of data.
  • these synchronous operations after the user selects a consistent maintenance strategy, can be automatically completed.
  • the preferred embodiment provides a method and system for data consistency check and maintenance.
  • the network management process of the agent component and the device is used to monitor the device data in real time.
  • a fast and effective repair method is provided, which is automatically completed for the user. Consistent maintenance to ensure equipment reliability.
  • FIG. 3 shows the process of data inconsistency monitoring, the specific processing steps:
  • the user configures the service through the CLI, which causes the device running data to change.
  • the service processing module notifies the agent component of the configuration report, and the agent component converts the corresponding configuration data into a corresponding service data structure, and then saves the data into the library. At the same time, notify the network management device that there is data change.
  • the network management system After receiving the data change notification, the network management system displays data inconsistency information on the user interface, and can view which information is inconsistent. Network management and device data synchronization will continue to be explained in the following example 3.
  • Scenario 2 The main synchronization process is based on network management data:
  • Figure 4 shows the data synchronization process based on network management data when the data is inconsistent. After the user selects a good policy, these synchronization processes automatically synchronize, without user intervention, and synchronization ensures that the existing network services are not interrupted as much as possible.
  • the user network management interface finds data inconsistency information, and the network management interface selects network management data as the main data synchronization.
  • the network management system reads the data from the network management database, and delivers the service configuration data to the device in a specific order.
  • the Agent component processes the data sent by the network management system in full, and analyzes and compares the data with the data of the agent to obtain inconsistent configuration data.
  • the Agent component maps the inconsistent configuration data to the service data model of the device according to the interface.
  • the agent component delivers the data obtained by the mapping to the device service module according to the business rule.
  • the device service processing module receives and processes the service configuration data, changes the current state of the device, and simultaneously writes the device operation data.
  • the Agent component must guarantee the atomic operation of each configuration data modification to ensure that it can fall back to the original state even if it fails.
  • Scenario 3 The device running data is the main synchronization process:
  • Figure 5 shows the data synchronization process based on the device operation data when the data inconsistency is detected. After the user selects a good policy, these synchronization processes are automatically synchronized, and no user intervention is required. Because the running data is the main one, the existing network service will not be affected.
  • the user network management interface finds data inconsistency information, and the network management interface selects the device running data as the main data synchronization.
  • the device service module reads the device running data, and encapsulates the corresponding interface packet, and reports the packet to the agent component.
  • the Agent component processes each received message, converts the mapping into an internal data structure, and clears the original data, and stores the newly converted data into the database.
  • the agent component reports all the data reported by the device, and after the storage is successful, the network management is actively notified to synchronize the data.
  • the network management system sends a synchronization command to the agent component, and the synchronization command needs to be sent multiple times, and each service data is synchronized.
  • the agent component receives the synchronization command, reads the corresponding service data, and reports the packet to the network management system.
  • the network management saves the data reported by the agent in the manner of overlaying the storage.
  • FIG. 6 is a structural block diagram of an apparatus for maintaining data consistency according to an embodiment of the present invention.
  • an embodiment of the present invention further provides an apparatus for maintaining data consistency, which is used in a first module, including:
  • the selecting module 601 is configured to: when detecting that the first configuration data and the second configuration data that are respectively saved by the first data source and the second data source for the operating status of the first device are inconsistent, from the first data source and the Selecting a second data source as a reference data source for maintaining data consistency;
  • the update module 602 is configured to update the configuration data to be updated saved in the unselected data source of the first data source and the second data source according to the selected reference configuration data saved in the reference data source, so that The updated data is consistent with the baseline configuration data.
  • the data saved in the unselected data source is updated by selecting the reference data source and according to the saved reference configuration data, so that the update is consistent with the reference configuration data, thereby realizing automatic synchronization resolution when the data is inconsistent.
  • the selection module 601 can include:
  • a first determining unit configured to: when detecting that the first configuration data and the second configuration data that are respectively saved by the first data source and the second data source for the operating status of the first device are inconsistent, according to the first configuration data and Determining, by the second configuration data, a first configuration item that is different in content in the first configuration data and the second configuration data;
  • selecting a unit configured to select the reference data source according to the first configuration item.
  • the update module 602 can include:
  • a first conversion unit configured to convert a data format of the reference configuration data into a data format of the configuration data to be updated, to obtain converted data
  • a replacement unit configured to replace the data to be updated with the converted data
  • a second determining unit configured to determine, according to the reference configuration data and the to-be-updated configuration data, a second configuration item corresponding to the inconsistent data of the reference configuration data with respect to the to-be-updated configuration data;
  • a second conversion unit configured to convert a data format of the data of the second configuration item into a data format of the configuration data to be updated, to obtain format converted data
  • an updating unit configured to update data of a corresponding configuration item in the to-be-updated configuration data according to the format converted data.
  • An embodiment of the present invention further provides a PTN transmission device, where the PTN transmission device includes the foregoing apparatus for maintaining data consistency.
  • the data stored in the unselected data source is updated by selecting the reference data source and based on the saved reference configuration data, so that the update is consistent with the reference configuration data, thereby realizing Automatic synchronization resolution when data is inconsistent.

Abstract

Provided in an embodiment of the present invention are a data consistency maintaining method, device and PTN transmission apparatus, the method comprising: upon detecting that first configuration data and second configuration data for an operating condition of a first apparatus and respectively stored by a first data source and a second data source are inconsistent, selecting a reference data source from the first data source and the second data source for maintaining data consistency; updating to-be-updated configuration data stored in the unselected data source of the first data source and the second data source according to reference configuration data stored in the selected reference data source, such that the updated data is consistent with the reference configuration data. The embodiment of the present invention realizes automatic synchronization solution upon data inconsistency.

Description

一种保持数据一致性的方法、装置及PTN传输设备Method, device and PTN transmission device for maintaining data consistency 技术领域Technical field
本发明涉及数据维护领域,尤其涉及一种保持数据一致性的方法、装置及PTN传输设备。The present invention relates to the field of data maintenance, and in particular, to a method, device, and PTN transmission device for maintaining data consistency.
背景技术Background technique
在分组传输网中常用的技术是T-MPLS,它是ITU-T标准化的一种分组传送网技术,是去掉了MPLS的ip无连接转发特性、同时增加了端到端的OAM和保护功能而形成的一种传送协议。在分组传输设备由于需要支持动态路由功能,很多设备提供商都是直接在原路由器系统平台上开发PTN设备,所以PTN设备网管需要同时支持CLI配置和网管配置。由于有不同的配置输入,设备和网管的数据一致性维护就变得十分重要,也比较困难。The commonly used technology in packet transmission networks is T-MPLS, which is a packet-transport network technology standardized by ITU-T. It removes the ip connectionless forwarding feature of MPLS and increases end-to-end OAM and protection functions. a transfer protocol. In a packet transmission device, the device needs to support the dynamic routing function. Many device providers directly develop PTN devices on the original router system platform. Therefore, the PTN device network management needs to support both CLI configuration and network management configuration. Due to different configuration inputs, data consistency maintenance of devices and network management becomes very important and difficult.
比如专利:专利号为CN103686984A的专利公开了一种数据同步方法、系统和设备,涉及通讯技术领域,用于提升主用系统运行效率,并较好的保证主备用系统之间的数据的一致性。在该专利中备用系统与对端系统建立链路,对端系统通过与备用系统之间的链路将业务的配置数据发送给备用系统,在主用系统发生异常或接收到切换指令时,备用系统使用保存的配置数据继续提供该业务。本方案中,主用系统不需要将业务的配置数据同步给备用系统,从而降低了主用系统的资源利用率,提高了主用系统的运行效率,并较好的保证了主备用系统之间的数据的一致性。For example, the patent: Patent No. CN103686984A discloses a data synchronization method, system and device, and relates to the field of communication technology, which is used for improving the operating efficiency of the main system and better ensuring data consistency between the primary and backup systems. . In this patent, the backup system establishes a link with the peer system, and the peer system sends the configuration data of the service to the standby system through the link with the backup system, and when the primary system encounters an abnormality or receives a switching instruction, the backup is performed. The system continues to provide this service using the saved configuration data. In this solution, the active system does not need to synchronize the configuration data of the service to the standby system, thereby reducing the resource utilization of the primary system, improving the operating efficiency of the primary system, and better ensuring the between the primary and backup systems. The consistency of the data.
还有专利号为CN103747091A的专利提供了一种嵌入式设备的分布式数据同步系统及方法,通过在每个嵌入式设备上部署客户端,在云端部署服务器组,同步数据从一个客户端通过一个或多个服务器同步到另一个客户端上。There is also a patent number CN103747091A that provides a distributed data synchronization system and method for embedded devices. By deploying a client on each embedded device, a server group is deployed in the cloud, and data is synchronized from a client through a client. Or multiple servers are synced to another client.
上面两种系统及方式,第一种是控制主备数据之间的同步机制,第二种是利用服务器进行数据同步。而都没有提供在数据不一致时的自动同步解决方法。The above two systems and methods, the first is to control the synchronization mechanism between the primary and backup data, the second is to use the server for data synchronization. None of them provides an automatic synchronization solution when data is inconsistent.
发明内容Summary of the invention
本发明实施例的目的是提供一种保持数据一致性的方法、装置及PTN传输设备,以便提供在数据不一致时的自动同步解决方法。 It is an object of embodiments of the present invention to provide a method, apparatus, and PTN transmission apparatus for maintaining data consistency to provide an automatic synchronization solution when data is inconsistent.
为解决上述技术问题,本发明实施例提供方案如下:本发明实施例提供一种保持数据一致性的方法,用于第一模块,包括:在检测到第一数据源和第二数据源分别保存的针对第一设备的运行状况的第一配置数据和第二配置数据不一致时,从所述第一数据源和所述第二数据源中选择作为保持数据一致性的基准数据源;根据选择的所述基准数据源中保存的基准配置数据,更新所述第一数据源和所述第二数据源中未选择的数据源中保存的待更新配置数据,使得更新后的数据与所述基准配置数据一致。In order to solve the above technical problem, the embodiment of the present invention provides a solution as follows: The embodiment of the present invention provides a method for maintaining data consistency, which is used in a first module, including: detecting that a first data source and a second data source are separately saved Selecting, as the reference data source for maintaining data consistency, from the first data source and the second data source when the first configuration data and the second configuration data for the operating condition of the first device are inconsistent; And the reference configuration data saved in the reference data source, updating the to-be-updated configuration data saved in the unselected data source of the first data source and the second data source, so that the updated data and the reference configuration are The data is consistent.
优选地,所述从第一数据源和第二数据源中选择作为保持数据一致性的基准数据源包括:根据所述第一配置数据和所述第二配置数据,确定所述第一配置数据和所述第二配置数据中内容不同的第一配置项;根据所述第一配置项,选择出所述基准数据源。Preferably, the selecting, as the reference data source for maintaining data consistency, the first data source and the second data source comprises: determining the first configuration data according to the first configuration data and the second configuration data. And a first configuration item different from the content in the second configuration data; and selecting the reference data source according to the first configuration item.
优选地,所述根据所述第一配置项,选择出所述基准数据源包括:将所述第一配置数据和所述第二配置数据中所述第一配置项的数据输出到用户界面;将用户通过用户界面选择的数据源作为所述基准数据源。Preferably, the selecting the reference data source according to the first configuration item comprises: outputting data of the first configuration item in the first configuration data and the second configuration data to a user interface; The data source selected by the user through the user interface is used as the reference data source.
优选地,所述第一数据源和所述第二数据源中保存的配置数据的数据格式不同,所述根据选择的所述基准数据源中保存的基准配置数据,更新所述第一数据源和所述第二数据源中未选择的数据源中保存的待更新配置数据,使得更新后的数据与所述基准数据源中保存的基准配置数据一致包括:将所述基准配置数据的数据格式转换为所述待更新配置数据的数据格式,得到转换后的数据;将所述待更新数据替换为所述转换后的数据;或者,根据所述基准配置数据和所述待更新配置数据,确定所述基准配置数据相对于所述待更新配置数据的不一致数据所对应的第二配置项;将所述第二配置项的数据的数据格式转换为所述待更新配置数据的数据格式,得到格式转换后的数据;根据所述格式转换后的数据,更新所述待更新配置数据中的对应配置项的数据。Preferably, the data format of the configuration data saved in the first data source and the second data source is different, and the first data source is updated according to the reference configuration data saved in the selected reference data source. And the configuration data to be updated saved in the unselected data source of the second data source, so that the updated data is consistent with the reference configuration data saved in the reference data source, including: data format of the reference configuration data Converting to the data format of the configuration data to be updated, and obtaining the converted data; replacing the data to be updated with the converted data; or determining according to the reference configuration data and the configuration data to be updated. a second configuration item corresponding to the inconsistent data of the configuration data to be updated; the data format of the data of the second configuration item is converted into a data format of the configuration data to be updated, and the format is obtained. The converted data is updated according to the format converted data, and the data of the corresponding configuration item in the configuration data to be updated is updated.
优选地,所述第一数据源为第一设备的网管设备,所述第二数据源为第一设备的业务处理模块。Preferably, the first data source is a network management device of the first device, and the second data source is a service processing module of the first device.
优选地,所述第一模块接收到所述业务处理模块在第一设备的运行数据发生变化后上报的所述第二配置数据表明检测到第一配置数据和第二配置数据不一致。Preferably, the second configuration data that is received by the first module after the service processing module changes the running data of the first device indicates that the first configuration data and the second configuration data are inconsistent.
本发明实施例还提供一种保持数据一致性的装置,用于第一模块,包括:选择模块,设置为在检测到第一数据源和第二数据源分别保存的针对第一设备的运行状况的第一配置数据和第二配置数据不一致时,从所述第一数据源和所述第二数据源中选择作为保持数据一致性的基准数据源;更新模块,设置为根据选择的所述基准数据源中 保存的基准配置数据,更新所述第一数据源和所述第二数据源中未选择的数据源中保存的待更新配置数据,使得更新后的数据与所述基准配置数据一致。The embodiment of the present invention further provides an apparatus for maintaining data consistency, which is used by the first module, and includes: a selecting module, configured to detect, respectively, the running status of the first device saved by the first data source and the second data source respectively When the first configuration data and the second configuration data are inconsistent, a reference data source that maintains data consistency is selected from the first data source and the second data source; and an update module is set to be based on the selected reference Data source The saved reference configuration data is updated, and the configuration data to be updated saved in the unselected data source of the first data source and the second data source is updated, so that the updated data is consistent with the reference configuration data.
优选地,所述选择模块包括:第一确定单元,设置为在检测到第一数据源和第二数据源分别保存的针对第一设备的运行状况的第一配置数据和第二配置数据不一致时,根据所述第一配置数据和所述第二配置数据,确定所述第一配置数据和所述第二配置数据中内容不同的第一配置项;选择单元,设置为根据所述第一配置项,选择出所述基准数据源。Preferably, the selecting module includes: a first determining unit, configured to: when detecting that the first configuration data and the second configuration data that are saved by the first data source and the second data source respectively for the operating condition of the first device are inconsistent Determining, according to the first configuration data and the second configuration data, a first configuration item that is different in contents of the first configuration data and the second configuration data; and selecting a unit, configured to be according to the first configuration Item, select the reference data source.
优选地,所述更新模块包括:第一转换单元,设置为将所述基准配置数据的数据格式转换为所述待更新配置数据的数据格式,得到转换后的数据;替换单元,设置为将所述待更新数据替换为所述转换后的数据;或者,第二确定单元,设置为根据所述基准配置数据和所述待更新配置数据,确定所述基准配置数据相对于所述待更新配置数据的不一致数据所对应的第二配置项;第二转换单元,设置为将所述第二配置项的数据的数据格式转换为所述待更新配置数据的数据格式,得到格式转换后的数据;更新单元,设置为根据所述格式转换后的数据,更新所述待更新配置数据中的对应配置项的数据。Preferably, the update module includes: a first conversion unit configured to convert a data format of the reference configuration data into a data format of the configuration data to be updated, to obtain converted data; and a replacement unit configured to And the second determining unit is configured to determine, according to the reference configuration data and the to-be-updated configuration data, the reference configuration data relative to the to-be-updated configuration data. a second configuration item corresponding to the inconsistent data; the second conversion unit is configured to convert the data format of the data of the second configuration item into a data format of the configuration data to be updated, to obtain format converted data; And the unit is configured to update data of the corresponding configuration item in the to-be-updated configuration data according to the format converted data.
本发明实施例还提供一种包括以上所述的保持数据一致性的装置PTN传输设备。The embodiment of the invention further provides a device PTN transmission device including the above-mentioned data consistency.
从以上所述可以看出,本发明实施例至少具有如下有益效果:As can be seen from the above, the embodiments of the present invention have at least the following beneficial effects:
通过选择基准数据源并根据其保存的基准配置数据来更新未选择的数据源中保存的数据,以使更新后与基准配置数据一致,从而实现了在数据不一致时的自动同步解决。The data saved in the unselected data source is updated by selecting the reference data source and according to the saved reference configuration data, so that the update is consistent with the baseline configuration data, thereby realizing automatic synchronization resolution when the data is inconsistent.
附图说明DRAWINGS
图1表示本发明实施例提供的一种保持数据一致性的方法的步骤流程图;1 is a flow chart showing the steps of a method for maintaining data consistency according to an embodiment of the present invention;
图2表示系统模块图;Figure 2 shows a system module diagram;
图3表示数据不一致监控示意图;Figure 3 shows a schematic diagram of data inconsistency monitoring;
图4表示以网管数据为主同步流程图;Figure 4 shows a flow chart of the main synchronization of the network management data;
图5表示以设备运行数据为主同步流程图;Figure 5 shows a flow chart based on device operation data;
图6表示本发明实施例提供的一种保持数据一致性的装置的结构框图。 FIG. 6 is a structural block diagram of an apparatus for maintaining data consistency according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图及具体实施例对本发明实施例进行详细描述。The embodiments of the present invention will be described in detail below with reference to the drawings and specific embodiments.
图1表示本发明实施例提供的一种保持数据一致性的方法的步骤流程图,参照图1,本发明实施例提供一种保持数据一致性的方法,用于第一模块,包括如下步骤:FIG. 1 is a flow chart showing the steps of a method for maintaining data consistency according to an embodiment of the present invention. Referring to FIG. 1, an embodiment of the present invention provides a method for maintaining data consistency, which is used in a first module, and includes the following steps:
步骤101,在检测到第一数据源和第二数据源分别保存的针对第一设备的运行状况的第一配置数据和第二配置数据不一致时,从所述第一数据源和所述第二数据源中选择作为保持数据一致性的基准数据源;Step 101: When it is detected that the first configuration data and the second configuration data that are respectively saved by the first data source and the second data source for the operating status of the first device are inconsistent, from the first data source and the second The data source is selected as the baseline data source for maintaining data consistency;
步骤102,根据选择的所述基准数据源中保存的基准配置数据,更新所述第一数据源和所述第二数据源中未选择的数据源中保存的待更新配置数据,使得更新后的数据与所述基准配置数据一致。Step 102: Update, according to the selected reference configuration data saved in the reference data source, configuration data to be updated saved in the unselected data source of the first data source and the second data source, so that the updated data is updated. The data is consistent with the baseline configuration data.
可见,通过选择基准数据源并根据其保存的基准配置数据来更新未选择的数据源中保存的数据,以使更新后与基准配置数据一致,从而实现了在数据不一致时的自动同步解决。It can be seen that the data saved in the unselected data source is updated by selecting the reference data source and according to the saved reference configuration data, so that the update is consistent with the reference configuration data, thereby realizing automatic synchronization resolution when the data is inconsistent.
其中,所述第一设备例如PTN传输设备;所述第一数据源例如PTN传输设备的网管设备;所述第二数据源例如PTN传输设备的业务处理模块。The first device is, for example, a PTN transmission device; the first data source is a network management device of a PTN transmission device; and the second data source is a service processing module of a PTN transmission device.
本发明实施例中,所述从第一数据源和第二数据源中选择作为保持数据一致性的基准数据源可包括:In the embodiment of the present invention, the selecting, as the reference data source for maintaining data consistency, from the first data source and the second data source may include:
根据所述第一配置数据和所述第二配置数据,确定所述第一配置数据和所述第二配置数据中内容不同的第一配置项;Determining, according to the first configuration data and the second configuration data, a first configuration item that is different in content in the first configuration data and the second configuration data;
根据所述第一配置项,选择出所述基准数据源。And selecting the reference data source according to the first configuration item.
其中,所述根据所述第一配置项,选择出所述基准数据源可包括:The selecting the reference data source according to the first configuration item may include:
将所述第一配置数据和所述第二配置数据中所述第一配置项的数据输出到用户界面;Outputting data of the first configuration item in the first configuration data and the second configuration data to a user interface;
将用户通过用户界面选择的数据源作为所述基准数据源。 The data source selected by the user through the user interface is used as the reference data source.
本发明实施例中,所述第一数据源和所述第二数据源中保存的配置数据的数据格式可以相同,则所述根据选择的所述基准数据源中保存的基准配置数据,更新所述第一数据源和所述第二数据源中未选择的数据源中保存的待更新配置数据,使得更新后的数据与所述基准数据源中保存的基准配置数据一致可以包括:In the embodiment of the present invention, the data format of the configuration data saved in the first data source and the second data source may be the same, and the reference configuration data saved in the selected reference data source is updated. The configuration data to be updated saved in the unselected data source of the first data source and the second data source, so that the updated data is consistent with the reference configuration data saved in the reference data source, may include:
将所述待更新数据替换为所述基准配置数据;Replace the data to be updated with the reference configuration data;
或者,or,
根据所述基准配置数据和所述待更新配置数据,确定所述基准配置数据相对于所述待更新配置数据的不一致数据所对应的第二配置项;Determining, according to the reference configuration data and the to-be-updated configuration data, a second configuration item corresponding to the inconsistent data of the reference configuration data with respect to the to-be-updated configuration data;
根据所述第二配置项的数据,更新所述待更新配置数据中的对应配置项的数据。And updating, according to the data of the second configuration item, data of a corresponding configuration item in the configuration data to be updated.
或者,所述第一数据源和所述第二数据源中保存的配置数据的数据格式也可以不同,在这种情况下,为了保持不同格式数据之间的数据同步和一致性维护,则可以有:Alternatively, the data format of the configuration data saved in the first data source and the second data source may be different. In this case, in order to maintain data synchronization and consistency maintenance between different format data, Have:
所述根据选择的所述基准数据源中保存的基准配置数据,更新所述第一数据源和所述第二数据源中未选择的数据源中保存的待更新配置数据,使得更新后的数据与所述基准数据源中保存的基准配置数据一致包括:Updating the to-be-updated configuration data saved in the unselected data source of the first data source and the second data source according to the selected reference configuration data saved in the reference data source, so that the updated data is Consistent with the baseline configuration data saved in the reference data source includes:
将所述基准配置数据的数据格式转换为所述待更新配置数据的数据格式,得到转换后的数据;Converting a data format of the reference configuration data into a data format of the configuration data to be updated, to obtain converted data;
将所述待更新数据替换为所述转换后的数据;Substituting the data to be updated with the converted data;
或者,or,
根据所述基准配置数据和所述待更新配置数据,确定所述基准配置数据相对于所述待更新配置数据的不一致数据所对应的第二配置项;Determining, according to the reference configuration data and the to-be-updated configuration data, a second configuration item corresponding to the inconsistent data of the reference configuration data with respect to the to-be-updated configuration data;
将所述第二配置项的数据的数据格式转换为所述待更新配置数据的数据格式,得到格式转换后的数据;Converting a data format of the data of the second configuration item into a data format of the configuration data to be updated, to obtain format converted data;
根据所述格式转换后的数据,更新所述待更新配置数据中的对应配置项的数据。And updating, according to the format converted data, data of a corresponding configuration item in the configuration data to be updated.
本发明实施例中,所述第一数据源可以为第一设备的网管设备,所述第二数据源可以为第一设备的业务处理模块。In the embodiment of the present invention, the first data source may be a network management device of the first device, and the second data source may be a service processing module of the first device.
此外,为了做到实时监控,还可以有: In addition, in order to achieve real-time monitoring, you can also have:
所述第一模块接收到所述业务处理模块在第一设备的运行数据发生变化后上报的所述第二配置数据表明检测到第一配置数据和第二配置数据不一致。After the first module receives the second configuration data that is reported by the service processing module after the running data of the first device is changed, it indicates that the first configuration data and the second configuration data are inconsistent.
为将本发明实施例阐述得更加清楚明白,下面提供本发明实施例的较佳实施方式。In order to make the embodiments of the present invention more clearly understood, the preferred embodiments of the embodiments of the present invention are provided below.
本较佳实施方式提供一种PTN设备中保持主控数据一致性的方法和系统。The preferred embodiment provides a method and system for maintaining master data consistency in a PTN device.
本较佳实施方式涉及PTN传输设备的主控板数据一致性维护,并且特别的,涉及一种在PTN网络设备中不中断业务情况下维护和修复主控配置数据,保证设备数据和网管数据一致。The preferred embodiment relates to data consistency maintenance of the main control board of the PTN transmission device, and in particular, to maintaining and repairing the main control configuration data in the PTN network device without interrupting the service, and ensuring that the device data and the network management data are consistent. .
背景技术中的两种系统及方式,第一种是控制主备数据之间的同步机制,第二种是利用服务器进行数据同步。而都没有涉及多份不同格式数据之间的数据同步和一致性维护,尤其没有提供不一致实时监控的方法,同时也没有提供在数据不一致时的自动同步解决方法。Two systems and methods in the background art, the first is to control the synchronization mechanism between the primary and backup data, and the second is to use the server for data synchronization. None of them involves data synchronization and consistency maintenance between multiple formats of data, especially the method of providing inconsistent real-time monitoring, and does not provide an automatic synchronization solution when data is inconsistent.
本较佳实施方式在上述的背景下,以及在传输设备的现网环境下,提出了一种在尽量不中断现有业务的前提下,实时监控设备数据一致性,发现数据不一致时采取相应的措施进行快速修复,保证设备的健康稳定运行。In the above-mentioned background, and in the existing network environment of the transmission device, the present invention proposes a real-time monitoring device data consistency under the premise of not interrupting the existing service as much as possible, and adopts corresponding when the data is inconsistent. The measures are quickly repaired to ensure the healthy and stable operation of the equipment.
本较佳实施方式提供一种不同数据格式的数据源间一致性检查和维护的方法和系统。通过该方法和系统,用户可以实时监控设备数据是否一致,发现不一致可以根据推荐的方法,选择一种对现网业务影响最小的方式进行自动数据同步,保证设备和网管数据一致性。The preferred embodiment provides a method and system for consistency checking and maintenance of data sources between different data formats. Through the method and the system, the user can monitor the device data in a real-time manner. If the inconsistency is found, the automatic data synchronization can be performed in a manner that minimizes the impact on the existing network service, and the data consistency between the device and the network management system is ensured.
本较佳实施方式采用以下技术方案,包括以下步骤:The preferred embodiment adopts the following technical solutions, including the following steps:
步骤A、设备上的数据模型:Step A, the data model on the device:
由于设备上的配置数据可以是从网管下发,也可以通过CLI配置,所以设备上必须增加Agent组件,如图2(表示了三份数据之间简单的交互关系)所示,用于适配这两种配置源配置过来的数据。Agent组件必须提供以下功能:The configuration data on the device can be delivered from the NMS or through the CLI. Therefore, the Agent component must be added to the device, as shown in Figure 2 (showing the simple interaction between three data). The data from these two configuration sources is configured. The Agent component must provide the following features:
1、网管下发的配置数据。1. Configuration data delivered by the NMS.
2、CLI配置的数据为网管数据格式,并入库保存。2. The data configured by the CLI is the network management data format and is saved in the library.
3、Agent组件在数据变化时必须实时通知给网管或设备的运行数据。 3. The Agent component must notify the network management or device running data in real time when the data changes.
Agent组件也是实现一致性维护和修复的关键。The Agent component is also the key to achieving consistent maintenance and repair.
步骤B、数据一致性检测:Step B, data consistency detection:
在网管上用户可以很方便查看当前设备数据是否一致,如果存在不一致,可以查看具体是哪些配置数据不一致,从而可以确定大致的同步策略。On the U2000, you can easily check whether the current device data is consistent. If the data is inconsistent, you can check which configuration data is inconsistent, so that you can determine the approximate synchronization policy.
步骤C、同步机制Step C, synchronization mechanism
一共有3份配置数据,这三份数据间可以两两同步(见图2),通过两两同步的方式实现三份配置数据的一致性。理论上以任何一份数据为主都能够实现三份数据的一致性维护。There are a total of 3 configuration data, which can be synchronized in pairs (see Figure 2), and the consistency of the three configuration data is realized by two-two synchronization. In theory, consistently maintaining the consistency of three data based on any single data.
比如,以设备的运行数据为主,进行一致性维护。则先通过命令,把设备的运行数据批量同步到Agent维护的数据库中,然后网管通过上载方式把Agent的数据库上载到网管,覆盖网管原来的数据,实现三种数据的一致。当然这些同步操作,用户选择的一致性维护策略后,就能够自动完成。For example, based on the operating data of the device, consistency maintenance is performed. Then, the operation data of the device is batch-synchronized to the database maintained by the agent by the command, and then the network management uploads the database of the agent to the network management system by uploading, and overwrites the original data of the network management to realize the consistency of the three types of data. Of course, these synchronous operations, after the user selects a consistent maintenance strategy, can be automatically completed.
本较佳实施方式提供一种数据一致性检查和维护的方法和系统,通过网管,Agent组件和设备的配合处理流程,实时监控设备数据,发现不一致时提供快速有效的修复方法,自动为用户完成一致性维护,保证设备可靠性。下面结合具体实施例对本较佳实施方式作进一步的说明。The preferred embodiment provides a method and system for data consistency check and maintenance. The network management process of the agent component and the device is used to monitor the device data in real time. When the inconsistency is found, a fast and effective repair method is provided, which is automatically completed for the user. Consistent maintenance to ensure equipment reliability. The preferred embodiment will be further described below in conjunction with specific embodiments.
需要维护一致性的三份配置数据的关系如图2所示,即这三份数据只能进行两两同步,网管不能直接和设备运行数据同步。The relationship between the three configuration data that needs to maintain consistency is shown in Figure 2. That is, the three data can only be synchronized in two or two, and the network management system cannot directly synchronize with the running data of the device.
场景一,数据不一致监控:Scenario 1, data inconsistency monitoring:
图3给出数据不一致监控的流程,具体处理步骤:Figure 3 shows the process of data inconsistency monitoring, the specific processing steps:
310:用户通过CLI进行业务配置,这时候会导致设备运行数据发生变化。310: The user configures the service through the CLI, which causes the device running data to change.
320:业务处理模块会把配置上报通知给Agent组件,Agent组件把相应的配置数据转换成相应的业务数据结构,然后入库保存。同时通知网管设备有数据变更。320: The service processing module notifies the agent component of the configuration report, and the agent component converts the corresponding configuration data into a corresponding service data structure, and then saves the data into the library. At the same time, notify the network management device that there is data change.
330:网管接收到数据变更通知后,会在用户界面呈现数据不一致信息,可以查看具体哪些信息不一致。网管和设备数据同步会在后续例子三中继续说明。330: After receiving the data change notification, the network management system displays data inconsistency information on the user interface, and can view which information is inconsistent. Network management and device data synchronization will continue to be explained in the following example 3.
场景二,以网管数据为主同步流程: Scenario 2: The main synchronization process is based on network management data:
图4给出检测出数据不一致时,选择以网管数据为主的数据同步流程。这些同步流程在用户选择好策略后,都是自动进行同步,不需要用户干预,同步保证尽量不中断现网业务。Figure 4 shows the data synchronization process based on network management data when the data is inconsistent. After the user selects a good policy, these synchronization processes automatically synchronize, without user intervention, and synchronization ensures that the existing network services are not interrupted as much as possible.
410:用户网管界面发现数据不一致信息,网管界面选择以网管数据为主进行数据同步。410: The user network management interface finds data inconsistency information, and the network management interface selects network management data as the main data synchronization.
420:网管从网管数据库中读取数据,把业务配置数据按特定的顺序依次全量下发到设备。420: The network management system reads the data from the network management database, and delivers the service configuration data to the device in a specific order.
430:Agent组件处理网管全量下发的数据,用这个数据和Agent的数据进行分析比较,得出不一致的配置数据;430: The Agent component processes the data sent by the network management system in full, and analyzes and compares the data with the data of the agent to obtain inconsistent configuration data.
440:Agent组件把不一致的配置数据按接口映射为设备的业务数据模型。440: The Agent component maps the inconsistent configuration data to the service data model of the device according to the interface.
450:Agent组件把映射得到的数据,按业务规则依次下发到设备业务模块。450: The agent component delivers the data obtained by the mapping to the device service module according to the business rule.
460:设备业务处理模块接收处理这些业务配置数据,改变设备的当前状态,同时写入设备运行数据。460: The device service processing module receives and processes the service configuration data, changes the current state of the device, and simultaneously writes the device operation data.
470:所有数据都下发成功,则完成同步操作,保证了三份数据的一致性。470: All data is successfully delivered, and the synchronization operation is completed, which ensures the consistency of the three data.
特别地,这里可能存在下发数据失败的情况,Agent组件必须保证每个配置数据修改的原子操作,保证即使失败也能回退到原来的状态。In particular, there may be cases where the data is sent out. The Agent component must guarantee the atomic operation of each configuration data modification to ensure that it can fall back to the original state even if it fails.
场景三,以设备运行数据为主同步流程:Scenario 3: The device running data is the main synchronization process:
图5给出检测出数据不一致时,选择以设备运行数据为主的数据同步流程。这些同步流程在用户选择好策略后,都是自动进行同步,不需要用户干预,由于以运行数据为主,不会影响现网业务。Figure 5 shows the data synchronization process based on the device operation data when the data inconsistency is detected. After the user selects a good policy, these synchronization processes are automatically synchronized, and no user intervention is required. Because the running data is the main one, the existing network service will not be affected.
510:用户网管界面发现数据不一致信息,网管界面选择以设备运行数据为主进行数据同步。510: The user network management interface finds data inconsistency information, and the network management interface selects the device running data as the main data synchronization.
520:设备业务模块读取设备运行数据,封装成相应的接口报文,依次上报给Agent组件。520: The device service module reads the device running data, and encapsulates the corresponding interface packet, and reports the packet to the agent component.
530:Agent组件处理接收到的每个报文,映射转换为内部数据结构,并清除原来的数据,入库保存新转换得到的数据。 530: The Agent component processes each received message, converts the mapping into an internal data structure, and clears the original data, and stores the newly converted data into the database.
540:Agent组件吧所有设备上报数据都映射处理完,入库成功后,主动通知网管进行数据同步。540: The agent component reports all the data reported by the device, and after the storage is successful, the network management is actively notified to synchronize the data.
550:网管下发同步命令给Agent组件,同步命令需要多次下发,每次同步一种业务数据。550: The network management system sends a synchronization command to the agent component, and the synchronization command needs to be sent multiple times, and each service data is synchronized.
560:Agent组件收到同步命令,读取相应的业务数据,打包上报给网管。560: The agent component receives the synchronization command, reads the corresponding service data, and reports the packet to the network management system.
570:网管把Agent上报的数据,采用覆盖入库的方式保存。570: The network management saves the data reported by the agent in the manner of overlaying the storage.
580:所有业务数据都同步完成后,同步流程结束,三份数据实现了一致。580: After all the business data is synchronized, the synchronization process ends and the three data are consistent.
图6表示本发明实施例提供的一种保持数据一致性的装置的结构框图,参照图6,本发明实施例还提供一种保持数据一致性的装置,用于第一模块,包括:FIG. 6 is a structural block diagram of an apparatus for maintaining data consistency according to an embodiment of the present invention. Referring to FIG. 6, an embodiment of the present invention further provides an apparatus for maintaining data consistency, which is used in a first module, including:
选择模块601,设置为在检测到第一数据源和第二数据源分别保存的针对第一设备的运行状况的第一配置数据和第二配置数据不一致时,从所述第一数据源和所述第二数据源中选择作为保持数据一致性的基准数据源;The selecting module 601 is configured to: when detecting that the first configuration data and the second configuration data that are respectively saved by the first data source and the second data source for the operating status of the first device are inconsistent, from the first data source and the Selecting a second data source as a reference data source for maintaining data consistency;
更新模块602,设置为根据选择的所述基准数据源中保存的基准配置数据,更新所述第一数据源和所述第二数据源中未选择的数据源中保存的待更新配置数据,使得更新后的数据与所述基准配置数据一致。The update module 602 is configured to update the configuration data to be updated saved in the unselected data source of the first data source and the second data source according to the selected reference configuration data saved in the reference data source, so that The updated data is consistent with the baseline configuration data.
可见,通过选择基准数据源并根据其保存的基准配置数据来更新未选择的数据源中保存的数据,以使更新后与基准配置数据一致,从而实现了在数据不一致时的自动同步解决。It can be seen that the data saved in the unselected data source is updated by selecting the reference data source and according to the saved reference configuration data, so that the update is consistent with the reference configuration data, thereby realizing automatic synchronization resolution when the data is inconsistent.
其中,所述选择模块601可包括:The selection module 601 can include:
第一确定单元,设置为在检测到第一数据源和第二数据源分别保存的针对第一设备的运行状况的第一配置数据和第二配置数据不一致时,根据所述第一配置数据和所述第二配置数据,确定所述第一配置数据和所述第二配置数据中内容不同的第一配置项;a first determining unit, configured to: when detecting that the first configuration data and the second configuration data that are respectively saved by the first data source and the second data source for the operating status of the first device are inconsistent, according to the first configuration data and Determining, by the second configuration data, a first configuration item that is different in content in the first configuration data and the second configuration data;
选择单元,设置为根据所述第一配置项,选择出所述基准数据源。And selecting a unit, configured to select the reference data source according to the first configuration item.
所述更新模块602可包括: The update module 602 can include:
第一转换单元,设置为将所述基准配置数据的数据格式转换为所述待更新配置数据的数据格式,得到转换后的数据;a first conversion unit, configured to convert a data format of the reference configuration data into a data format of the configuration data to be updated, to obtain converted data;
替换单元,设置为将所述待更新数据替换为所述转换后的数据;a replacement unit, configured to replace the data to be updated with the converted data;
或者,or,
第二确定单元,设置为根据所述基准配置数据和所述待更新配置数据,确定所述基准配置数据相对于所述待更新配置数据的不一致数据所对应的第二配置项;a second determining unit, configured to determine, according to the reference configuration data and the to-be-updated configuration data, a second configuration item corresponding to the inconsistent data of the reference configuration data with respect to the to-be-updated configuration data;
第二转换单元,设置为将所述第二配置项的数据的数据格式转换为所述待更新配置数据的数据格式,得到格式转换后的数据;a second conversion unit, configured to convert a data format of the data of the second configuration item into a data format of the configuration data to be updated, to obtain format converted data;
更新单元,设置为根据所述格式转换后的数据,更新所述待更新配置数据中的对应配置项的数据。And an updating unit, configured to update data of a corresponding configuration item in the to-be-updated configuration data according to the format converted data.
本发明实施例还提供一种PTN传输设备,所述PTN传输设备包括以上所述的保持数据一致性的装置。An embodiment of the present invention further provides a PTN transmission device, where the PTN transmission device includes the foregoing apparatus for maintaining data consistency.
以上所述仅是本发明实施例的实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明实施例原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明实施例的保护范围。The above is only an embodiment of the embodiments of the present invention, and it should be noted that those skilled in the art can make some improvements and refinements without departing from the principles of the embodiments of the present invention. Retouching should also be considered as the scope of protection of the embodiments of the present invention.
工业实用性Industrial applicability
如上所述,通过上述实施例及优选实施方式,通过选择基准数据源并根据其保存的基准配置数据来更新未选择的数据源中保存的数据,以使更新后与基准配置数据一致,从而实现了在数据不一致时的自动同步解决。 As described above, according to the above embodiment and the preferred embodiment, the data stored in the unselected data source is updated by selecting the reference data source and based on the saved reference configuration data, so that the update is consistent with the reference configuration data, thereby realizing Automatic synchronization resolution when data is inconsistent.

Claims (10)

  1. 一种保持数据一致性的方法,用于第一模块,包括:A method of maintaining data consistency for a first module, including:
    在检测到第一数据源和第二数据源分别保存的针对第一设备的运行状况的第一配置数据和第二配置数据不一致时,从所述第一数据源和所述第二数据源中选择作为保持数据一致性的基准数据源;And detecting, when the first configuration data and the second configuration data that are saved by the first data source and the second data source respectively for the running status of the first device are inconsistent, from the first data source and the second data source Choose as the baseline data source to maintain data consistency;
    根据选择的所述基准数据源中保存的基准配置数据,更新所述第一数据源和所述第二数据源中未选择的数据源中保存的待更新配置数据,使得更新后的数据与所述基准配置数据一致。Updating the to-be-updated configuration data saved in the unselected data source of the first data source and the second data source according to the selected reference configuration data saved in the reference data source, so that the updated data and the The reference configuration data is consistent.
  2. 根据权利要求1所述的方法,其中,所述从第一数据源和第二数据源中选择作为保持数据一致性的基准数据源包括:The method of claim 1, wherein the selecting from the first data source and the second data source as a reference data source for maintaining data consistency comprises:
    根据所述第一配置数据和所述第二配置数据,确定所述第一配置数据和所述第二配置数据中内容不同的第一配置项;Determining, according to the first configuration data and the second configuration data, a first configuration item that is different in content in the first configuration data and the second configuration data;
    根据所述第一配置项,选择出所述基准数据源。And selecting the reference data source according to the first configuration item.
  3. 根据权利要求2所述的方法,其中,所述根据所述第一配置项,选择出所述基准数据源包括:The method of claim 2, wherein the selecting the reference data source according to the first configuration item comprises:
    将所述第一配置数据和所述第二配置数据中所述第一配置项的数据输出到用户界面;Outputting data of the first configuration item in the first configuration data and the second configuration data to a user interface;
    将用户通过用户界面选择的数据源作为所述基准数据源。The data source selected by the user through the user interface is used as the reference data source.
  4. 根据权利要求1所述的方法,其中,所述第一数据源和所述第二数据源中保存的配置数据的数据格式不同,所述根据选择的所述基准数据源中保存的基准配置数据,更新所述第一数据源和所述第二数据源中未选择的数据源中保存的待更新配置数据,使得更新后的数据与所述基准数据源中保存的基准配置数据一致包括:The method of claim 1, wherein the data format of the configuration data saved in the first data source and the second data source is different, and the reference configuration data saved in the selected reference data source according to the selection Updating the to-be-updated configuration data saved in the unselected data source of the first data source and the second data source, so that the updated data is consistent with the reference configuration data saved in the reference data source, including:
    将所述基准配置数据的数据格式转换为所述待更新配置数据的数据格式,得到转换后的数据;Converting a data format of the reference configuration data into a data format of the configuration data to be updated, to obtain converted data;
    将所述待更新数据替换为所述转换后的数据;Substituting the data to be updated with the converted data;
    或者, Or,
    根据所述基准配置数据和所述待更新配置数据,确定所述基准配置数据相对于所述待更新配置数据的不一致数据所对应的第二配置项;Determining, according to the reference configuration data and the to-be-updated configuration data, a second configuration item corresponding to the inconsistent data of the reference configuration data with respect to the to-be-updated configuration data;
    将所述第二配置项的数据的数据格式转换为所述待更新配置数据的数据格式,得到格式转换后的数据;Converting a data format of the data of the second configuration item into a data format of the configuration data to be updated, to obtain format converted data;
    根据所述格式转换后的数据,更新所述待更新配置数据中的对应配置项的数据。And updating, according to the format converted data, data of a corresponding configuration item in the configuration data to be updated.
  5. 根据权利要求1所述的方法,其中,所述第一数据源为第一设备的网管设备,所述第二数据源为第一设备的业务处理模块。The method according to claim 1, wherein the first data source is a network management device of the first device, and the second data source is a service processing module of the first device.
  6. 根据权利要求5所述的方法,其中,所述第一模块接收到所述业务处理模块在第一设备的运行数据发生变化后上报的所述第二配置数据表明检测到第一配置数据和第二配置数据不一致。The method according to claim 5, wherein the first module receives the second configuration data reported by the service processing module after the running data of the first device is changed, indicating that the first configuration data and the first The second configuration data is inconsistent.
  7. 一种保持数据一致性的装置,用于第一模块,包括:A device for maintaining data consistency for a first module, comprising:
    选择模块,设置为在检测到第一数据源和第二数据源分别保存的针对第一设备的运行状况的第一配置数据和第二配置数据不一致时,从所述第一数据源和所述第二数据源中选择作为保持数据一致性的基准数据源;a selection module, configured to: when detecting that the first configuration data and the second configuration data for the first device are respectively saved by the first data source and the second data source are inconsistent, from the first data source and the The second data source is selected as a reference data source for maintaining data consistency;
    更新模块,设置为根据选择的所述基准数据源中保存的基准配置数据,更新所述第一数据源和所述第二数据源中未选择的数据源中保存的待更新配置数据,使得更新后的数据与所述基准配置数据一致。And an update module, configured to update the configuration data to be updated saved in the unselected data source of the first data source and the second data source according to the selected reference configuration data saved in the reference data source, so as to update The subsequent data is consistent with the reference configuration data.
  8. 根据权利要求7所述的装置,其中,所述选择模块包括:The apparatus of claim 7, wherein the selection module comprises:
    第一确定单元,设置为在检测到第一数据源和第二数据源分别保存的针对第一设备的运行状况的第一配置数据和第二配置数据不一致时,根据所述第一配置数据和所述第二配置数据,确定所述第一配置数据和所述第二配置数据中内容不同的第一配置项;a first determining unit, configured to: when detecting that the first configuration data and the second configuration data that are respectively saved by the first data source and the second data source for the operating status of the first device are inconsistent, according to the first configuration data and Determining, by the second configuration data, a first configuration item that is different in content in the first configuration data and the second configuration data;
    选择单元,设置为根据所述第一配置项,选择出所述基准数据源。And selecting a unit, configured to select the reference data source according to the first configuration item.
  9. 根据权利要求7所述的装置,其中,所述更新模块包括:The apparatus of claim 7, wherein the update module comprises:
    第一转换单元,设置为将所述基准配置数据的数据格式转换为所述待更新配置数据的数据格式,得到转换后的数据;a first conversion unit, configured to convert a data format of the reference configuration data into a data format of the configuration data to be updated, to obtain converted data;
    替换单元,设置为将所述待更新数据替换为所述转换后的数据;a replacement unit, configured to replace the data to be updated with the converted data;
    或者, Or,
    第二确定单元,设置为根据所述基准配置数据和所述待更新配置数据,确定所述基准配置数据相对于所述待更新配置数据的不一致数据所对应的第二配置项;a second determining unit, configured to determine, according to the reference configuration data and the to-be-updated configuration data, a second configuration item corresponding to the inconsistent data of the reference configuration data with respect to the to-be-updated configuration data;
    第二转换单元,设置为将所述第二配置项的数据的数据格式转换为所述待更新配置数据的数据格式,得到格式转换后的数据;a second conversion unit, configured to convert a data format of the data of the second configuration item into a data format of the configuration data to be updated, to obtain format converted data;
    更新单元,设置为根据所述格式转换后的数据,更新所述待更新配置数据中的对应配置项的数据。And an updating unit, configured to update data of a corresponding configuration item in the to-be-updated configuration data according to the format converted data.
  10. 一种PTN传输设备,包括如权利要求7至9中任一项所述的保持数据一致性的装置。 A PTN transmission device comprising the apparatus for maintaining data consistency as claimed in any one of claims 7 to 9.
PCT/CN2015/073911 2014-11-24 2015-03-09 Data consistency maintaining method, device and ptn transmission apparatus WO2016082368A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410682845.3 2014-11-24
CN201410682845.3A CN105704169A (en) 2014-11-24 2014-11-24 Method for maintaining data consistency, device and PTN transmission device

Publications (1)

Publication Number Publication Date
WO2016082368A1 true WO2016082368A1 (en) 2016-06-02

Family

ID=56073447

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/073911 WO2016082368A1 (en) 2014-11-24 2015-03-09 Data consistency maintaining method, device and ptn transmission apparatus

Country Status (2)

Country Link
CN (1) CN105704169A (en)
WO (1) WO2016082368A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107171836B (en) * 2017-05-10 2019-11-26 烽火通信科技股份有限公司 A kind of the resource ID management method and system of distribution switch
CN110677454B (en) * 2019-08-19 2022-04-12 浙江省水利河口研究院 Water pollution early warning system and method based on multi-agent network convergence algorithm

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101345648A (en) * 2007-07-12 2009-01-14 中兴通讯股份有限公司 Solution method of data inconsistency
CN101588269A (en) * 2009-06-17 2009-11-25 中兴通讯股份有限公司 Method and system for automatically uploading configuration data of device to gateway
CN102857355A (en) * 2011-06-27 2013-01-02 中兴通讯股份有限公司 Method and device for information adaptation
CN102984017A (en) * 2012-12-31 2013-03-20 北京佳讯飞鸿电气股份有限公司 Data synchronization method for network management system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079749A (en) * 2007-06-27 2007-11-28 中国移动通信集团四川有限公司 Data consistency detection method
CN100591022C (en) * 2007-11-29 2010-02-17 上海华为技术有限公司 Method and apparatus for implementing preactivation of batch configuration
CN101577817B (en) * 2009-06-10 2012-05-23 中兴通讯股份有限公司 Distributed video monitoring system and method thereof for keeping data consistency

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101345648A (en) * 2007-07-12 2009-01-14 中兴通讯股份有限公司 Solution method of data inconsistency
CN101588269A (en) * 2009-06-17 2009-11-25 中兴通讯股份有限公司 Method and system for automatically uploading configuration data of device to gateway
CN102857355A (en) * 2011-06-27 2013-01-02 中兴通讯股份有限公司 Method and device for information adaptation
CN102984017A (en) * 2012-12-31 2013-03-20 北京佳讯飞鸿电气股份有限公司 Data synchronization method for network management system

Also Published As

Publication number Publication date
CN105704169A (en) 2016-06-22

Similar Documents

Publication Publication Date Title
CN108270669B (en) Service recovery device, main controller, system and method of SDN network
JP5643433B2 (en) Method and apparatus for protocol event management
EP2045965B1 (en) Resource state monitoring method, device and communication network
WO2021018309A1 (en) Method, device and system for determination of message transmission path, and computer storage medium
US9026632B2 (en) Network with a network wide extended policy framework
JP5530864B2 (en) Network system, management server, and management method
CN111934936B (en) Network state detection method and device, electronic equipment and storage medium
US10237124B2 (en) Network operation, administration, and maintenance (OAM) method, apparatus, and system
US20200382396A1 (en) Data packet loss detection
CN110445697B (en) Video big data cloud platform equipment access service method
KR20150002474A (en) Methods for recovering failure in communication networks
CN111106970A (en) Data monitoring method and device, electronic equipment and readable storage medium
WO2016082368A1 (en) Data consistency maintaining method, device and ptn transmission apparatus
WO2016082509A1 (en) Method and apparatus for detecting connectivity of label switched path
Basu et al. Architecture of a cloud-based fault-tolerant control platform for improving the qos of social multimedia applications on sd-wan
CN104618148A (en) Firewall device and backup method thereof
EP2596601B1 (en) Logging control plane events
JP2006148376A (en) Network monitoring system, network superordinate monitoring system, network subordinate monitoring system, and network monitoring method
JP2010245841A (en) Method and device for managing network, and network apparatus
CN113890850B (en) Route disaster recovery system and method
Kim et al. Protection switching methods for point‐to‐multipoint connections in packet transport networks
EP2640003A1 (en) Network with a network wide extended policy framework
CN112583650A (en) SR-BE tunnel link detection method and system in SPN
Gammel et al. Ambassador Project Final Tech Report
JP2020136992A (en) Network management system, network management method, and network management program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15863681

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15863681

Country of ref document: EP

Kind code of ref document: A1