[go: up one dir, main page]

CN106657168A - Method, device and system for synchronizing data - Google Patents

Method, device and system for synchronizing data Download PDF

Info

Publication number
CN106657168A
CN106657168A CN201510448471.3A CN201510448471A CN106657168A CN 106657168 A CN106657168 A CN 106657168A CN 201510448471 A CN201510448471 A CN 201510448471A CN 106657168 A CN106657168 A CN 106657168A
Authority
CN
China
Prior art keywords
control unit
data
main control
state
active
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
CN201510448471.3A
Other languages
Chinese (zh)
Inventor
刘伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510448471.3A priority Critical patent/CN106657168A/en
Priority to PCT/CN2016/070431 priority patent/WO2017016196A1/en
Publication of CN106657168A publication Critical patent/CN106657168A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • 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
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Hardware Redundancy (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提供了一种同步数据方法、装置及系统,主用主控单元接收业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元;主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到备用主控单元;主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元,解决了数据不同步导致的异常故障的问题,实现了各单元数据的一致性,节约了维护成本。

The present invention provides a method, device and system for synchronizing data. The main control unit receives the application status data sent by the service processing unit, and the main control unit modifies the application status data into unsynchronized status data. The main control unit synchronizes the unsynchronized state data to the business processing unit; the active main control unit modifies the unsynchronized state data to the synchronizing state data, and the active main control unit synchronizes the synchronizing state data to the standby main control unit unit; the active main control unit receives the confirmation message, and the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the synchronizing state data as For the data in the synchronized state, the main control unit synchronizes the data in the synchronized state to the business processing unit, which solves the problem of abnormal faults caused by data out of synchronization, realizes the consistency of data in each unit, and saves maintenance costs .

Description

同步数据方法、装置及系统Method, device and system for synchronizing data

技术领域technical field

本发明涉及通信领域,具体而言,涉及一种同步数据方法、装置及系统。The present invention relates to the communication field, in particular to a method, device and system for synchronizing data.

背景技术Background technique

在同步数字体系(Synchronous Digital Hierarchy,简称为SDH)设备,密集型光波复用(Dense Wavelength Division Multiplexing,简称为DWDM)设备,分组传送网(PacketTransport Network,简称为PTN)设备,网络控制协议(Network Control Protocol,简称为NCP)设备,以及光传送网(Optical Transport Network,简称为OTN)设备中,由于其承载的业务具有非常高的实时性和可靠性要求,主控单元作为设备配置数据的数据中心,其配置数据的同步功能非常重要。主控单元往往存在一个或多个备用主控单元,也就是说,配置数据的同步,包括两个内容:主控单元与备用主控单元之间的数据同步,这个同步是复制、备份的动作;主控单元与业务处理单元的数据同步,这个同步是下发、应答的动作。In Synchronous Digital Hierarchy (SDH) equipment, Dense Wavelength Division Multiplexing (DWDM) equipment, Packet Transport Network (PTN) equipment, Network Control Protocol (Network Control Protocol, referred to as NCP) equipment, and Optical Transport Network (Optical Transport Network, referred to as OTN) equipment, because the services carried by them have very high real-time and reliability requirements, the main control unit is used as the data of equipment configuration data Center, the synchronization function of its configuration data is very important. The main control unit often has one or more backup main control units, that is to say, the synchronization of configuration data includes two contents: the data synchronization between the main control unit and the standby main control unit, this synchronization is the action of copying and backup ; Data synchronization between the main control unit and the business processing unit, this synchronization is an action of sending and answering.

在相关技术中,这两个数据同步是独立运行的。这样虽然处理简单,但往往效果不佳,比如:当主控单元下发数据时,如果此时主控单元发生故障,主控的数据配置未同步成功,备用主控单元又没有这个数据,往往数据会出现异常,导致设备运行异常,甚至导致业务中断,无法恢复。而这些因为数据不一致导致的问题,往往非常复杂,难以定位和排除,会大大增加设备维护的人力、物力,造成资源浪费。In related technologies, the two data synchronizations operate independently. Although the processing is simple, the effect is often not good. For example: when the main control unit sends data, if the main control unit fails at this time, the data configuration of the main control unit is not synchronized successfully, and the backup main control unit does not have this data, often Data will be abnormal, resulting in abnormal operation of equipment, and even business interruption, which cannot be recovered. These problems caused by data inconsistency are often very complicated and difficult to locate and eliminate, which will greatly increase the manpower and material resources for equipment maintenance, resulting in waste of resources.

针对相关技术中,数据不同步导致的异常故障,目前尚未提出有效的解决方案。Aiming at the abnormal failure caused by data out-of-sync in related technologies, no effective solution has been proposed yet.

发明内容Contents of the invention

本发明提供了一种同步数据方法、装置及系统,以至少解决相关技术中数据不同步导致的异常故障的问题。The present invention provides a method, device and system for synchronizing data, so as to at least solve the problem of abnormal faults caused by data out-of-sync in the related art.

根据本发明的一个方面,提供了一种数据同步方法,包括:According to one aspect of the present invention, a data synchronization method is provided, including:

主用主控单元接收业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The active main control unit receives the application status data sent by the service processing unit, the main main control unit modifies the application status data to unsynchronized state data, and the active main control unit synchronizes the unsynchronized state data to the business processing unit;

所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到备用主控单元;The active main control unit modifies the unsynchronized state data to the synchronizing state data, and the active main control unit synchronizes the synchronizing state data to the standby main control unit;

所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The active main control unit receives a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the The data in the synchronizing state is the data in the synchronizing state, and the master main control unit synchronizes the data in the synchronizing state to the service processing unit.

进一步地,所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;Further, the active master control unit receives the active-standby switchover event, and sends the active-standby switchover event to the service processing unit;

在所述业务处理单元中的数据状态均是已同步状态的情况下,所述主用主控单元接收所述业务处理单元发送的同步完成事件。In the case that the data states in the service processing unit are all in the synchronized state, the active master control unit receives the synchronization completion event sent by the service processing unit.

进一步地,所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;Further, the active master control unit receives the active-standby switchover event, and sends the active-standby switchover event to the service processing unit;

在所述业务处理单元包括所述未同步状态数据或者所述申请状态数据的情况下,所述主用主控单元接收正在同步状态数据,其中,所述正在同步状态数据是所述业务处理单元将所述未同步状态数据或者所述申请状态数据修改的;In the case that the service processing unit includes the unsynchronized status data or the application status data, the active master control unit receives the synchronizing status data, wherein the synchronizing status data is the status data of the service processing unit Modifying the unsynchronized status data or the application status data;

所述主用主控单元将所述正在同步状态数据修改为未同步状态数据,所述主用主控单元发送所述未同步状态数据给所述备用主控单元;The active main control unit modifies the synchronizing state data into unsynchronized state data, and the active main control unit sends the unsynchronized state data to the standby main control unit;

所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述未同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The active main control unit receives a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the The data in the unsynchronized state is the data in the synchronized state, and the master main control unit synchronizes the data in the synchronized state to the service processing unit.

根据本发明的另一个方面,还提供了一种数据同步方法,包括:According to another aspect of the present invention, a data synchronization method is also provided, including:

主用主控单元接收备用主控单元的上线事件,所述主用主控单元将未同步状态数据修改为正在同步状态,所述主用主控单元发送所述正在同步状态数据到所述备用主控单元;The active main control unit receives the online event of the standby main control unit, the active main control unit modifies the unsynchronized state data to the synchronizing state, and the active main control unit sends the synchronizing state data to the standby main control unit;

所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The active main control unit receives a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the The data in the synchronizing state is the data in the synchronizing state, and the master main control unit synchronizes the data in the synchronizing state to the service processing unit.

进一步地,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据之后,所述方法包括:Further, after the active master control unit modifies the data in the synchronizing state to the data in the synchronizing state, the method includes:

所述主用主控单元向所述备用主控单元发送同步完成事件,所述备用主控单元将本地不是已同步状态数据删除。The active main control unit sends a synchronization completion event to the standby main control unit, and the standby main control unit deletes the local data that is not in a synchronized state.

根据本发明的另一个方面,还提供了一种数据同步装置,包括:According to another aspect of the present invention, a data synchronization device is also provided, including:

第一接收模块,用于主用主控单元接收业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The first receiving module is used for the active main control unit to receive the application status data sent by the service processing unit, the active main control unit modifies the application status data to unsynchronized state data, and the active main control unit will The unsynchronized state data is synchronized to the business processing unit;

第一修改模块,用于所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到备用主控单元;The first modification module is used for the active main control unit to modify the unsynchronized state data to the synchronizing state data, and the active main control unit synchronizes the synchronizing state data to the standby main control unit;

第一确认模块,用于所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The first confirmation module is used for the active main control unit to receive a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit The main control unit is used to synchronize the data in the synchronized state to the service processing unit.

进一步地,第一倒换模块,用于所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;Further, the first switching module is used for the active main control unit to receive the active-standby switchover event, and send the active-standby switchover event to the service processing unit;

第二接收模块,用于在所述业务处理单元中的数据状态均是已同步状态的情况下,所述主用主控单元接收所述业务处理单元发送的同步完成事件。The second receiving module is configured to receive, by the active master control unit, a synchronization completion event sent by the service processing unit when the data states in the service processing unit are all in a synchronized state.

进一步地,第二倒换模块,用于所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;Further, the second switching module is used for the active main control unit to receive the active-standby switchover event, and send the active-standby switchover event to the service processing unit;

第三接收模块,用于在所述业务处理单元包括所述未同步状态数据或者所述申请状态数据的情况下,所述主用主控单元接收正在同步状态数据,其中,所述正在同步状态数据是所述业务处理单元将所述未同步状态数据或者所述申请状态数据修改的;The third receiving module is configured to, when the service processing unit includes the unsynchronized state data or the application state data, the active main control unit receives the synchronizing state data, wherein the synchronizing state The data is modified by the business processing unit from the unsynchronized status data or the application status data;

第二修改模块,用于所述主用主控单元将所述正在同步状态数据修改为未同步状态数据,所述主用主控单元发送所述未同步状态数据给所述备用主控单元;The second modification module is used for the active main control unit to modify the synchronizing state data to unsynchronized state data, and the active main control unit sends the unsynchronized state data to the standby main control unit;

第二确认模块,用于所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述未同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The second confirmation module is used for the active main control unit to receive a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit The master control unit modifies the data in the unsynchronized state to the data in the synchronized state, and the master master control unit synchronizes the data in the synchronized state to the service processing unit.

根据本发明的另一个方面,还提供了一种数据同步装置,包括:According to another aspect of the present invention, a data synchronization device is also provided, including:

第三修改模块,用于主用主控单元接收备用主控单元的上线事件,所述主用主控单元将未同步状态数据修改为正在同步状态,所述主用主控单元发送所述正在同步状态数据到所述备用主控单元;The third modification module is used for the active main control unit to receive the online event of the standby main control unit, the active main control unit modifies the unsynchronized state data to the synchronizing state, and the active main control unit sends the in-progress synchronizing status data to the standby master control unit;

第三确认模块,用于所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The third confirmation module is used for the active main control unit to receive a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit The master control unit modifies the data in the synchronizing state to the data in the synchronized state, and the master master control unit synchronizes the data in the synchronized state to the service processing unit.

进一步地,所述装置包括:Further, the device includes:

删除模块,用于所述主用主控单元向所述备用主控单元发送同步完成事件,所述备用主控单元将本地不是已同步状态数据删除。A deletion module, configured for the active main control unit to send a synchronization completion event to the standby main control unit, and the standby main control unit deletes the local data that is not in a synchronized state.

根据本发明的另一个方面,还提供了一种数据同步系统,包括:主用主控单元,备用主控单元,业务处理单元;According to another aspect of the present invention, a data synchronization system is also provided, including: an active main control unit, a standby main control unit, and a service processing unit;

所述主用主控单元接收所述业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The active main control unit receives the application state data sent by the service processing unit, the active main control unit modifies the application state data into unsynchronized state data, and the active main control unit modifies the unsynchronized state data. The synchronization state data is synchronized to the business processing unit;

所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到所述备用主控单元;The active main control unit modifies the unsynchronized state data to the synchronizing state data, and the active main control unit synchronizes the synchronizing state data to the standby main control unit;

所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The active main control unit receives a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the The data in the synchronizing state is the data in the synchronizing state, and the master main control unit synchronizes the data in the synchronizing state to the service processing unit.

通过本发明,采用主用主控单元接收业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元;该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到备用主控单元;该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元,解决了数据不同步导致的异常故障的问题,实现了各单元数据的一致性,节约了维护成本。Through the present invention, the main control unit is used to receive the application status data sent by the service processing unit, the main control unit modifies the application status data into unsynchronized status data, and the main control unit modifies the unsynchronized status data Synchronize to the business processing unit; the active master control unit modifies the unsynchronized state data to the synchronizing state data, and the active master control unit synchronizes the synchronizing state data to the standby master control unit; the active master control unit Receiving a confirmation message, the confirmation message includes the confirmation content of the backup master control unit modifying the synchronizing state data to the synchronized state data, the active master control unit modifies the synchronizing state data to the synchronized state data, the The main control unit synchronizes the data in the synchronized state to the business processing unit, which solves the problem of abnormal faults caused by data asynchronization, realizes the consistency of data in each unit, and saves maintenance costs.

附图说明Description of drawings

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:

图1是根据本发明实施例的一种数据同步方法的流程图一;FIG. 1 is a flow chart 1 of a data synchronization method according to an embodiment of the present invention;

图2是根据本发明实施例的一种数据同步方法的流程图二;FIG. 2 is a second flowchart of a data synchronization method according to an embodiment of the present invention;

图3是根据本发明实施例的一种数据同步装置的结构框图一;FIG. 3 is a structural block diagram 1 of a data synchronization device according to an embodiment of the present invention;

图4是根据本发明实施例的一种数据同步装置的结构框图二;FIG. 4 is a second structural block diagram of a data synchronization device according to an embodiment of the present invention;

图5是根据本发明优选实施例的数据正常同步流程示意图;5 is a schematic diagram of a normal data synchronization process according to a preferred embodiment of the present invention;

图6是根据本发明优选实施例的进行主备倒换流程示意图;FIG. 6 is a schematic diagram of a flow chart of active/standby switchover according to a preferred embodiment of the present invention;

图7是根据本发明优选实施例的主备NCP进行正常数据同步过程中进行主备倒换流程示意图;Fig. 7 is a schematic diagram of the master-standby switchover process during the normal data synchronization process of the master-standby NCP according to a preferred embodiment of the present invention;

图8是根据本发明优选实施例的插上备NCP进行数据批量同步流程示意图;Fig. 8 is a schematic flow diagram of plugging in a standby NCP to perform data batch synchronization according to a preferred embodiment of the present invention;

图9是根据本发明优选实施例的主备进行数据同步过程中发生主备倒换流程示意图。Fig. 9 is a schematic diagram of a master-standby switchover process during data synchronization between the master and the backup according to a preferred embodiment of the present invention.

具体实施方式detailed description

下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and examples. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first" and "second" in the description and claims of the present invention and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence.

在本实施例中提供了一种数据同步方法,图1是根据本发明实施例的一种数据同步方法的流程图一,如图1所示,该流程包括如下步骤:In this embodiment, a data synchronization method is provided. FIG. 1 is a flow chart 1 of a data synchronization method according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:

步骤S102,主用主控单元接收业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元;Step S102, the active main control unit receives the application status data sent by the service processing unit, the main main control unit modifies the application status data into unsynchronized state data, and the active main control unit synchronizes the unsynchronized state data to the business processing unit;

步骤S104,该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到备用主控单元;Step S104, the active master control unit modifies the unsynchronized state data to the synchronizing state data, and the active master control unit synchronizes the synchronizing state data to the standby master control unit;

步骤S106,该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。Step S106, the active main control unit receives a confirmation message, the confirmation message includes the confirmation content of the standby main control unit modifying the synchronizing state data to the synchronized state data, and the active main control unit modifies the synchronizing state data The data is data in a synchronized state, and the master main control unit synchronizes the data in a synchronized state to the service processing unit.

通过上述步骤,主用主控单元接收业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元,该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到备用主控单元,该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元,解决了数据不同步导致的异常故障的问题,实现了各单元数据的一致性,节约了维护成本。Through the above steps, the active main control unit receives the application status data sent by the business processing unit, the main main control unit modifies the application status data into unsynchronized state data, and the active main control unit synchronizes the unsynchronized state data For the service processing unit, the active master control unit modifies the unsynchronized state data to the synchronizing state data, the active master control unit synchronizes the synchronizing state data to the standby master control unit, and the active master control unit receives A confirmation message, the confirmation message includes the confirmation content that the standby master control unit modifies the synchronized state data to the synchronized state data, the active master control unit modifies the synchronized state data to the synchronized state data, the master Using the main control unit to synchronize the data in the synchronized state to the business processing unit solves the problem of abnormal faults caused by data asynchronization, realizes the consistency of data in each unit, and saves maintenance costs.

在本实施例中,该主用主控单元收到主备倒换事件,向该业务处理单元发送该主备倒换事件,在该业务处理单元中的数据状态均是已同步状态的情况下,该主用主控单元接收该业务处理单元发送的同步完成事件。In this embodiment, the active master control unit receives the active-standby switchover event and sends the active-standby switchover event to the service processing unit. The master main control unit receives the synchronization completion event sent by the service processing unit.

在本实施例中,该主用主控单元收到主备倒换事件,向该业务处理单元发送该主备倒换事件,在该业务处理单元包括该未同步状态数据或者该申请状态数据的情况下,该主用主控单元接收正在同步状态数据,其中,该正在同步状态数据是该业务处理单元将该未同步状态数据或者该申请状态数据修改的,该主用主控单元将该正在同步状态数据修改为未同步状态数据,该主用主控单元发送该未同步状态数据给该备用主控单元,该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该未同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。In this embodiment, the active master control unit receives the active-standby switchover event, and sends the active-standby switchover event to the service processing unit. In the case that the service processing unit includes the unsynchronized state data or the application state data , the active main control unit receives the synchronizing state data, wherein the synchronizing state data is the unsynchronized state data or the application state data modified by the business processing unit, and the active main control unit modifies the synchronizing state data The data is modified to unsynchronized state data, the active master control unit sends the unsynchronized state data to the standby master control unit, and the active master control unit receives an acknowledgment message, the acknowledgment message includes that the standby master control unit will be synchronizing The state data modifies the confirmation content of the synchronized state data, the active master control unit modifies the unsynchronized state data to the synchronized state data, and the active master control unit synchronizes the synchronized state data to the business processing unit .

在本实施例中提供了一种数据同步方法,图2是根据本发明实施例的一种数据同步方法的流程图二,如图2所示,该流程包括如下步骤:In this embodiment, a data synchronization method is provided. FIG. 2 is a flowchart 2 of a data synchronization method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:

步骤S202,主用主控单元接收备用主控单元的上线事件,该主用主控单元将未同步状态数据修改为正在同步状态,该主用主控单元发送该正在同步状态数据到该备用主控单元;Step S202, the active main control unit receives the online event of the standby main control unit, the main main control unit modifies the unsynchronized state data to the synchronizing state, and the active main control unit sends the synchronizing state data to the standby main control unit control unit;

步骤S204,该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。Step S204, the active main control unit receives a confirmation message, the confirmation message includes the confirmation content of the standby main control unit modifying the synchronizing state data to the synchronized state data, and the active main control unit modifies the synchronizing state data The data is data in a synchronized state, and the master main control unit synchronizes the data in a synchronized state to the service processing unit.

通过上述步骤,在主用主控单元接收备用主控单元上线事件,该主用主控单元将未同步状态数据修改为正在同步状态,该主用主控单元发送该正在同步状态数据到该备用主控单元,该主用主控单元接收该备用主控单元将该正在同步状态数据修改为已同步状态数据的确认后,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元,解决了数据不同步导致的异常故障的问题,实现了各单元数据的一致性,节约了维护成本。Through the above steps, when the active main control unit receives the online event of the standby main control unit, the main main control unit modifies the unsynchronized state data to the synchronizing state, and the active main control unit sends the synchronizing state data to the standby The master control unit, after the active master control unit receives the confirmation from the backup master control unit that the data in the synchronizing state has been modified to the data in the synchronized state, the master master control unit modifies the data in the synchronizing state to the data in the synchronized state Data, the main control unit synchronizes the synchronized data to the business processing unit, which solves the problem of abnormal faults caused by data out-of-sync, realizes the consistency of data in each unit, and saves maintenance costs.

在本实施例中,该主用主控单元修改该正在同步状态的数据为已同步状态的数据之后,该方法包括:该主用主控单元向该备用主控单元发送同步完成事件,该备用主控单元将本地不是已同步状态数据删除。In this embodiment, after the active main control unit modifies the data in the synchronizing state to the data in the synchronized state, the method includes: the active main control unit sends a synchronization completion event to the standby main control unit, and the standby main control unit The main control unit deletes the local data that is not in the synchronized state.

在本实施例中还提供了一种数据同步装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a data synchronization device is also provided, which is used to implement the above embodiments and preferred implementation modes, and what has already been described will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.

图3是根据本发明实施例的一种数据同步装置的结构框图一,如图3所示,该装置包括:Fig. 3 is a structural block diagram 1 of a data synchronization device according to an embodiment of the present invention. As shown in Fig. 3, the device includes:

第一接收模块32,用于主用主控单元接收业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元;The first receiving module 32 is used for the main control unit to receive the application status data sent by the business processing unit, the main control unit modifies the application status data to unsynchronized status data, and the main control unit modifies the unsynchronized status data. The synchronization state data is synchronized to the business processing unit;

第一修改模块34,用于该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到备用主控单元;The first modifying module 34 is used for the active main control unit to modify the unsynchronized state data to the synchronizing state data, and the active main control unit synchronizes the synchronizing state data to the standby main control unit;

第一确认模块36,用于该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。The first confirmation module 36 is used for the active main control unit to receive a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the The data in the synchronizing state is the data in the synchronizing state, and the main control unit synchronizes the data in the synchronizing state to the service processing unit.

在本实施例中,该装置还包括:第一倒换模块,用于该主用主控单元收到主备倒换事件,向该业务处理单元发送该主备倒换事件;In this embodiment, the device further includes: a first switching module, configured for the active main control unit to receive the active-standby switchover event, and send the active-standby switchover event to the service processing unit;

第二接收模块,用于在该业务处理单元中的数据状态均是已同步状态的情况下,该主用主控单元接收该业务处理单元发送的同步完成事件。The second receiving module is configured to receive the synchronization completion event sent by the service processing unit when the data states in the service processing unit are all in the synchronized state.

在本实施例中,该装置还包括:第二倒换模块,用于该主用主控单元收到主备倒换事件,向该业务处理单元发送该主备倒换事件;In this embodiment, the device further includes: a second switching module, configured for the active main control unit to receive the active-standby switchover event and send the active-standby switchover event to the service processing unit;

第三接收模块,用于在该业务处理单元包括该未同步状态数据或者该申请状态数据的情况下,该主用主控单元接收正在同步状态数据,其中,该正在同步状态数据是该业务处理单元将该未同步状态数据或者该申请状态数据修改的;The third receiving module is configured to receive the synchronizing status data by the active main control unit when the business processing unit includes the unsynchronized status data or the application status data, wherein the synchronizing status data is the business processing The unit modifies the unsynchronized status data or the application status data;

第二修改模块,用于该主用主控单元将该正在同步状态数据修改为未同步状态数据,该主用主控单元发送该未同步状态数据给该备用主控单元;The second modifying module is used for the active main control unit to modify the synchronizing state data into unsynchronized state data, and the active main control unit sends the unsynchronized state data to the standby main control unit;

第二确认模块,用于该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该未同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。The second confirmation module is used for the active main control unit to receive a confirmation message, the confirmation message includes the confirmation content of the standby main control unit modifying the synchronizing state data to the synchronized state data, and the active main control unit modifies the The data in the unsynchronized state is the data in the synchronized state, and the master main control unit synchronizes the data in the synchronized state to the service processing unit.

图4是根据本发明实施例的一种数据同步装置的结构框图二,如图4所示,该装置包括:Fig. 4 is a structural block diagram 2 of a data synchronization device according to an embodiment of the present invention. As shown in Fig. 4, the device includes:

第三修改模块42,用于主用主控单元接收备用主控单元的上线事件,该主用主控单元将未同步状态数据修改为正在同步状态,该主用主控单元发送该正在同步状态数据到该备用主控单元;The third modification module 42 is used for the active main control unit to receive the online event of the standby main control unit, the main main control unit modifies the unsynchronized state data to the synchronizing state, and the active main control unit sends the synchronizing state data to the standby main control unit;

第三确认模块44,用于该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。The third confirmation module 44 is used for the active main control unit to receive a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the The data in the synchronizing state is the data in the synchronizing state, and the main control unit synchronizes the data in the synchronizing state to the service processing unit.

在本实施例中,该装置还包括:In this embodiment, the device also includes:

删除模块,用于该主用主控单元向该备用主控单元发送同步完成事件,该备用主控单元将本地不是已同步状态数据删除。The deletion module is used for the active main control unit to send a synchronization completion event to the standby main control unit, and the standby main control unit deletes the local data that is not in the synchronized state.

在本发明的另一个实施例中,还提供了一种数据同步系统,包括:主用主控单元,备用主控单元,业务处理单元;In another embodiment of the present invention, a data synchronization system is also provided, including: an active main control unit, a standby main control unit, and a business processing unit;

该主用主控单元接收该业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元;The active main control unit receives the application status data sent by the business processing unit, the main main control unit modifies the application status data into unsynchronized state data, and the active main control unit synchronizes the unsynchronized state data to the business processing unit;

该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到该备用主控单元;The active main control unit modifies the unsynchronized state data into synchronizing state data, and the active main control unit synchronizes the synchronizing state data to the standby main control unit;

该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。The active main control unit receives the confirmation message, and the confirmation message includes the confirmation content that the backup main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the synchronizing state data as already For the data in the synchronized state, the main control unit synchronizes the data in the synchronized state to the service processing unit.

下面结合优选实施例和实施方式对本发明进行详细说明。The present invention will be described in detail below in combination with preferred embodiments and implementation modes.

本优选实施例提供一种数据同步机制实现主用主控单元、备用主控单元以及业务处理单元(可能存在多个)数据一致性,其中,主用主控单元、备用主控单元以及业务处理单元和上述实施例中的主用主控单元、备用主控单元以及业务处理单元功能和作用相同,避免因为数据不一致导致的一系列问题。This preferred embodiment provides a data synchronization mechanism to realize the data consistency of the main main control unit, the backup main control unit and the service processing unit (there may be multiple). The functions and functions of the units are the same as those of the active main control unit, backup main control unit and business processing unit in the above embodiments, and a series of problems caused by data inconsistency can be avoided.

本优选实施例所述方法将主控单元分为“主用状态”、“备用状态”、“主备状态”以及“数据恢复状态”三种状态。其中“主用状态”表示只有主用主控单元,没有备用主控单元;“备用状态”表示同时有主用主控单元和备用主控单元,本单元是备用主控单元;“主备状态”表示同时有主用主控单元和备用主控单元,本单元是主用主控单元。“数据恢复状态”经过主备倒换后,主控单元和业务处理单元进行数据恢复的一种暂态。不存在只有备用主控单元,没有主用主控单元的情况。主控单元之间可以通过任何方式进行状态协商。The method described in this preferred embodiment divides the main control unit into three states: "main state", "standby state", "main-standby state" and "data recovery state". Among them, "active state" means that there is only active main control unit, and there is no standby main control unit; ” means that there are both active main control unit and standby main control unit, and this unit is the main main control unit. "Data recovery state" is a transient state in which the main control unit and business processing unit perform data recovery after active/standby switchover. There is no situation where there is only a standby main control unit and no active main control unit. The state negotiation between the main control units can be carried out in any way.

本优选实施例将所需同步的数据分为“申请状态”、“未同步状态”、“正在同步状态”以及“已同步状态”,该数据的“申请状态”、“未同步状态”、“正在同步状态”以及“已同步状态”与上述实施例中的申请状态数据,未同步状态数据,正在同步状态数据,已同步状态数据的功能和作用相同。In this preferred embodiment, the data to be synchronized is divided into "application status", "unsynchronized status", "synchronizing status" and "synchronized status", and the "application status", "unsynchronized status", " "Synchronizing status" and "Synchronized status" have the same functions and functions as the application status data, unsynchronized status data, synchronizing status data, and synchronized status data in the above-mentioned embodiments.

下面分别阐述主用主控单元、备用主控单元和业务处理单元的操作步骤。The operation steps of the active main control unit, the backup main control unit and the service processing unit are described respectively below.

一、主用主控单元操作步骤。1. Operation steps of the master main control unit.

如果主用主控单元处于“主用状态”,针对如下事件的处理方法:If the active main control unit is in the "active state", the processing method for the following events:

1.收到业务处理单元的申请数据事件,进行相应处理后,将数据设置为“未同步状态”,保存到本地并下发到业务处理单元。下发到业务处理单元的数据,携带的状态为“未同步状态”。主控单元下发到业务处理单元的数据不仅可以携带状态信息,还可以携带其它信息,比如数据的唯一标识信息。1. After receiving the application data event from the business processing unit, after corresponding processing, set the data to "unsynchronized state", save it locally and send it to the business processing unit. The data sent to the service processing unit carries the status of "unsynchronized status". The data delivered by the main control unit to the service processing unit can not only carry status information, but also carry other information, such as unique identification information of the data.

2.收到备用主控单元在线事件,将本地保存的,并且是“未同步状态”的数据设置为“正在同步状态”,然后将本单元的状态设置为“主备状态”,开始同步数据到备用主控单元。2. After receiving the online event of the standby main control unit, set the data saved locally and in the "unsynchronized state" to "synchronizing state", and then set the state of this unit to "active and standby state" to start synchronizing data to the standby master control unit.

3.收到同步完成事件,不处理。3. The synchronization completion event is received and not processed.

4.收到其它事件,记录异常日志。4. When other events are received, record the exception log.

如果主用主控单元处于“主备状态”,针对如下事件的处理方法:If the active main control unit is in the "active/standby state", the processing method for the following events:

1.收到业务处理单元的申请数据事件,查找本地数据,如果不存在此数据,对数据进行相应处理后,将数据设置为“未同步状态”,保存到本地并同步给备用主控单元;如果本地已经存在此数据,并且处于“已同步状态”,将数据携带本地状态下发到线卡;如果本地数据处于其它状态,不处理。1. After receiving the application data event from the business processing unit, search for local data. If the data does not exist, after processing the data accordingly, set the data to "unsynchronized state", save it locally and synchronize it to the standby master control unit; If the data already exists locally and is in the "synchronized state", send the data to the line card in the local state; if the local data is in other states, it will not be processed.

2.收到备用主控单元的数据确认事件,如果本地数据处于“正在同步状态”,将数据设置为“已同步状态”,并判断如果没有“正在同步状态”的数据,则向备用主控单元和业务处理单元发送同步完成事件;如果本地数据处于“未同步状态”,将数据设置为“已同步状态”,并下发给业务处理单元;如果本地数据处于其它状态,不做任何处理。2. After receiving the data confirmation event from the standby master control unit, if the local data is in the "synchronizing state", set the data to the "synchronized state", and judge that if there is no data in the "synchronizing state", send the data to the standby master control unit The unit and the business processing unit send synchronization completion events; if the local data is in the "unsynchronized state", set the data to the "synchronized state" and send it to the business processing unit; if the local data is in other states, do nothing.

3.收到主备倒换事件,将本单元设置为“备用状态”。3. After receiving the master-standby switchover event, set the unit to "standby state".

4.收到备用主控单元离线事件,将所有数据设置为“未同步状态”,向业务处理单元发送同步清除事件,将本单元设置为“主用状态”。4. After receiving the offline event of the standby main control unit, set all data to "unsynchronized state", send a synchronization clear event to the business processing unit, and set this unit to "active state".

5.收到其它事件,记录异常日志。5. When other events are received, record the exception log.

二、备用主控单元操作步骤。2. Operation steps of standby main control unit.

备用主控单元是处于“备用状态”的主控单元,针对如下事件的处理方法:The standby main control unit is the main control unit in the "standby state", and the processing method for the following events:

1..收到主用主控单元发送的数据事件,将数据保存到本地,并设置数据为“已同步状态”,向主用主控单元发送数据确认事件。1. After receiving the data event sent by the main control unit, save the data locally, set the data to "synchronized state", and send a data confirmation event to the main control unit.

2.收到主用主控单元发送的同步完成事件,将本地不是“已同步状态”的数据全部删除。2. After receiving the synchronization completion event sent by the main control unit, all the local data that is not in the "synchronized state" are deleted.

3.收到主备倒换事件,先将本地不是“已同步状态”的数据全部删除,向业务处理单元发送主备倒换事件,将本单元设置为“数据恢复状态”。3. Upon receipt of the master-standby switchover event, first delete all local data that is not in the "synchronized state", send the master-standby switchover event to the business processing unit, and set the unit to the "data recovery state".

4.收到主用主控单元离线事件,将本地所有数据修改为“未同步状态”,向业务处理单元发送主备倒换事件,将本单元设置为“主用状态”。4. After receiving the off-line event of the active main control unit, modify all local data to "unsynchronized state", send the active/standby switchover event to the business processing unit, and set this unit to "active state".

5.收到其它事件,记录异常日志。5. When other events are received, record the exception log.

主控单元处于“数据恢复状态”的操作步骤:Operation steps when the main control unit is in the "data recovery state":

1.收到业务处理单元的数据申请事件,如果本地已经存在该数据,将本地数据设置为“未同步状态”,向备用主控单元同步该数据;如果本地不存在该数据,将数据保存到本地,设置为“未同步状态”,向备用主控单元同步该数据。1. After receiving the data application event from the business processing unit, if the data already exists locally, set the local data to "unsynchronized state" and synchronize the data to the standby master control unit; if the data does not exist locally, save the data to Local, set to "unsynchronized state", and synchronize the data to the standby master control unit.

2.收到备用主控单元的数据确认事件,将本地数据修改为“已同步状态”,向业务处理单元回送数据。2. After receiving the data confirmation event from the standby main control unit, modify the local data to "synchronized state", and send the data back to the business processing unit.

3.收到同步完成事件,删除本地不是“已同步状态”的数据,向备用主控单元发送同步完成时间,设置本板为“主备状态”。3. After receiving the synchronization completion event, delete the local data that is not in the "synchronized state", send the synchronization completion time to the standby master control unit, and set the board as the "active state".

4.收到其它事件,记录异常日志。4. When other events are received, record the exception log.

三、业务处理单元操作步骤。3. Operation steps of the business processing unit.

业务处理单元需要处理业务配置,并根据需要将业务数据同步到主控单元,业务处理单元如何处理业务配置不属于本发明讨论范围。业务处理单元只和主用主控单元进行通信,不和备用主控单元进行通信。业务处理单元针对如下事件的处理方法:The service processing unit needs to process the service configuration and synchronize the service data to the main control unit as required. How the service processing unit processes the service configuration does not belong to the discussion scope of the present invention. The service processing unit only communicates with the active main control unit, and does not communicate with the standby main control unit. The processing method of the business processing unit for the following events:

1.收到业务配置事件,根据需要将业务数据发送到主用主控单元,并在本地将数据设置为“申请状态”。1. After receiving the service configuration event, send the service data to the active main control unit as needed, and set the data locally to "application state".

2.收到主用主控单元下发的数据确认事件,如果本地数据处于“正在同步状态”,将本地数据修改为“已同步状态”,并判断如果没有“正在同步状态”的数据,向主用主控单元发送同步完成事件;如果本地数据处于其它状态,将本地数据修改为“已同步状态”。2. After receiving the data confirmation event sent by the main control unit, if the local data is in the "synchronizing state", modify the local data to "synchronized state", and judge that if there is no "synchronizing state" data, send to The main control unit sends a synchronization completion event; if the local data is in another state, modify the local data to "synchronized state".

3.收到主用主控单元同步完成事件,将本地所有处于“未同步状态”的数据设置为“已同步状态”。3. After receiving the synchronization completion event of the main master control unit, set all the local data in the "unsynchronized state" to the "synchronized state".

4.收到主备倒换事件,将处于“未同步状态”和“申请状态”的数据修改为“正在同步状态”,然后将“正在同步状态”的数据发送给新的主用主控单元;如果所有数据都处于“已同步状态”,则向主用主控单元发送同步完成事件。4. After receiving the master-standby switchover event, modify the data in the "unsynchronized state" and "application state" to "synchronizing state", and then send the data in the "synchronizing state" to the new active master control unit; If all data are in the "synchronized state", a synchronization complete event is sent to the active master control unit.

5.收到同步清除事件,将所有处于“已同步状态”的数据设置为“未同步状态”。5. After receiving the synchronization clear event, set all the data in the "synchronized state" to "unsynchronized state".

6.收到其它事件,记录异常日志。6. When other events are received, record the exception log.

通过上述实施例,各单元可以在任何时刻进行主备倒换,主备倒换后,新的备用主控单元无需重启,可以进行连续的主备倒换。Through the above embodiment, each unit can perform master-standby switchover at any time. After the master-standby switchover, the new standby master control unit can perform continuous master-standby switchover without restarting.

在本发明的另外一个优选实施例中,主控单元是NCP,业务处理单元为线卡。下面针对一个主NCP,一个备NCP,一个线卡的典型情况做具体描述。In another preferred embodiment of the present invention, the main control unit is an NCP, and the service processing unit is a line card. The following describes in detail the typical situation of one active NCP, one standby NCP, and one line card.

场景1,数据正常同步,图5是根据本发明优选实施例的数据正常同步流程示意图,如图5所示。Scenario 1, normal data synchronization, FIG. 5 is a schematic diagram of a normal data synchronization process according to a preferred embodiment of the present invention, as shown in FIG. 5 .

步骤一,线卡向主NCP发送数据1,数据1在线卡上是“申请状态”。Step 1, the line card sends data 1 to the main NCP, and the data 1 is "application status" on the line card.

步骤二,主NCP收到线卡的数据后,保存到本地,并且同步到线卡,数据1在主NCP上是“未同步状态”。Step 2: After receiving the data from the line card, the master NCP saves it locally and synchronizes it to the line card. Data 1 is in an "unsynchronized state" on the master NCP.

步骤三,备NCP收到主NCP的数据后,保存到本地,并发送确认给主NCP,数据1在备NCP上是“已同步状态”。Step 3: After receiving the data from the primary NCP, the standby NCP saves it locally, and sends a confirmation to the primary NCP. The data 1 is in the "synchronized state" on the standby NCP.

步骤四,主NCP收到备NCP的确认后,修改本地数据为“已同步状态”,并发送给线卡。Step 4: After receiving the confirmation from the standby NCP, the master NCP modifies the local data to "synchronized state" and sends it to the line card.

步骤五,线卡收到主NCP的数据后,修改本地数据为“已同步状态”。Step 5: After the line card receives the data from the master NCP, it modifies the local data to "synchronized state".

场景2,数据正常同步后,发生主备倒换场景,图6是根据本发明优选实施例的进行主备倒换流程示意图,如图6所示。Scenario 2: after the data is normally synchronized, a master-standby switchover scenario occurs. FIG. 6 is a schematic diagram of a master-standby switchover process according to a preferred embodiment of the present invention, as shown in FIG. 6 .

步骤一,主NCP收到主备倒换事件,修改本板为“备用状态”。Step 1, the master NCP receives the master-standby switchover event, and modifies the board to be in the "standby state".

步骤二,备NCP收到主备倒换事件,修改本板为“数据恢复状态”,然后向线卡发送主备倒换事件。Step 2: The standby NCP receives the master-standby switchover event, modifies the board to the "data recovery state", and then sends the master-standby switchover event to the line card.

步骤三,线卡收到主备倒换事件,将所有“未同步状态”和“申请状态”的数据修改为“正在同步状态”。在这种场景下所有数据都是“已同步状态”,向主NCP发送同步完成事件。Step 3, the line card receives the active/standby switchover event, and changes all the data of "unsynchronized state" and "application state" to "synchronizing state". In this scenario, all data is in a "synchronized state", and a synchronization completion event is sent to the primary NCP.

场景3,主备NCP进行正常数据同步过程中进行主备倒换。图7是根据本发明优选实施例的主备NCP进行正常数据同步过程中进行主备倒换流程示意图,如图7所示。Scenario 3: Active/standby NCPs perform active/standby switchover during normal data synchronization. Fig. 7 is a schematic diagram of the master-standby switchover process during the normal data synchronization process of the master-standby NCP according to a preferred embodiment of the present invention, as shown in Fig. 7 .

线卡有数据1和数据2,数据1是“已同步状态”,数据2是“未同步状态”。主NCP有数据1和数据2,数据1是“已同步状态”,数据2是“未同步状态”。备NCP有数据1,数据1是“已同步状态”。主NCP还未向备NCP同步数据2时,发生主备倒换。The line card has data 1 and data 2, data 1 is "synchronized state", and data 2 is "unsynchronized state". The master NCP has data 1 and data 2, data 1 is "synchronized state", and data 2 is "unsynchronized state". The standby NCP has data 1, and data 1 is "synchronized state". When the active NCP has not synchronized data 2 to the standby NCP, an active-standby switchover occurs.

步骤一,主NCP收到主备倒换事件,并将本板修改为“备用状态”。Step 1, the master NCP receives the master-standby switchover event, and modifies the board to the "standby state".

步骤二,备NCP收到主备倒换事件,将本板修改为“数据恢复状态”,向线卡发送主备倒换事件。Step 2: The standby NCP receives the master-standby switchover event, modifies the board to the "data recovery state", and sends the master-standby switchover event to the line card.

步骤三,线卡收到主备倒换事件后,将数据2修改为“正在同步状态”,向主NCP发送数据2。Step 3: After receiving the active/standby switchover event, the line card modifies the data 2 to "synchronizing state", and sends the data 2 to the active NCP.

步骤四,主NCP收到线卡的数据2,将数据2保存到本地,设置为“未同步状态”,并向备NCP发送数据2。Step 4, the master NCP receives the data 2 of the line card, saves the data 2 locally, sets it as "unsynchronized state", and sends the data 2 to the standby NCP.

步骤五,备NCP收到主NCP的数据2,将数据2修改为“已同步状态”,并回送数据2确认。Step 5, the standby NCP receives the data 2 of the primary NCP, modifies the data 2 to "synchronized state", and sends back the data 2 for confirmation.

步骤六,主NCP收到数据2确认,将数据2修改为“已同步状态”,向线卡回送数据2。Step 6, the master NCP receives the data 2 confirmation, modifies the data 2 to "synchronized state", and sends the data 2 back to the line card.

步骤七,线卡收到主NCP数据2,将数据2修改为“已同步状态”,向主NCP发送同步完成事件。Step 7, the line card receives the master NCP data 2, modifies the data 2 to "synchronized state", and sends a synchronization completion event to the master NCP.

步骤八,主NCP收到同步完成事件,向备NCP发送同步完成事件。Step 8, the active NCP receives the synchronization completion event, and sends the synchronization completion event to the standby NCP.

步骤九,备NCP收到同步完成事件,不做任何处理。Step 9, the standby NCP receives the synchronization completion event and does not process it.

至此,主NCP、备NCP、线卡三者的数据和状态达到一致。So far, the data and status of the active NCP, standby NCP, and line card are consistent.

场景4,插上备NCP后,主备进行数据批量同步。图8是根据本发明优选实施例的插上备NCP进行数据批量同步流程示意图,如图8所示。Scenario 4: After the standby NCP is plugged in, the master and slave perform batch data synchronization. Fig. 8 is a schematic flow diagram of plugging in a standby NCP to perform data batch synchronization according to a preferred embodiment of the present invention, as shown in Fig. 8 .

线卡和主NCP都有数据1,状态是“未同步状态”。如果插上备NCP板,处理步骤如下:Both the line card and the primary NCP have data 1, and the state is "unsynchronized state". If the standby NCP board is inserted, the processing steps are as follows:

步骤一,主NCP收到备NCP上线事件,将数据1设置为“正在同步状态”,将本板修改为“主备状态”,向备NCP同步数据1。Step 1: The active NCP receives the online event of the standby NCP, sets data 1 to "synchronizing state", changes the board to "active and standby state", and synchronizes data 1 to the standby NCP.

步骤二,备NCP收到数据1,保存到本地,状态为“已同步状态”,向主NCP回送数据1确认。Step 2: The standby NCP receives data 1, saves it locally, and the state is "synchronized", and sends data 1 back to the primary NCP for confirmation.

步骤三,主NCP收到数据1确认,将数据1修改为“已同步状态”,向备NCP和主NCP发送同步完成事件。Step 3: The primary NCP receives the confirmation of data 1, modifies the data 1 to "synchronized state", and sends a synchronization completion event to the standby NCP and the primary NCP.

步骤四,备NCP收到同步完成事件,将所有非“已同步状态”的数据删除,此时无数据需要删除。Step 4, the standby NCP receives the synchronization completion event, and deletes all data that is not in the "synchronized state", and there is no data to be deleted at this time.

步骤五,线卡收到同步完成事件,将数据1修改为“已同步状态”。Step 5, the line card receives the synchronization completion event, and modifies data 1 to "synchronized state".

至此,主NCP、备NCP、线卡三者的数据和状态达到一致。So far, the data and status of the active NCP, standby NCP, and line card are consistent.

场景五,主备进行数据同步过程中,发生主备倒换。图9是根据本发明优选实施例的主备进行数据同步过程中发生主备倒换流程示意图,如图9所示。Scenario 5: During the data synchronization process between the master and the backup, a master-standby switchover occurs. FIG. 9 is a schematic diagram of a master-standby switchover process during data synchronization between the master and the backup according to a preferred embodiment of the present invention, as shown in FIG. 9 .

线卡有数据1,状态为“已同步状态”,数据2,状态为“未同步状态”;主NCP有数据1,状态为“已同步状态”,数据2为“未同步状态”;备NCP有数据1和数据2,状态为“已同步状态”。备NCP还未向主NCP发送数据2确认时,发生主备倒换。The line card has data 1, the state is "synchronized state", data 2, the state is "unsynchronized state"; the primary NCP has data 1, the state is "synchronized state", and data 2 is "unsynchronized state"; the standby NCP There are data 1 and data 2, and the status is "synchronized status". When the standby NCP has not sent a data 2 confirmation to the active NCP, an active/standby switchover occurs.

步骤一,主NCP收到主备倒换事件,将本板设置为“备用状态”。Step 1, the master NCP receives the master-standby switchover event, and sets the board to the "standby state".

步骤二,备NCP收到主备倒换事件,将本板设置为“数据恢复状态”,向线卡发送主备倒换事件。In step 2, the standby NCP receives the master-standby switchover event, sets the board as a "data recovery state", and sends the master-standby switchover event to the line card.

步骤三,线卡收到主备倒换事件,将数据2设置为“正在同步状态”,向主NCP发送数据2。Step 3, the line card receives the active/standby switchover event, sets the data 2 to "synchronizing state", and sends the data 2 to the active NCP.

步骤四,主NCP收到数据2,将数据2修改为“未同步状态”,将数据2同步给备NCP。Step 4, the primary NCP receives the data 2, modifies the data 2 to "unsynchronized state", and synchronizes the data 2 to the standby NCP.

步骤五,备NCP收到数据2,将数据2设置为“已同步状态”,向主NCP发送数据2确认。Step 5, the standby NCP receives data 2, sets data 2 to "synchronized state", and sends data 2 confirmation to the primary NCP.

步骤六,主NCP收到数据2确认,将数据2修改为“已同步状态”,向线卡发送数据2。Step 6, the master NCP receives the data 2 confirmation, modifies the data 2 to "synchronized state", and sends the data 2 to the line card.

步骤七,线卡收到数据2,将数据2修改为“已同步状态”,向主NCP发送同步完成。Step 7, the line card receives the data 2, modifies the data 2 to "synchronized state", and sends the synchronization completion to the master NCP.

步骤八,主NCP收到同步完成,向备NCP发送同步完成事件。Step 8, the primary NCP receives the synchronization completion, and sends a synchronization completion event to the standby NCP.

步骤九,备NCP收到同步完成事件,不处理。Step 9, the standby NCP receives the synchronization completion event and does not process it.

至此,主NCP、备NCP、线卡三者的数据和状态达到一致。So far, the data and status of the active NCP, standby NCP, and line card are consistent.

本优选实施例通过双确认机制,避免因为数据同步导致的异常故障,并且能够从根本上保证主控单元、备用主控单元以及业务处理单元(可能存在多个)的数据在任何时刻都是一致状态的。从而可以避免因为数据不一致导致的一系列问题。This preferred embodiment avoids abnormal failures caused by data synchronization through the double confirmation mechanism, and can fundamentally ensure that the data of the main control unit, the standby main control unit and the business processing unit (there may be multiple) are consistent at any time status. In this way, a series of problems caused by data inconsistency can be avoided.

本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行上述实施例的方法步骤的程序代码:The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the foregoing storage medium may be configured to store program codes for executing the method steps of the foregoing embodiments:

可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but not limited to: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk Various media that can store program codes such as discs or optical discs.

可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述实施例的方法。Optionally, in this embodiment, the processor executes the methods in the foregoing embodiments according to the program code stored in the storage medium.

显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the above-mentioned present invention can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network formed by multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases, in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present invention is not limited to any specific combination of hardware and software.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (11)

1.一种数据同步方法,其特征在于,包括:1. A data synchronization method, characterized in that, comprising: 主用主控单元接收业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The active main control unit receives the application status data sent by the service processing unit, the main main control unit modifies the application status data to unsynchronized state data, and the active main control unit synchronizes the unsynchronized state data to the business processing unit; 所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到备用主控单元;The active main control unit modifies the unsynchronized state data to the synchronizing state data, and the active main control unit synchronizes the synchronizing state data to the standby main control unit; 所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The active main control unit receives a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the synchronizing state data. The state data is data in a synchronized state, and the active main control unit synchronizes the data in a synchronized state to the service processing unit. 2.根据权利要求1所述的方法,其特征在于,还包括:2. The method according to claim 1, further comprising: 所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;The active main control unit receives the active-standby switchover event, and sends the active-standby switchover event to the service processing unit; 在所述业务处理单元中的数据状态均是已同步状态的情况下,所述主用主控单元接收所述业务处理单元发送的同步完成事件。In the case that the data states in the service processing unit are all in the synchronized state, the active master control unit receives the synchronization completion event sent by the service processing unit. 3.根据权利要求1所述的方法,其特征在于,还包括:3. The method according to claim 1, further comprising: 所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;The active main control unit receives the active-standby switchover event, and sends the active-standby switchover event to the service processing unit; 在所述业务处理单元包括所述未同步状态数据或者所述申请状态数据的情况下,所述主用主控单元接收正在同步状态数据,其中,所述正在同步状态数据是所述业务处理单元将所述未同步状态数据或者所述申请状态数据修改的;In the case that the service processing unit includes the unsynchronized status data or the application status data, the active master control unit receives the synchronizing status data, wherein the synchronizing status data is the status data of the service processing unit Modifying the unsynchronized status data or the application status data; 所述主用主控单元将所述正在同步状态数据修改为未同步状态数据,所述主用主控单元发送所述未同步状态数据给所述备用主控单元;The active main control unit modifies the synchronizing state data into unsynchronized state data, and the active main control unit sends the unsynchronized state data to the backup main control unit; 所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述未同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The active main control unit receives a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the The data in the unsynchronized state is the data in the synchronized state, and the master main control unit synchronizes the data in the synchronized state to the service processing unit. 4.一种数据同步方法,其特征在于,包括:4. A data synchronization method, characterized in that, comprising: 主用主控单元接收备用主控单元的上线事件,所述主用主控单元将未同步状态数据修改为正在同步状态,所述主用主控单元发送所述正在同步状态数据到所述备用主控单元;The active main control unit receives the online event of the standby main control unit, the active main control unit modifies the unsynchronized state data to the synchronizing state, and the active main control unit sends the synchronizing state data to the standby main control unit; 所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到业务处理单元。The active main control unit receives a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the The data in the synchronizing state is the data in the synchronizing state, and the master main control unit synchronizes the data in the synchronizing state to the service processing unit. 5.根据权利要求1所述的方法,其特征在于,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据之后,所述方法包括:5. The method according to claim 1, wherein after the master master control unit modifies the data in the synchronizing state to data in the synchronizing state, the method comprises: 所述主用主控单元向所述备用主控单元发送同步完成事件,所述备用主控单元将本地不是已同步状态数据删除。The active main control unit sends a synchronization completion event to the standby main control unit, and the standby main control unit deletes the local data that is not in a synchronized state. 6.一种数据同步装置,其特征在于,包括:6. A data synchronization device, characterized in that, comprising: 第一接收模块,用于主用主控单元接收业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The first receiving module is used for the active main control unit to receive the application status data sent by the service processing unit, the active main control unit modifies the application status data to unsynchronized state data, and the active main control unit will The unsynchronized state data is synchronized to the business processing unit; 第一修改模块,用于所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到备用主控单元;The first modification module is used for the active main control unit to modify the unsynchronized state data to the synchronizing state data, and the active main control unit synchronizes the synchronizing state data to the standby main control unit; 第一确认模块,用于所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The first confirmation module is used for the active main control unit to receive a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit The master control unit modifies the data in the synchronizing state to the data in the synchronized state, and the master master control unit synchronizes the data in the synchronized state to the service processing unit. 7.根据权利要求6所述的装置,其特征在于,还包括:7. The device according to claim 6, further comprising: 第一倒换模块,用于所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;The first switchover module is used for the active main control unit to receive the active-standby switchover event, and send the active-standby switchover event to the service processing unit; 第二接收模块,用于在所述业务处理单元中的数据状态均是已同步状态的情况下,所述主用主控单元接收所述业务处理单元发送的同步完成事件。The second receiving module is configured to receive, by the active master control unit, a synchronization completion event sent by the service processing unit when the data states in the service processing unit are all in a synchronized state. 8.根据权利要求6所述的装置,其特征在于,还包括:8. The device according to claim 6, further comprising: 第二倒换模块,用于所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;The second switching module is used for the main control unit to receive the main-standby switchover event, and send the main-standby switchover event to the service processing unit; 第三接收模块,用于在所述业务处理单元包括所述未同步状态数据或者所述申请状态数据的情况下,所述主用主控单元接收正在同步状态数据,其中,所述正在同步状态数据是所述业务处理单元将所述未同步状态数据或者所述申请状态数据修改的;The third receiving module is configured to, when the service processing unit includes the unsynchronized state data or the application state data, the active main control unit receives the synchronizing state data, wherein the synchronizing state The data is modified by the business processing unit from the unsynchronized status data or the application status data; 第二修改模块,用于所述主用主控单元将所述正在同步状态数据修改为未同步状态数据,所述主用主控单元发送所述未同步状态数据给所述备用主控单元;The second modification module is used for the active main control unit to modify the synchronizing state data to unsynchronized state data, and the active main control unit sends the unsynchronized state data to the standby main control unit; 第二确认模块,用于所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述未同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The second confirmation module is used for the active main control unit to receive a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit The master control unit modifies the data in the unsynchronized state to the data in the synchronized state, and the master master control unit synchronizes the data in the synchronized state to the service processing unit. 9.一种数据同步装置,其特征在于,包括:9. A data synchronization device, characterized in that, comprising: 第三修改模块,用于主用主控单元接收备用主控单元的上线事件,所述主用主控单元将未同步状态数据修改为正在同步状态,所述主用主控单元发送所述正在同步状态数据到所述备用主控单元;The third modification module is used for the active main control unit to receive the online event of the standby main control unit, the active main control unit modifies the unsynchronized state data to the synchronizing state, and the active main control unit sends the in-progress synchronizing status data to the standby master control unit; 第三确认模块,用于所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到业务处理单元。The third confirmation module is used for the active main control unit to receive a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit The master control unit modifies the data in the synchronizing state to the data in the synchronized state, and the master master control unit synchronizes the data in the synchronized state to the service processing unit. 10.根据权利要求9所述的装置,其特征在于,所述装置包括:10. The device according to claim 9, characterized in that the device comprises: 删除模块,用于所述主用主控单元向所述备用主控单元发送同步完成事件,所述备用主控单元将本地不是已同步状态数据删除。A deletion module, configured for the active main control unit to send a synchronization completion event to the standby main control unit, and the standby main control unit deletes the local data that is not in a synchronized state. 11.一种数据同步系统,其特征在于,包括:主用主控单元,备用主控单元,业务处理单元;11. A data synchronization system, characterized in that, comprising: a master master control unit, a backup master control unit, and a business processing unit; 所述主用主控单元接收所述业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The active main control unit receives the application state data sent by the service processing unit, the active main control unit modifies the application state data into unsynchronized state data, and the active main control unit modifies the unsynchronized state data. The synchronization state data is synchronized to the business processing unit; 所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到所述备用主控单元;The active main control unit modifies the unsynchronized state data to the synchronizing state data, and the active main control unit synchronizes the synchronizing state data to the standby main control unit; 所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The active main control unit receives a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronizing state data to the synchronized state data, and the active main control unit modifies the synchronizing state data. The state data is data in a synchronized state, and the active main control unit synchronizes the data in a synchronized state to the service processing unit.
CN201510448471.3A 2015-07-27 2015-07-27 Method, device and system for synchronizing data Withdrawn CN106657168A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510448471.3A CN106657168A (en) 2015-07-27 2015-07-27 Method, device and system for synchronizing data
PCT/CN2016/070431 WO2017016196A1 (en) 2015-07-27 2016-01-07 Data synchronization method, apparatus, and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510448471.3A CN106657168A (en) 2015-07-27 2015-07-27 Method, device and system for synchronizing data

Publications (1)

Publication Number Publication Date
CN106657168A true CN106657168A (en) 2017-05-10

Family

ID=57883985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510448471.3A Withdrawn CN106657168A (en) 2015-07-27 2015-07-27 Method, device and system for synchronizing data

Country Status (2)

Country Link
CN (1) CN106657168A (en)
WO (1) WO2017016196A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110224849A (en) * 2019-04-18 2019-09-10 广州市高科通信技术股份有限公司 A kind of method preventing PTN device loss of data, system and storage medium
CN111654384A (en) * 2019-09-27 2020-09-11 中兴通讯股份有限公司 A main-standby switching method, BRAS device and storage medium
CN113806143A (en) * 2018-05-11 2021-12-17 创新先进技术有限公司 Disaster recovery method, system and electronic device for remote location

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612654B (en) * 2021-01-08 2024-03-29 成都民航空管科技发展有限公司 Multi-host-standby switching method of air traffic control automation system and redundant service system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1564656A1 (en) * 2004-02-10 2005-08-17 Research In Motion Limited Apparatus and associated method for facilitating initiation of synchronization of database copies connected by way of a radio air interface
US7039661B1 (en) * 2003-12-29 2006-05-02 Veritas Operating Corporation Coordinated dirty block tracking
CN101075861A (en) * 2007-06-28 2007-11-21 中兴通讯股份有限公司 Method for realizing main spared board thermal backup and reversing main spared board
CN102510408A (en) * 2011-11-30 2012-06-20 武汉烽火网络有限责任公司 Method for realizing TCP (transmission control protocol) application main and standby changeover
CN103188065A (en) * 2011-12-30 2013-07-03 北京新媒传信科技有限公司 Method and system of data synchronism in business service
CN103902405A (en) * 2012-12-28 2014-07-02 杭州宏杉科技有限公司 A quasi-continuous data replication method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070300026A1 (en) * 2006-06-23 2007-12-27 Kwok-Yan Leung Synchronous backup device and method used for storage device
JP4920390B2 (en) * 2006-12-05 2012-04-18 株式会社東芝 Storage device
CN102075580B (en) * 2011-01-20 2013-04-17 迈普通信技术股份有限公司 Method and system for storing synchronous data in distributive network equipment
CN103077242B (en) * 2013-01-11 2016-03-09 北京佳讯飞鸿电气股份有限公司 The method of a kind of fulfillment database server two-node cluster hot backup
CN104253707B (en) * 2013-06-28 2019-06-07 上海斐讯数据通信技术有限公司 A kind of master and backup discs multicast service synchronous method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7039661B1 (en) * 2003-12-29 2006-05-02 Veritas Operating Corporation Coordinated dirty block tracking
EP1564656A1 (en) * 2004-02-10 2005-08-17 Research In Motion Limited Apparatus and associated method for facilitating initiation of synchronization of database copies connected by way of a radio air interface
CN101075861A (en) * 2007-06-28 2007-11-21 中兴通讯股份有限公司 Method for realizing main spared board thermal backup and reversing main spared board
CN102510408A (en) * 2011-11-30 2012-06-20 武汉烽火网络有限责任公司 Method for realizing TCP (transmission control protocol) application main and standby changeover
CN103188065A (en) * 2011-12-30 2013-07-03 北京新媒传信科技有限公司 Method and system of data synchronism in business service
CN103902405A (en) * 2012-12-28 2014-07-02 杭州宏杉科技有限公司 A quasi-continuous data replication method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806143A (en) * 2018-05-11 2021-12-17 创新先进技术有限公司 Disaster recovery method, system and electronic device for remote location
CN113806143B (en) * 2018-05-11 2024-04-26 创新先进技术有限公司 A remote disaster recovery method, system and electronic equipment
CN110224849A (en) * 2019-04-18 2019-09-10 广州市高科通信技术股份有限公司 A kind of method preventing PTN device loss of data, system and storage medium
CN111654384A (en) * 2019-09-27 2020-09-11 中兴通讯股份有限公司 A main-standby switching method, BRAS device and storage medium

Also Published As

Publication number Publication date
WO2017016196A1 (en) 2017-02-02

Similar Documents

Publication Publication Date Title
EP2144400B1 (en) Distributed ethernet system and method for detecting fault based thereon
CN110601903B (en) Data processing method and device based on message queue middleware
CN101714916A (en) Method, equipment and system for backing up
CN106656589B (en) A kind of server dual-machine hot backup system
CN107528706A (en) A kind of equipment main and standby rearranging method and device based on link protocol
CN102013997B (en) Backup method and system for dual-computer data in telecom network management system
CN107231400B (en) Data synchronization method and device
CN106341251A (en) Master and slave switching method and device based on dual master control
CN106657168A (en) Method, device and system for synchronizing data
CN102075341B (en) Method and system for main-standby synchronization
CN107046474B (en) a service cluster
CN105790965A (en) Method and device for link switching and line card
CN105591801B (en) A kind of virtual network function VNF fault handling method and VNF management equipment
CN111241200B (en) Master-slave synchronous processing method and device based on SQLite database
CN114490188A (en) Method and device for synchronizing main database and standby database
CN104639434A (en) Open shortest path first protocol smooth restart method and device
CN103812680B (en) A kind of system and method for realizing veneer switching
JP5449229B2 (en) Call relief system and call relief method
CN100362760C (en) A Backup Method for Distributed Configuration Database System
CN102983997A (en) Method and device for migrating master services
CN111083074A (en) High availability method and system for main and standby dual OSPF state machines
CN105656836A (en) Security monitoring method and system
CN116614347A (en) Disaster recovery switching method of message storage node and message middleware system
CN113890817A (en) Communication optimization method and device
CN108984346A (en) A kind of method, system and the storage medium of creation data disaster tolerance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20170510