WO2017016196A1 - Data synchronization method, apparatus, and system - Google Patents

Data synchronization method, apparatus, and system Download PDF

Info

Publication number
WO2017016196A1
WO2017016196A1 PCT/CN2016/070431 CN2016070431W WO2017016196A1 WO 2017016196 A1 WO2017016196 A1 WO 2017016196A1 CN 2016070431 W CN2016070431 W CN 2016070431W WO 2017016196 A1 WO2017016196 A1 WO 2017016196A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
control unit
main control
state
standby
Prior art date
Application number
PCT/CN2016/070431
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 WO2017016196A1 publication Critical patent/WO2017016196A1/en

Links

Images

Classifications

    • 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
    • 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

Definitions

  • the present invention relates to the field of communications, and in particular to a method, device and system for synchronizing data.
  • the Synchronous Digital Hierarchy (SDH) device In the Synchronous Digital Hierarchy (SDH) device, the Dense Wavelength Division Multiplexing (DWDM) device, the Packet Transport Network (PTN) device, and the network control protocol ( The Network Control Protocol (NCP) device and the Optical Transport Network (OTN) device have high real-time and reliability requirements for the services carried by the main control unit.
  • the main control unit often has one or more standby main control units, that is, the synchronization of the configuration data includes two contents: data synchronization between the main control unit and the standby main control unit, and the synchronization is a copy and backup operation.
  • the main control unit synchronizes with the data of the business processing unit, and this synchronization is an action of issuing and responding.
  • the two data synchronizations are independently operated. Although the processing is simple, the effect is often poor. For example, when the main control unit sends data, if the main control unit fails, the data configuration of the main control is not synchronized successfully, and the standby main control unit does not have this data. The data is abnormal, causing the device to run abnormally, or even causing service interruption and failure to recover. 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 of equipment maintenance and cause waste of resources.
  • the present invention provides a method, apparatus and system for synchronizing data to at least solve the problem of abnormal faults caused by data out of synchronization in the related art.
  • a data synchronization method including:
  • the main control unit receives 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 synchronizes the unsynchronized status data. Giving the business processing unit;
  • the main control unit modifies the unsynchronized state data to be synchronizing state data, and the main control unit synchronizes the synchronizing state data to the standby main control unit;
  • the primary control unit receives an acknowledgement message, the acknowledgement message includes a confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the
  • the data in the synchronized state is the data in the synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing list yuan.
  • the active main control unit receives an active/standby switching event, and sends the active/standby switching event to the service processing unit.
  • the primary control unit receives a synchronization completion event sent by the service processing unit.
  • the active main control unit receives an active/standby switching event, and sends the active/standby switching event to the service processing unit.
  • the main control unit receives the synchronization state data, wherein the synchronization state data is the service processing unit. Modifying the unsynchronized state data or the application state data;
  • the main control unit modifies the synchronization status data to unsynchronized status data, and the main control unit sends the unsynchronized status data to the standby main control unit;
  • the primary control unit receives an acknowledgement message, the acknowledgement message includes a confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the
  • the data of the unsynchronized state is data of the synchronized state
  • the main control unit synchronizes the data of the synchronized state to the service processing unit.
  • a data synchronization method including:
  • the main control unit receives an online event of the standby main control unit, the main control unit modifies the unsynchronized status data to the synchronized state, and the main control unit sends the synchronizing status data to the standby Main control unit
  • the primary control unit receives an acknowledgement message, the acknowledgement message includes a confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the
  • the data in the synchronized state is the data in the synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
  • 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 non-synchronized state data.
  • a data synchronization apparatus including:
  • the first receiving module is configured to receive, by the main control unit, application status data sent by the service processing unit, where the main control unit modifies the application status data into unsynchronized status data, and the main control unit
  • the unsynchronized state data is synchronized to the service processing unit
  • a first modifying module configured to: the primary control unit modifies the unsynchronized state data to be synchronized state data, and the primary MME synchronizes the synchronized state data to the standby MME;
  • a first confirmation module configured to receive, by the primary control unit, an acknowledgement message, where the confirmation message includes a confirmation content that the standby control unit modifies the synchronized state data to the synchronized state data, the primary Synchronizing the synchronized state data to the service processing unit with a master unit.
  • the first switching module is configured to receive the active/standby switching event by the active main control unit, and send the active/standby switching event to the service processing unit.
  • the second receiving module is configured to receive, when the data states in the service processing unit are in a synchronized state, the primary control unit receives a synchronization completion event sent by the service processing unit.
  • the second switching module is configured to receive the active/standby switching event by the active main control unit, and send the active/standby switching event to the service processing unit.
  • a third receiving module configured to: when the service processing unit includes the unsynchronized state data or the application state data, the main control unit receives the synchronization state data, where the synchronization state is Data is that the service processing unit modifies the unsynchronized state data or the application state data;
  • a second modification module configured to: the main control unit modifies the synchronization status data into unsynchronized status data, and the main control unit sends the unsynchronized status data to the standby main control unit;
  • a second confirmation module configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, the main The data of the unsynchronized state is modified by the main control unit to be the data of the synchronized state, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
  • a data synchronization apparatus including:
  • a third modification module configured to receive an online event of the standby main control unit, wherein the main control unit modifies the unsynchronized state data to the synchronization state, and the main control unit sends the ongoing Synchronizing status data to the standby master unit;
  • a third confirmation module configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, the main The data of the synchronization state is modified by the main control unit to be synchronized data, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
  • the apparatus comprises:
  • the primary control unit is configured to send a synchronization completion event to the standby main control unit, and the standby main control unit deletes the local non-synchronized state data.
  • a data synchronization system including: an active main control unit, a standby main control unit, and a service processing unit;
  • the main control unit receives application status data sent by the service processing unit, and the main control unit The application status data is modified to the unsynchronized status data, and the main control unit synchronizes the unsynchronized status data to the service processing unit;
  • the main control unit modifies the unsynchronized state data to be synchronizing state data, and the main control unit synchronizes the synchronizing state data to the standby main control unit;
  • the primary control unit receives an acknowledgement message, the acknowledgement message includes a confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the
  • the data in the synchronized state is the data in the synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
  • 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, and the main control unit unsynchronizes the status data. Synchronizing to the service processing unit; the main control unit modifies the unsynchronized status data to the synchronization status data, and the main control unit synchronizes the synchronization status data to the standby main control unit; the main control unit Receiving a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronization state data to the synchronization state data, and the main control unit modifies the data in the synchronization state to be the synchronized state data, where The main control unit synchronizes the synchronized state data to the service processing unit, solves the problem of abnormal failure caused by data non-synchronization, realizes consistency of data of each unit, and saves maintenance cost.
  • FIG. 1 is a flow chart 1 of a data synchronization method according to an embodiment of the present invention.
  • FIG. 2 is a second flowchart of a data synchronization method according to an embodiment of the present invention.
  • FIG. 3 is a structural block diagram 1 of a data synchronization apparatus according to an embodiment of the present invention.
  • FIG. 4 is a structural block diagram 2 of a data synchronization apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a normal data synchronization process according to a preferred embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an active/standby switching process according to a preferred embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an active/standby switchover process in a normal data synchronization process performed by an active/standby NCP according to a preferred embodiment of the present invention
  • FIG. 8 is a schematic diagram of a flow of data batch synchronization by inserting a standby NCP according to a preferred embodiment of the present invention.
  • FIG. 9 is a schematic diagram of an active/standby switchover process occurring during data synchronization between an active and standby device according to a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart 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:
  • Step S102 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, and the main control unit synchronizes the unsynchronized status data to The business processing unit;
  • Step S104 the main control unit modifies the unsynchronized state data into the synchronization state data, and the main control unit synchronizes the synchronization state data to the standby main control unit;
  • Step S106 the main control unit receives an acknowledgement message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data, and the main control unit modifies the synchronization state.
  • the data is data in a synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
  • 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, and the main control unit synchronizes the unsynchronized status data.
  • Sending to the service processing unit the main control unit modifies the unsynchronized state data to the synchronization state data, and the main control unit synchronizes the synchronization state data to the standby main control unit, and the main control unit receives a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronization state data to the synchronization state data, and the main control unit modifies the data of the synchronization state to be synchronized data, the main The main control unit synchronizes the synchronized state data to the service processing unit, solves the problem of abnormal fault caused by data unsynchronization, realizes consistency of data of each unit, and saves maintenance cost.
  • the active main control unit receives the active/standby switchover event, and sends the active/standby switchover event to the service processing unit. If the data states in the service processing unit are all synchronized, the The active master unit receives the synchronization completion event sent by the service processing unit.
  • the main control unit receives the active/standby switching event, and sends the active/standby switching event to the service processing unit, where the service processing unit includes the unsynchronized status data or the application status data.
  • the main control unit receives the synchronization status data, wherein the synchronization status data is that the service processing unit modifies the unsynchronized status data or the application status data, and the main control unit synchronizes the status.
  • the data is modified to the unsynchronized state data, and the main control unit sends the unsynchronized status data to the standby main control unit, and the main control unit receives the confirmation message, and the confirmation message includes the standby main control unit to be synchronizing
  • the status data modifies the confirmation content of the synchronized state data
  • the main control unit modifies the data of the unsynchronized state to be the data of the synchronized state
  • the main control unit synchronizes the data of the synchronized state to the service processing unit. .
  • FIG. 2 is a data synchronization method according to an embodiment of the present invention.
  • Flowchart 2 as shown in Figure 2, the process includes the following steps:
  • Step S202 the main control unit receives an online event of the standby main control unit, and the main control unit modifies the unsynchronized state data to the synchronization state, and the main control unit sends the synchronization status data to the standby main unit.
  • Step S204 the main control unit receives an acknowledgement message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, and the main control unit modifies the synchronization state.
  • the data is data in a synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
  • the main control unit receives the standby main control unit online event, the main control unit changes the unsynchronized status data to the synchronized state, and the main control unit sends the synchronous status data to the standby.
  • a main control unit after the main control unit receives the confirmation that the standby main control unit modifies the synchronization status data to the synchronized status data, the main control unit modifies the data in the synchronization status to be synchronized Data, the main control unit synchronizes the synchronized state data to the service processing unit, solves the problem of abnormal failure caused by data non-synchronization, realizes consistency of data of each unit, and saves maintenance cost.
  • the method includes: the primary control unit sends a synchronization completion event to the standby primary control unit, the standby The master unit deletes the local non-synchronized status data.
  • a data synchronization device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 3 is a structural block diagram 1 of a data synchronization apparatus according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes:
  • the first receiving module 32 is configured to receive, by the main control unit, the application status data sent by the service processing unit, where the main control unit modifies the application status data to the unsynchronized status data, and the main control unit Synchronizing state data to the service processing unit;
  • the first modifying module 34 is configured to modify, by the main control unit, the unsynchronized state data to be synchronizing state data, and the main controlling unit synchronizes the synchronizing state data to the standby main control unit;
  • the first confirmation module 36 is configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, and the main control unit modifies The data in the synchronized state is data in a synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
  • the device further includes: a first switching module, configured to: the primary control unit receives an active/standby switching event, and sends the active/standby switching event to the service processing unit;
  • the second receiving module is configured to receive, when the data state in the service processing unit is the synchronized state, the primary control unit receives the synchronization completion event sent by the service processing unit.
  • the device further includes: a second switching module, configured to: the primary control unit receives an active/standby switching event, and sends the active/standby switching event to the service processing unit;
  • a third receiving module configured to receive, in the case that the service processing unit includes the unsynchronized state data or the application status data, the primary control unit receives the synchronization status data, where the synchronization status data is the service processing The unit modifies the unsynchronized status data or the application status data;
  • a second modification module configured to: the main control unit modifies the synchronization status data to the unsynchronized status data, and the main control unit sends the unsynchronized status data to the standby main control unit;
  • a second confirmation module configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby control unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the
  • the data of the unsynchronized state is the data of the synchronized state
  • the main control unit synchronizes the data of the synchronized state to the service processing unit.
  • FIG. 4 is a structural block diagram 2 of a data synchronization apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes:
  • the third modification module 42 is configured to receive an online event of the standby main control unit, wherein the main control unit modifies the unsynchronized state data to the synchronization state, and the main control unit sends the synchronization status. Data to the standby master unit;
  • the third confirmation module 44 is configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, and the main control unit modifies The data in the synchronized state is data in a synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
  • the device further includes:
  • the module is deleted, and the main control unit sends a synchronization completion event to the standby main control unit, and the standby main control unit deletes the local non-synchronized state data.
  • a data synchronization system including: an active main control unit, a standby main control unit, and a service processing unit;
  • 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, and the main control unit synchronizes the unsynchronized status data to the Business processing unit;
  • the master control unit modifies the unsynchronized state data to the synchronization state data, and the master control unit synchronizes the synchronization state data to the standby master unit;
  • the master control unit receives an acknowledgement message, the acknowledgement message includes the confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the data in the synchronized state to be The data of the synchronization state, the main control unit synchronizes the data of the synchronized state to the service processing unit.
  • the preferred embodiment provides a data synchronization mechanism for implementing an active main control unit, a standby main control unit, and a service processing list.
  • Meta (could exist multiple) data consistency, wherein the main control unit, the standby main control unit, and the service processing unit and the main control unit, the standby main control unit, and the service processing unit in the above embodiments function and function The same, avoid a series of problems caused by data inconsistency.
  • the method in the preferred embodiment divides the main control unit into three states: "active state”, “standby state”, “active/standby state”, and "data recovery state”.
  • the “active state” means that only the main control unit has no standby main control unit; the “standby state” indicates that there are both the main control unit and the standby main control unit, and the unit is the standby main control unit; "It means that there are both the main control unit and the standby main control unit.
  • This unit is the main control unit.
  • the data recovery state passes the active/standby switchover, the main control unit and the service processing unit perform a transient state of data recovery. There is no case where there is only a standby master unit and no master master unit. Status negotiation can be performed between the master units in any way.
  • the preferred embodiment divides the data to be synchronized into "application status”, "unsynchronized status”, “synchronizing status”, and “synchronized status”, "application status”, “unsynchronized status”, “data”
  • the "synchronizing state” and the "synchronized state” are the same as the application state data in the above embodiment, the unsynchronized state data, the synchronizing state data, and the functions and functions of the synchronized state data.
  • the data After receiving the application data event of the service processing unit, the data is set to the "unsynchronized state" and saved to the local service and sent to the service processing unit.
  • the data sent to the service processing unit carries the status of "unsynchronized status".
  • the data sent by the main control unit to the service processing unit can carry not only status information, but also other information, such as unique identification information of the data.
  • the standby master unit is the master unit in the "standby state", and handles the following events:
  • the main control unit is in the "data recovery state" steps:
  • the service processing unit needs to process the service configuration and synchronize the service data to the main control unit as needed. How the service processing unit handles the service configuration is not within the 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 business processing unit handles the following events:
  • each unit can perform active/standby switchover at any time. After the active/standby switchover, the new standby master control unit does not need to be restarted, and continuous active/standby switchover can be performed.
  • the main control unit is an NCP and the service processing unit is a line card.
  • NCP NCP
  • the service processing unit is a line card.
  • 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.
  • step 1 the line card sends data 1 to the main NCP, and the data 1 is "application status" on the line card.
  • Step 2 After receiving the data of the line card, the primary NCP saves to the local area and synchronizes to the line card, and the data 1 is “unsynchronized state” on the primary NCP.
  • Step 3 After receiving the data of the primary NCP, the standby NCP saves it to the local area and sends a confirmation to the primary NCP.
  • the data 1 is in the "synchronized state" on the standby NCP.
  • Step 4 After receiving the confirmation of the standby NCP, the primary NCP modifies the local data to the “synchronized state” and sends it to the line card.
  • Step 5 After receiving the data of the primary NCP, the line card modifies the local data to “synchronized state”.
  • FIG. 6 is a schematic diagram of performing an active/standby switching process according to a preferred embodiment of the present invention, as shown in FIG. 6.
  • Step 1 The master NCP receives the active/standby switchover event and modifies the board as the “standby state”.
  • Step 2 The standby NCP receives the active/standby switchover event, and the board is modified to “data recovery state”, and then the active/standby switchover event is sent to the line card.
  • Step 3 The line card receives the active/standby switchover event, and changes all the data of the “unsynchronized state” and the “application state” to the “synchronizing state”. In this scenario, all data is "synchronized” and a synchronization completion event is sent to the primary NCP.
  • FIG. 7 is a preferred implementation in accordance with the present invention
  • the master/slave NCP performs the active/standby switchover process during normal data synchronization, as shown in Figure 7.
  • the line card has data 1 and data 2, data 1 is “synchronized state", and data 2 is "unsynchronized state”.
  • the primary 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 the data 1 is "synchronized state”. When the primary NCP has not synchronized data 2 to the standby NCP, the active/standby switchover occurs.
  • step 1 the primary NCP receives the active/standby switchover event and changes the board to the "standby state”.
  • the standby NCP receives the active/standby switchover event and changes the board to the data recovery state to send the active/standby switchover event to the line card.
  • Step 3 After receiving the active/standby switchover event, the line card changes the data 2 to “synchronizing state” and sends data 2 to the primary NCP.
  • Step 4 The master NCP receives the data 2 of the line card, saves the data 2 to the local, sets the status to "unsynchronized state", and sends data 2 to the standby NCP.
  • step 5 the standby NCP receives the data 2 of the primary NCP, changes the data 2 to the "synchronized state", and returns the data 2 to confirm.
  • step 6 the main NCP receives the data 2 confirmation, and the data 2 is modified to the "synchronized state", and the data 2 is sent back to the line card.
  • Step 7 The line card receives the main NCP data 2, and the data 2 is modified to the “synchronized state”, and the synchronization completion event is sent to the main NCP.
  • step 8 the primary NCP receives the synchronization completion event and sends a synchronization completion event to the standby NCP.
  • step IX the standby NCP receives the synchronization completion event and does nothing.
  • FIG. 8 is a schematic diagram of a flow of data batch synchronization by inserting a standby NCP according to a preferred embodiment of the present invention, as shown in FIG. 8.
  • Step 1 The primary NCP receives the standby NCP online event, sets the data 1 to the “synchronizing state”, and modifies the board to the “active/standby state” to synchronize data 1 with the standby NCP.
  • the standby NCP receives the data 1 and saves it to the local state.
  • the status is “synchronized state”, and the data is acknowledged to the primary NCP.
  • step 3 the primary NCP receives the data 1 acknowledgment, and modifies the data 1 to the "synchronized state", and sends a synchronization completion event to the standby NCP and the primary NCP.
  • Step 4 The standby NCP receives the synchronization completion event, and deletes all data that is not “synchronized state”. At this time, no data needs to be deleted.
  • step 5 the line card receives the synchronization completion event, and the data 1 is modified to the “synchronized state”.
  • FIG. 9 is a schematic diagram of an active/standby switchover process performed during data synchronization between the active and standby devices according to a preferred embodiment of the present invention, as shown in FIG. 9.
  • the line card has data 1, the status is "synchronized state", data 2, the status is "unsynchronized state”; the main NCP has data 1, the status is "synchronized state”, the data 2 is "unsynchronized state”; the standby NCP There are data 1 and data 2, and the status is "synchronized state”.
  • the master/slave switchover occurs when the standby NCP has not sent data 2 to the master NCP for confirmation.
  • Step 1 The master NCP receives the active/standby switchover event and sets the board to the standby state.
  • Step 2 The standby NCP receives the active/standby switchover event, and sets the board to the data recovery state to send the active/standby switchover event to the line card.
  • Step 3 The line card receives the active/standby switchover event, and sets the data 2 to “synchronizing state” to send data 2 to the primary NCP.
  • Step 4 The primary NCP receives the data 2, and the data 2 is modified to the "unsynchronized state", and the data 2 is synchronized to the standby NCP.
  • step 5 the standby NCP receives the data 2, sets the data 2 to the "synchronized state", and sends a data 2 confirmation to the primary NCP.
  • step 6 the master NCP receives the data 2 acknowledgment, and modifies the data 2 to the "synchronized state", and sends the data 2 to the line card.
  • Step 7 The line card receives the data 2, and the data 2 is modified to the "synchronized state", and the synchronization completion is sent to the main NCP.
  • step 8 the primary NCP receives the synchronization completion and sends a synchronization completion event to the standby NCP.
  • Step 9 The standby NCP receives the synchronization completion event and does not process it.
  • the preferred embodiment avoids abnormal faults caused by data synchronization through a double acknowledgement mechanism, and can fundamentally ensure that data of the master unit, the standby master unit, and the service processing unit (possibly multiple) are consistent at any time. State. This avoids a series of problems caused by data inconsistency.
  • Embodiments of the present invention also provide a storage medium.
  • the storage medium may be configured to store program code for performing the method steps of the above embodiment:
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor executes the method of the above embodiment according to the stored program code in the storage medium.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • 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 to the unsynchronized status data, and the main control unit
  • the unit synchronizes the unsynchronized state data to the service processing unit;
  • the master control unit modifies the unsynchronized state data to the synchronization state data, and the master control unit synchronizes the synchronization state data to the standby master unit
  • the master control unit receives the confirmation message, the confirmation message includes the confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the data in the synchronization state to
  • the main control unit synchronizes the data of the synchronized state to the service processing unit, solves the problem of abnormal fault caused by data unsynchronization, realizes consistency of data of each unit, and saves maintenance cost. .

Abstract

The present invention provides a data synchronization method, apparatus, and system. A primary master control unit receives application state data sent by a service processing unit, the primary master control unit modifies the application state data to non-synchronized state data, and the primary master control unit synchronizes the non-synchronized state data to the service processing unit; the primary master control unit modifies the non-synchronized state data to synchronizing state data, and the primary master control unit synchronizes the synchronizing state data to a standby master control unit; and the primary master control unit receives an acknowledgement message, the acknowledgement message comprising an acknowledgement content indicative of that the standby master control unit modifies the synchronizing state data to synchronized state data, the primary master control unit modifies the synchronizing state data to the synchronized state data, and the primary master control unit synchronizes the synchronized state data to the service processing unit. The problem of abnormal failure caused by data non-synchronization is resolved, the consistency of all unit data is achieved, and the maintenance cost is reduced.

Description

同步数据方法、装置及系统Synchronous data method, device and system 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种同步数据方法、装置及系统。The present invention relates to the field of communications, and in particular to a method, device and system for synchronizing data.
背景技术Background technique
在同步数字体系(Synchronous Digital Hierarchy,简称为SDH)设备,密集型光波复用(Dense Wavelength Division Multiplexing,简称为DWDM)设备,分组传送网(Packet Transport Network,简称为PTN)设备,网络控制协议(Network Control Protocol,简称为NCP)设备,以及光传送网(Optical Transport Network,简称为OTN)设备中,由于其承载的业务具有非常高的实时性和可靠性要求,主控单元作为设备配置数据的数据中心,其配置数据的同步功能非常重要。主控单元往往存在一个或多个备用主控单元,也就是说,配置数据的同步,包括两个内容:主控单元与备用主控单元之间的数据同步,这个同步是复制、备份的动作;主控单元与业务处理单元的数据同步,这个同步是下发、应答的动作。In the Synchronous Digital Hierarchy (SDH) device, the Dense Wavelength Division Multiplexing (DWDM) device, the Packet Transport Network (PTN) device, and the network control protocol ( The Network Control Protocol (NCP) device and the Optical Transport Network (OTN) device have high real-time and reliability requirements for the services carried by the main control unit. Data center, the synchronization function of its configuration data is very important. The main control unit often has one or more standby main control units, that is, the synchronization of the configuration data includes two contents: data synchronization between the main control unit and the standby main control unit, and the synchronization is a copy and backup operation. The main control unit synchronizes with the data of the business processing unit, and this synchronization is an action of issuing and responding.
在相关技术中,这两个数据同步是独立运行的。这样虽然处理简单,但往往效果不佳,比如:当主控单元下发数据时,如果此时主控单元发生故障,主控的数据配置未同步成功,备用主控单元又没有这个数据,往往数据会出现异常,导致设备运行异常,甚至导致业务中断,无法恢复。而这些因为数据不一致导致的问题,往往非常复杂,难以定位和排除,会大大增加设备维护的人力、物力,造成资源浪费。In the related art, the two data synchronizations are independently operated. Although the processing is simple, the effect is often poor. For example, when the main control unit sends data, if the main control unit fails, the data configuration of the main control is not synchronized successfully, and the standby main control unit does not have this data. The data is abnormal, causing the device to run abnormally, or even causing service interruption and failure to recover. 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 of equipment maintenance and cause waste of resources.
针对相关技术中,数据不同步导致的异常故障,目前尚未提出有效的解决方案。In the related art, an abnormal solution caused by data out of synchronization has not yet proposed an effective solution.
发明内容Summary of the invention
本发明提供了一种同步数据方法、装置及系统,以至少解决相关技术中数据不同步导致的异常故障的问题。The present invention provides a method, apparatus and system for synchronizing data to at least solve the problem of abnormal faults caused by data out of synchronization in the related art.
根据本发明的一个实施例,提供了一种数据同步方法,包括:According to an embodiment of the present invention, a data synchronization method is provided, including:
主用主控单元接收业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The main control unit receives 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 synchronizes the unsynchronized status data. Giving the business processing unit;
所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到备用主控单元;The main control unit modifies the unsynchronized state data to be synchronizing state data, and the main control unit synchronizes the synchronizing state data to the standby main control unit;
所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单 元。The primary control unit receives an acknowledgement message, the acknowledgement message includes a confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the The data in the synchronized state is the data in the synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing list yuan.
在本发明的实施例中,所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;In an embodiment of the present invention, the active main control unit receives an active/standby switching event, and sends the active/standby switching event to the service processing unit.
在所述业务处理单元中的数据状态均是已同步状态的情况下,所述主用主控单元接收所述业务处理单元发送的同步完成事件。In a case where the data states in the service processing unit are all in a synchronized state, the primary control unit receives a synchronization completion event sent by the service processing unit.
在本发明的实施例中,所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;In an embodiment of the present invention, the active main control unit receives an active/standby switching event, and sends the active/standby switching 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 main control unit receives the synchronization state data, wherein the synchronization state data is the service processing unit. Modifying the unsynchronized state data or the application state data;
所述主用主控单元将所述正在同步状态数据修改为未同步状态数据,所述主用主控单元发送所述未同步状态数据给所述备用主控单元;The main control unit modifies the synchronization status data to unsynchronized status data, and the main control unit sends the unsynchronized status data to the standby main control unit;
所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述未同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The primary control unit receives an acknowledgement message, the acknowledgement message includes a confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the The data of the unsynchronized state is data of the synchronized state, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
根据本发明的另一个实施例,还提供了一种数据同步方法,包括:According to another embodiment of the present invention, a data synchronization method is further provided, including:
主用主控单元接收备用主控单元的上线事件,所述主用主控单元将未同步状态数据修改为正在同步状态,所述主用主控单元发送所述正在同步状态数据到所述备用主控单元;The main control unit receives an online event of the standby main control unit, the main control unit modifies the unsynchronized status data to the synchronized state, and the main control unit sends the synchronizing status data to the standby Main control unit
所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The primary control unit receives an acknowledgement message, the acknowledgement message includes a confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the The data in the synchronized state is the data in the synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
在本发明的实施例中,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据之后,所述方法包括:In an embodiment of the present invention, after the primary control unit modifies the data in the synchronized state to 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 deletes the local non-synchronized state data.
根据本发明的另一个实施例,还提供了一种数据同步装置,包括:According to another embodiment of the present invention, a data synchronization apparatus is further provided, including:
第一接收模块,设置为主用主控单元接收业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The first receiving module is configured to receive, by the main control unit, application status data sent by the service processing unit, where the main control unit modifies the application status data into unsynchronized status data, and the main control unit The unsynchronized state data is synchronized to the service processing unit;
第一修改模块,设置为所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到备用主控单元; a first modifying module, configured to: the primary control unit modifies the unsynchronized state data to be synchronized state data, and the primary MME synchronizes the synchronized state data to the standby MME;
第一确认模块,设置为所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。a first confirmation module, configured to receive, by the primary control unit, an acknowledgement message, where the confirmation message includes a confirmation content that the standby control unit modifies the synchronized state data to the synchronized state data, the primary Synchronizing the synchronized state data to the service processing unit with a master unit.
在本发明的实施例中,第一倒换模块,设置为所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;In the embodiment of the present invention, the first switching module is configured to receive the active/standby switching event by the active main control unit, and send the active/standby switching event to the service processing unit.
第二接收模块,设置为在所述业务处理单元中的数据状态均是已同步状态的情况下,所述主用主控单元接收所述业务处理单元发送的同步完成事件。The second receiving module is configured to receive, when the data states in the service processing unit are in a synchronized state, the primary control unit receives a synchronization completion event sent by the service processing unit.
在本发明的实施例中,第二倒换模块,设置为所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;In the embodiment of the present invention, the second switching module is configured to receive the active/standby switching event by the active main control unit, and send the active/standby switching event to the service processing unit.
第三接收模块,设置为在所述业务处理单元包括所述未同步状态数据或者所述申请状态数据的情况下,所述主用主控单元接收正在同步状态数据,其中,所述正在同步状态数据是所述业务处理单元将所述未同步状态数据或者所述申请状态数据修改的;a third receiving module, configured to: when the service processing unit includes the unsynchronized state data or the application state data, the main control unit receives the synchronization state data, where the synchronization state is Data is that the service processing unit modifies the unsynchronized state data or the application state data;
第二修改模块,设置为所述主用主控单元将所述正在同步状态数据修改为未同步状态数据,所述主用主控单元发送所述未同步状态数据给所述备用主控单元;a second modification module, configured to: the main control unit modifies the synchronization status data into unsynchronized status data, and the main control unit sends the unsynchronized status data to the standby main control unit;
第二确认模块,设置为所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述未同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。a second confirmation module, configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, the main The data of the unsynchronized state is modified by the main control unit to be the data of the synchronized state, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
根据本发明的另一个实施例,还提供了一种数据同步装置,包括:According to another embodiment of the present invention, a data synchronization apparatus is further provided, including:
第三修改模块,设置为主用主控单元接收备用主控单元的上线事件,所述主用主控单元将未同步状态数据修改为正在同步状态,所述主用主控单元发送所述正在同步状态数据到所述备用主控单元;a third modification module, configured to receive an online event of the standby main control unit, wherein the main control unit modifies the unsynchronized state data to the synchronization state, and the main control unit sends the ongoing Synchronizing status data to the standby master unit;
第三确认模块,设置为所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。a third confirmation module, configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, the main The data of the synchronization state is modified by the main control unit to be synchronized data, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
在本发明的实施例中,所述装置包括:In an embodiment of the invention, the apparatus comprises:
删除模块,设置为所述主用主控单元向所述备用主控单元发送同步完成事件,所述备用主控单元将本地不是已同步状态数据删除。And deleting the module, the primary control unit is configured to send a synchronization completion event to the standby main control unit, and the standby main control unit deletes the local non-synchronized state data.
根据本发明的另一个实施例,还提供了一种数据同步系统,包括:主用主控单元,备用主控单元,业务处理单元;According to another embodiment of the present invention, a data synchronization system is further provided, including: an active main control unit, a standby main control unit, and a service processing unit;
所述主用主控单元接收所述业务处理单元发送的申请状态数据,所述主用主控单元将所 述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The main control unit receives application status data sent by the service processing unit, and the main control unit The application status data is modified to the unsynchronized status data, and the main control unit synchronizes the unsynchronized status data to the service processing unit;
所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到所述备用主控单元;The main control unit modifies the unsynchronized state data to be synchronizing state data, and the main control unit synchronizes the synchronizing state data to the standby main control unit;
所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The primary control unit receives an acknowledgement message, the acknowledgement message includes a confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the The data in the synchronized state is the data in the synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
通过本发明,采用主用主控单元接收业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元;该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到备用主控单元;该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元,解决了数据不同步导致的异常故障的问题,实现了各单元数据的一致性,节约了维护成本。According to the present invention, 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, and the main control unit unsynchronizes the status data. Synchronizing to the service processing unit; the main control unit modifies the unsynchronized status data to the synchronization status data, and the main control unit synchronizes the synchronization status data to the standby main control unit; the main control unit Receiving a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronization state data to the synchronization state data, and the main control unit modifies the data in the synchronization state to be the synchronized state data, where The main control unit synchronizes the synchronized state data to the service processing unit, solves the problem of abnormal failure caused by data non-synchronization, realizes consistency of data of each unit, and saves maintenance cost.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的一种数据同步方法的流程图一;1 is a flow chart 1 of a data synchronization method according to an embodiment of the present invention;
图2是根据本发明实施例的一种数据同步方法的流程图二;2 is a second flowchart of a data synchronization method according to an embodiment of the present invention;
图3是根据本发明实施例的一种数据同步装置的结构框图一;3 is a structural block diagram 1 of a data synchronization apparatus according to an embodiment of the present invention;
图4是根据本发明实施例的一种数据同步装置的结构框图二;4 is a structural block diagram 2 of a data synchronization apparatus according to an embodiment of the present invention;
图5是根据本发明优选实施例的数据正常同步流程示意图;FIG. 5 is a schematic diagram of a normal data synchronization process according to a preferred embodiment of the present invention; FIG.
图6是根据本发明优选实施例的进行主备倒换流程示意图;FIG. 6 is a schematic diagram of an active/standby switching process according to a preferred embodiment of the present invention; FIG.
图7是根据本发明优选实施例的主备NCP进行正常数据同步过程中进行主备倒换流程示意图;FIG. 7 is a schematic diagram of an active/standby switchover process in a normal data synchronization process performed by an active/standby NCP according to a preferred embodiment of the present invention; FIG.
图8是根据本发明优选实施例的插上备NCP进行数据批量同步流程示意图;FIG. 8 is a schematic diagram of a flow of data batch synchronization by inserting a standby NCP according to a preferred embodiment of the present invention; FIG.
图9是根据本发明优选实施例的主备进行数据同步过程中发生主备倒换流程示意图。FIG. 9 is a schematic diagram of an active/standby switchover process occurring during data synchronization between an active and standby device according to a preferred embodiment of the present invention.
具体实施方式 detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
在本实施例中提供了一种数据同步方法,图1是根据本发明实施例的一种数据同步方法的流程图一,如图1所示,该流程包括如下步骤:A data synchronization method is provided in this embodiment. FIG. 1 is a flowchart 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 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, and the main control unit synchronizes the unsynchronized status data to The business processing unit;
步骤S104,该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到备用主控单元;Step S104, the main control unit modifies the unsynchronized state data into the synchronization state data, and the main control unit synchronizes the synchronization state data to the standby main control unit;
步骤S106,该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。Step S106, the main control unit receives an acknowledgement message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data, and the main control unit modifies the synchronization state. The data is data in a synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
通过上述步骤,主用主控单元接收业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元,该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到备用主控单元,该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元,解决了数据不同步导致的异常故障的问题,实现了各单元数据的一致性,节约了维护成本。Through the above steps, 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, and the main control unit synchronizes the unsynchronized status data. Sending to the service processing unit, the main control unit modifies the unsynchronized state data to the synchronization state data, and the main control unit synchronizes the synchronization state data to the standby main control unit, and the main control unit receives a confirmation message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronization state data to the synchronization state data, and the main control unit modifies the data of the synchronization state to be synchronized data, the main The main control unit synchronizes the synchronized state data to the service processing unit, solves the problem of abnormal fault caused by data unsynchronization, realizes consistency of data of each unit, and saves maintenance cost.
在本实施例中,该主用主控单元收到主备倒换事件,向该业务处理单元发送该主备倒换事件,在该业务处理单元中的数据状态均是已同步状态的情况下,该主用主控单元接收该业务处理单元发送的同步完成事件。In this embodiment, the active main control unit receives the active/standby switchover event, and sends the active/standby switchover event to the service processing unit. If the data states in the service processing unit are all synchronized, the The active master unit receives the synchronization completion event sent by the service processing unit.
在本实施例中,该主用主控单元收到主备倒换事件,向该业务处理单元发送该主备倒换事件,在该业务处理单元包括该未同步状态数据或者该申请状态数据的情况下,该主用主控单元接收正在同步状态数据,其中,该正在同步状态数据是该业务处理单元将该未同步状态数据或者该申请状态数据修改的,该主用主控单元将该正在同步状态数据修改为未同步状态数据,该主用主控单元发送该未同步状态数据给该备用主控单元,该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该未同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。In this embodiment, the main control unit receives the active/standby switching event, and sends the active/standby switching event to the service processing unit, where the service processing unit includes the unsynchronized status data or the application status data. The main control unit receives the synchronization status data, wherein the synchronization status data is that the service processing unit modifies the unsynchronized status data or the application status data, and the main control unit synchronizes the status. The data is modified to the unsynchronized state data, and the main control unit sends the unsynchronized status data to the standby main control unit, and the main control unit receives the confirmation message, and the confirmation message includes the standby main control unit to be synchronizing The status data modifies the confirmation content of the synchronized state data, the main control unit modifies the data of the unsynchronized state to be the data of the synchronized state, and the main control unit synchronizes the data of the synchronized state to the service processing unit. .
在本实施例中提供了一种数据同步方法,图2是根据本发明实施例的一种数据同步方法 的流程图二,如图2所示,该流程包括如下步骤:A data synchronization method is provided in this embodiment, and FIG. 2 is a data synchronization method according to an embodiment of the present invention. Flowchart 2, as shown in Figure 2, the process includes the following steps:
步骤S202,主用主控单元接收备用主控单元的上线事件,该主用主控单元将未同步状态数据修改为正在同步状态,该主用主控单元发送该正在同步状态数据到该备用主控单元;Step S202, the main control unit receives an online event of the standby main control unit, and the main control unit modifies the unsynchronized state data to the synchronization state, and the main control unit sends the synchronization status data to the standby main unit. Control unit
步骤S204,该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。Step S204, the main control unit receives an acknowledgement message, the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, and the main control unit modifies the synchronization state. The data is data in a synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
通过上述步骤,在主用主控单元接收备用主控单元上线事件,该主用主控单元将未同步状态数据修改为正在同步状态,该主用主控单元发送该正在同步状态数据到该备用主控单元,该主用主控单元接收该备用主控单元将该正在同步状态数据修改为已同步状态数据的确认后,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元,解决了数据不同步导致的异常故障的问题,实现了各单元数据的一致性,节约了维护成本。Through the above steps, the main control unit receives the standby main control unit online event, the main control unit changes the unsynchronized status data to the synchronized state, and the main control unit sends the synchronous status data to the standby. a main control unit, after the main control unit receives the confirmation that the standby main control unit modifies the synchronization status data to the synchronized status data, the main control unit modifies the data in the synchronization status to be synchronized Data, the main control unit synchronizes the synchronized state data to the service processing unit, solves the problem of abnormal failure caused by data non-synchronization, realizes consistency of data of each unit, and saves maintenance cost.
在本实施例中,该主用主控单元修改该正在同步状态的数据为已同步状态的数据之后,该方法包括:该主用主控单元向该备用主控单元发送同步完成事件,该备用主控单元将本地不是已同步状态数据删除。In this embodiment, after the primary control unit modifies the data in the synchronized state to the synchronized state, the method includes: the primary control unit sends a synchronization completion event to the standby primary control unit, the standby The master unit deletes the local non-synchronized status data.
在本实施例中还提供了一种数据同步装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In the embodiment, a data synchronization device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图3是根据本发明实施例的一种数据同步装置的结构框图一,如图3所示,该装置包括:FIG. 3 is a structural block diagram 1 of a data synchronization apparatus according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes:
第一接收模块32,设置为主用主控单元接收业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元;The first receiving module 32 is configured to receive, by the main control unit, the application status data sent by the service processing unit, where the main control unit modifies the application status data to the unsynchronized status data, and the main control unit Synchronizing state data to the service processing unit;
第一修改模块34,设置为该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到备用主控单元;The first modifying module 34 is configured to modify, by the main control unit, the unsynchronized state data to be synchronizing state data, and the main controlling unit synchronizes the synchronizing state data to the standby main control unit;
第一确认模块36,设置为该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。The first confirmation module 36 is configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, and the main control unit modifies The data in the synchronized state is data in a synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
在本实施例中,该装置还包括:第一倒换模块,设置为该主用主控单元收到主备倒换事件,向该业务处理单元发送该主备倒换事件;In this embodiment, the device further includes: a first switching module, configured to: the primary control unit receives an active/standby switching event, and sends the active/standby switching event to the service processing unit;
第二接收模块,设置为在该业务处理单元中的数据状态均是已同步状态的情况下,该主用主控单元接收该业务处理单元发送的同步完成事件。 The second receiving module is configured to receive, when the data state in the service processing unit is the synchronized state, the primary control unit receives the synchronization completion event sent by the service processing unit.
在本实施例中,该装置还包括:第二倒换模块,设置为该主用主控单元收到主备倒换事件,向该业务处理单元发送该主备倒换事件;In this embodiment, the device further includes: a second switching module, configured to: the primary control unit receives an active/standby switching event, and sends the active/standby switching event to the service processing unit;
第三接收模块,设置为在该业务处理单元包括该未同步状态数据或者该申请状态数据的情况下,该主用主控单元接收正在同步状态数据,其中,该正在同步状态数据是该业务处理单元将该未同步状态数据或者该申请状态数据修改的;a third receiving module, configured to receive, in the case that the service processing unit includes the unsynchronized state data or the application status data, the primary control unit receives the synchronization status data, where the synchronization status data is the service processing The unit modifies the unsynchronized status data or the application status data;
第二修改模块,设置为该主用主控单元将该正在同步状态数据修改为未同步状态数据,该主用主控单元发送该未同步状态数据给该备用主控单元;a second modification module, configured to: the main control unit modifies the synchronization status data to the unsynchronized status data, and the main control unit sends the unsynchronized status data to the standby main control unit;
第二确认模块,设置为该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该未同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。a second confirmation module, configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby control unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the The data of the unsynchronized state is the data of the synchronized state, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
图4是根据本发明实施例的一种数据同步装置的结构框图二,如图4所示,该装置包括:4 is a structural block diagram 2 of a data synchronization apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes:
第三修改模块42,设置为主用主控单元接收备用主控单元的上线事件,该主用主控单元将未同步状态数据修改为正在同步状态,该主用主控单元发送该正在同步状态数据到该备用主控单元;The third modification module 42 is configured to receive an online event of the standby main control unit, wherein the main control unit modifies the unsynchronized state data to the synchronization state, and the main control unit sends the synchronization status. Data to the standby master unit;
第三确认模块44,设置为该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。The third confirmation module 44 is configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, and the main control unit modifies The data in the synchronized state is data in a synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
在本实施例中,该装置还包括:In this embodiment, the device further includes:
删除模块,设置为该主用主控单元向该备用主控单元发送同步完成事件,该备用主控单元将本地不是已同步状态数据删除。The module is deleted, and the main control unit sends a synchronization completion event to the standby main control unit, and the standby main control unit deletes the local non-synchronized state data.
在本发明的另一个实施例中,还提供了一种数据同步系统,包括:主用主控单元,备用主控单元,业务处理单元;In another embodiment of the present invention, a data synchronization system is further provided, including: an active main control unit, a standby main control unit, and a service processing unit;
该主用主控单元接收该业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元;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, and the main control unit synchronizes the unsynchronized status data to the Business processing unit;
该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到该备用主控单元;The master control unit modifies the unsynchronized state data to the synchronization state data, and the master control unit synchronizes the synchronization state data to the standby master unit;
该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元。The master control unit receives an acknowledgement message, the acknowledgement message includes the confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the data in the synchronized state to be The data of the synchronization state, the main control unit synchronizes the data of the synchronized state to the service processing unit.
下面结合优选实施例和实施方式对本发明进行详细说明。The invention will now be described in detail in conjunction with the preferred embodiments and embodiments.
本优选实施例提供一种数据同步机制实现主用主控单元、备用主控单元以及业务处理单 元(可能存在多个)数据一致性,其中,主用主控单元、备用主控单元以及业务处理单元和上述实施例中的主用主控单元、备用主控单元以及业务处理单元功能和作用相同,避免因为数据不一致导致的一系列问题。The preferred embodiment provides a data synchronization mechanism for implementing an active main control unit, a standby main control unit, and a service processing list. Meta (could exist multiple) data consistency, wherein the main control unit, the standby main control unit, and the service processing unit and the main control unit, the standby main control unit, and the service processing unit in the above embodiments function and function The same, avoid a series of problems caused by data inconsistency.
本优选实施例所述方法将主控单元分为“主用状态”、“备用状态”、“主备状态”以及“数据恢复状态”三种状态。其中“主用状态”表示只有主用主控单元,没有备用主控单元;“备用状态”表示同时有主用主控单元和备用主控单元,本单元是备用主控单元;“主备状态”表示同时有主用主控单元和备用主控单元,本单元是主用主控单元。“数据恢复状态”经过主备倒换后,主控单元和业务处理单元进行数据恢复的一种暂态。不存在只有备用主控单元,没有主用主控单元的情况。主控单元之间可以通过任何方式进行状态协商。The method in the preferred embodiment divides the main control unit into three states: "active state", "standby state", "active/standby state", and "data recovery state". The “active state” means that only the main control unit has no standby main control unit; the “standby state” indicates that there are both the main control unit and the standby main control unit, and the unit is the standby main control unit; "It means that there are both the main control unit and the standby main control unit. This unit is the main control unit. After the data recovery state passes the active/standby switchover, the main control unit and the service processing unit perform a transient state of data recovery. There is no case where there is only a standby master unit and no master master unit. Status negotiation can be performed between the master units in any way.
本优选实施例将所需同步的数据分为“申请状态”、“未同步状态”、“正在同步状态”以及“已同步状态”,该数据的“申请状态”、“未同步状态”、“正在同步状态”以及“已同步状态”与上述实施例中的申请状态数据,未同步状态数据,正在同步状态数据,已同步状态数据的功能和作用相同。The preferred embodiment divides the data to be synchronized into "application status", "unsynchronized status", "synchronizing status", and "synchronized status", "application status", "unsynchronized status", "data" The "synchronizing state" and the "synchronized state" are the same as the application state data in the above embodiment, the unsynchronized state data, the synchronizing state data, and the functions and functions of the synchronized state data.
下面分别阐述主用主控单元、备用主控单元和业务处理单元的操作步骤。The operation steps of the main control unit, the standby main control unit, and the service processing unit are separately described below.
一、主用主控单元操作步骤。First, the main control unit operation steps.
如果主用主控单元处于“主用状态”,针对如下事件的处理方法:If the active master unit is in the "active state", handle the following events:
1.收到业务处理单元的申请数据事件,进行相应处理后,将数据设置为“未同步状态”,保存到本地并下发到业务处理单元。下发到业务处理单元的数据,携带的状态为“未同步状态”。主控单元下发到业务处理单元的数据不仅可以携带状态信息,还可以携带其它信息,比如数据的唯一标识信息。1. After receiving the application data event of the service processing unit, the data is set to the "unsynchronized state" and saved to the local service and sent to the service processing unit. The data sent to the service processing unit carries the status of "unsynchronized status". The data sent by the main control unit to the service processing unit can carry not only status information, but also other information, such as unique identification information of the data.
2.收到备用主控单元在线事件,将本地保存的,并且是“未同步状态”的数据设置为“正在同步状态”,然后将本单元的状态设置为“主备状态”,开始同步数据到备用主控单元。2. Receive the online event of the standby main control unit, set the locally saved data of “unsynchronized status” to “synchronizing status”, and then set the status of this unit to “active and standby status” to start synchronizing data. Go to the alternate master unit.
3.收到同步完成事件,不处理。3. Receive the synchronization completion event and do not process it.
4.收到其它事件,记录异常日志。4. Receive other events and record the exception log.
如果主用主控单元处于“主备状态”,针对如下事件的处理方法:If the active MME is in the Active/Standby state, handle the following events:
1.收到业务处理单元的申请数据事件,查找本地数据,如果不存在此数据,对数据进行相应处理后,将数据设置为“未同步状态”,保存到本地并同步给备用主控单元;如果本地已经存在此数据,并且处于“已同步状态”,将数据携带本地状态下发到线卡;如果本地数据处于其它状态,不处理。1. Receive the application data event of the service processing unit, and find the local data. If the data does not exist, after the data is processed correspondingly, the data is set to “unsynchronized state”, saved to the local and synchronized to the standby main control unit; If the data already exists locally and is in the "synchronized state", the data is sent to the line card in the local state; if the local data is in other states, it is not processed.
2.收到备用主控单元的数据确认事件,如果本地数据处于“正在同步状态”,将数据设置为“已同步状态”,并判断如果没有“正在同步状态”的数据,则向备用主控单元和业务处理单元发送同步完成事件;如果本地数据处于“未同步状态”,将数据设置为“已同步状态”,并下发给业务处理单元;如果本地数据处于其它状态,不做任何处理。 2. Receive the data confirmation event of the standby main control unit. If the local data is in the “synchronizing state”, set the data to “synchronized state” and judge if there is no data in the “synchronizing state”, then the standby master The unit and the service processing unit send a synchronization completion event; if the local data is in the "unsynchronized state", the data is set to the "synchronized state" and sent to the service processing unit; if the local data is in another state, no processing is performed.
3.收到主备倒换事件,将本单元设置为“备用状态”。3. Receive the active/standby switchover event and set the unit to "standby state".
4.收到备用主控单元离线事件,将所有数据设置为“未同步状态”,向业务处理单元发送同步清除事件,将本单元设置为“主用状态”。4. Receive the offline event of the standby master unit, set all data to “unsynchronized state”, send a synchronization clear event to the service processing unit, and set the unit to “active state”.
5.收到其它事件,记录异常日志。5. Receive other events and record the exception log.
二、备用主控单元操作步骤。Second, the standby main control unit operation steps.
备用主控单元是处于“备用状态”的主控单元,针对如下事件的处理方法:The standby master unit is the master unit in the "standby state", and handles the following events:
1..收到主用主控单元发送的数据事件,将数据保存到本地,并设置数据为“已同步状态”,向主用主控单元发送数据确认事件。1. Receive the data event sent by the main control unit, save the data to the local, and set the data to “synchronized state” to send a data confirmation event to the main control unit.
2.收到主用主控单元发送的同步完成事件,将本地不是“已同步状态”的数据全部删除。2. Receive the synchronization completion event sent by the main control unit, and delete all the data that is not in the "synchronized state".
3.收到主备倒换事件,先将本地不是“已同步状态”的数据全部删除,向业务处理单元发送主备倒换事件,将本单元设置为“数据恢复状态”。3. Upon receiving the active/standby switchover event, all the data that is not in the "synchronized state" is deleted first, and the active/standby switchover event is sent to the service processing unit, and the unit is set to "data recovery state".
4.收到主用主控单元离线事件,将本地所有数据修改为“未同步状态”,向业务处理单元发送主备倒换事件,将本单元设置为“主用状态”。4. The offline event of the main control unit is received, and all the local data is changed to the “unsynchronized state”, and the active/standby switching event is sent to the service processing unit, and the unit is set to the “active state”.
5.收到其它事件,记录异常日志。5. Receive other events and record the exception log.
主控单元处于“数据恢复状态”的操作步骤:The main control unit is in the "data recovery state" steps:
1.收到业务处理单元的数据申请事件,如果本地已经存在该数据,将本地数据设置为“未同步状态”,向备用主控单元同步该数据;如果本地不存在该数据,将数据保存到本地,设置为“未同步状态”,向备用主控单元同步该数据。1. Receive the data request event of the service processing unit. If the data already exists in the local area, set the local data to “unsynchronized state”, and synchronize the data to the standby main control unit; if the data does not exist locally, save the data to Local, set to "unsynchronized state" to synchronize the data to the alternate master unit.
2.收到备用主控单元的数据确认事件,将本地数据修改为“已同步状态”,向业务处理单元回送数据。2. Receive the data confirmation event of the standby main control unit, modify the local data to “synchronized state”, and send back data to the service processing unit.
3.收到同步完成事件,删除本地不是“已同步状态”的数据,向备用主控单元发送同步完成时间,设置本板为“主备状态”。3. Receive the synchronization completion event, delete the data that is not in the "synchronized state", send the synchronization completion time to the standby main control unit, and set the board to the active/standby state.
4.收到其它事件,记录异常日志。4. Receive other events and record the exception log.
三、业务处理单元操作步骤。Third, the business processing unit operation steps.
业务处理单元需要处理业务配置,并根据需要将业务数据同步到主控单元,业务处理单元如何处理业务配置不属于本发明讨论范围。业务处理单元只和主用主控单元进行通信,不和备用主控单元进行通信。业务处理单元针对如下事件的处理方法:The service processing unit needs to process the service configuration and synchronize the service data to the main control unit as needed. How the service processing unit handles the service configuration is not within the 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 business processing unit handles the following events:
1.收到业务配置事件,根据需要将业务数据发送到主用主控单元,并在本地将数据设置为“申请状态”。1. Receive the service configuration event, send the service data to the active main control unit as needed, and set the data to the "application status" locally.
2.收到主用主控单元下发的数据确认事件,如果本地数据处于“正在同步状态”,将本 地数据修改为“已同步状态”,并判断如果没有“正在同步状态”的数据,向主用主控单元发送同步完成事件;如果本地数据处于其它状态,将本地数据修改为“已同步状态”。2. Receive the data confirmation event sent by the main control unit. If the local data is in the "synchronizing state", this will be The ground data is modified to "synchronized state", and it is judged that if there is no "synchronizing state" data, a synchronization completion event is sent to the main control unit; if the local data is in other states, the local data is modified to "synchronized state" .
3.收到主用主控单元同步完成事件,将本地所有处于“未同步状态”的数据设置为“已同步状态”。3. Receive the synchronization completion event of the main control unit, and set all local data in the “unsynchronized state” to “synchronized state”.
4.收到主备倒换事件,将处于“未同步状态”和“申请状态”的数据修改为“正在同步状态”,然后将“正在同步状态”的数据发送给新的主用主控单元;如果所有数据都处于“已同步状态”,则向主用主控单元发送同步完成事件。4. Receive the active/standby switchover event, modify the data in the "unsynchronized state" and "application state" to "synchronizing state", and then send the data of "synchronizing state" to the new active main control unit; If all data is in the "synchronized state", a synchronization completion event is sent to the active master unit.
5.收到同步清除事件,将所有处于“已同步状态”的数据设置为“未同步状态”。5. Receive a sync clear event and set all data in the "synchronized state" to "unsynchronized state".
6.收到其它事件,记录异常日志。6. Receive other events and record the exception log.
通过上述实施例,各单元可以在任何时刻进行主备倒换,主备倒换后,新的备用主控单元无需重启,可以进行连续的主备倒换。Through the above embodiments, each unit can perform active/standby switchover at any time. After the active/standby switchover, the new standby master control unit does not need to be restarted, and continuous active/standby switchover can be performed.
在本发明的另外一个优选实施例中,主控单元是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 is a detailed description of a typical NCP, a standby NCP, and a typical line card.
场景1,数据正常同步,图5是根据本发明优选实施例的数据正常同步流程示意图,如图5所示。Scenario 1, data is normally synchronized. 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.
步骤一,线卡向主NCP发送数据1,数据1在线卡上是“申请状态”。In 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 of the line card, the primary NCP saves to the local area and synchronizes to the line card, and the data 1 is “unsynchronized state” on the primary NCP.
步骤三,备NCP收到主NCP的数据后,保存到本地,并发送确认给主NCP,数据1在备NCP上是“已同步状态”。Step 3: After receiving the data of the primary NCP, the standby NCP saves it to the local area 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 of the standby NCP, the primary NCP modifies the local data to the “synchronized state” and sends it to the line card.
步骤五,线卡收到主NCP的数据后,修改本地数据为“已同步状态”。Step 5: After receiving the data of the primary NCP, the line card modifies the local data to “synchronized state”.
场景2,数据正常同步后,发生主备倒换场景,图6是根据本发明优选实施例的进行主备倒换流程示意图,如图6所示。In scenario 2, after the data is synchronized, the active/standby switching scenario occurs. FIG. 6 is a schematic diagram of performing an active/standby switching process according to a preferred embodiment of the present invention, as shown in FIG. 6.
步骤一,主NCP收到主备倒换事件,修改本板为“备用状态”。Step 1: The master NCP receives the active/standby switchover event and modifies the board as the “standby state”.
步骤二,备NCP收到主备倒换事件,修改本板为“数据恢复状态”,然后向线卡发送主备倒换事件。Step 2: The standby NCP receives the active/standby switchover event, and the board is modified to “data recovery state”, and then the active/standby switchover event is sent to the line card.
步骤三,线卡收到主备倒换事件,将所有“未同步状态”和“申请状态”的数据修改为“正在同步状态”。在这种场景下所有数据都是“已同步状态”,向主NCP发送同步完成事件。Step 3: The line card receives the active/standby switchover event, and changes all the data of the “unsynchronized state” and the “application state” to the “synchronizing state”. In this scenario, all data is "synchronized" and a synchronization completion event is sent to the primary NCP.
场景3,主备NCP进行正常数据同步过程中进行主备倒换。图7是根据本发明优选实施 例的主备NCP进行正常数据同步过程中进行主备倒换流程示意图,如图7所示。In scenario 3, the active and standby NCPs perform active/standby switchover during normal data synchronization. Figure 7 is a preferred implementation in accordance with the present invention The master/slave NCP performs the active/standby switchover process during normal data synchronization, as shown in Figure 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 primary 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 the data 1 is "synchronized state". When the primary NCP has not synchronized data 2 to the standby NCP, the active/standby switchover occurs.
步骤一,主NCP收到主备倒换事件,并将本板修改为“备用状态”。In step 1, the primary NCP receives the active/standby switchover event and changes the board to the "standby state".
步骤二,备NCP收到主备倒换事件,将本板修改为“数据恢复状态”,向线卡发送主备倒换事件。In the second step, the standby NCP receives the active/standby switchover event and changes the board to the data recovery state to send the active/standby switchover event to the line card.
步骤三,线卡收到主备倒换事件后,将数据2修改为“正在同步状态”,向主NCP发送数据2。Step 3: After receiving the active/standby switchover event, the line card changes the data 2 to “synchronizing state” and sends data 2 to the primary NCP.
步骤四,主NCP收到线卡的数据2,将数据2保存到本地,设置为“未同步状态”,并向备NCP发送数据2。Step 4: The master NCP receives the data 2 of the line card, saves the data 2 to the local, sets the status to "unsynchronized state", and sends data 2 to the standby NCP.
步骤五,备NCP收到主NCP的数据2,将数据2修改为“已同步状态”,并回送数据2确认。In step 5, the standby NCP receives the data 2 of the primary NCP, changes the data 2 to the "synchronized state", and returns the data 2 to confirm.
步骤六,主NCP收到数据2确认,将数据2修改为“已同步状态”,向线卡回送数据2。In step 6, the main NCP receives the data 2 confirmation, and the data 2 is modified to the "synchronized state", and the data 2 is sent back to the line card.
步骤七,线卡收到主NCP数据2,将数据2修改为“已同步状态”,向主NCP发送同步完成事件。Step 7: The line card receives the main NCP data 2, and the data 2 is modified to the “synchronized state”, and the synchronization completion event is sent to the main NCP.
步骤八,主NCP收到同步完成事件,向备NCP发送同步完成事件。In step 8, the primary NCP receives the synchronization completion event and sends a synchronization completion event to the standby NCP.
步骤九,备NCP收到同步完成事件,不做任何处理。In step IX, the standby NCP receives the synchronization completion event and does nothing.
至此,主NCP、备NCP、线卡三者的数据和状态达到一致。At this point, the data and status of the primary NCP, the standby NCP, and the line card are consistent.
场景4,插上备NCP后,主备进行数据批量同步。图8是根据本发明优选实施例的插上备NCP进行数据批量同步流程示意图,如图8所示。In scenario 4, after the standby NCP is inserted, the active and standby devices perform data batch synchronization. FIG. 8 is a schematic diagram of a flow of data batch synchronization by inserting a standby NCP 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 status is "unsynchronized". If you plug in the standby NCP board, the processing steps are as follows:
步骤一,主NCP收到备NCP上线事件,将数据1设置为“正在同步状态”,将本板修改为“主备状态”,向备NCP同步数据1。Step 1: The primary NCP receives the standby NCP online event, sets the data 1 to the “synchronizing state”, and modifies the board to the “active/standby state” to synchronize data 1 with the standby NCP.
步骤二,备NCP收到数据1,保存到本地,状态为“已同步状态”,向主NCP回送数据1确认。In the second step, the standby NCP receives the data 1 and saves it to the local state. The status is “synchronized state”, and the data is acknowledged to the primary NCP.
步骤三,主NCP收到数据1确认,将数据1修改为“已同步状态”,向备NCP和主NCP发送同步完成事件。In step 3, the primary NCP receives the data 1 acknowledgment, and modifies the data 1 to the "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 “synchronized state”. At this time, no data needs to be deleted.
步骤五,线卡收到同步完成事件,将数据1修改为“已同步状态”。In step 5, the line card receives the synchronization completion event, and the data 1 is modified to the “synchronized state”.
至此,主NCP、备NCP、线卡三者的数据和状态达到一致。At this point, the data and status of the primary NCP, the standby NCP, and the line card are consistent.
场景五,主备进行数据同步过程中,发生主备倒换。图9是根据本发明优选实施例的主备进行数据同步过程中发生主备倒换流程示意图,如图9所示。Scenario 5: During the data synchronization between the active and standby devices, the active/standby switchover occurs. FIG. 9 is a schematic diagram of an active/standby switchover process performed during data synchronization between the active and standby devices 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 status is "synchronized state", data 2, the status is "unsynchronized state"; the main NCP has data 1, the status is "synchronized state", the data 2 is "unsynchronized state"; the standby NCP There are data 1 and data 2, and the status is "synchronized state". The master/slave switchover occurs when the standby NCP has not sent data 2 to the master NCP for confirmation.
步骤一,主NCP收到主备倒换事件,将本板设置为“备用状态”。Step 1: The master NCP receives the active/standby switchover event and sets the board to the standby state.
步骤二,备NCP收到主备倒换事件,将本板设置为“数据恢复状态”,向线卡发送主备倒换事件。Step 2: The standby NCP receives the active/standby switchover event, and sets the board to the data recovery state to send the active/standby switchover event to the line card.
步骤三,线卡收到主备倒换事件,将数据2设置为“正在同步状态”,向主NCP发送数据2。Step 3: The line card receives the active/standby switchover event, and sets the data 2 to “synchronizing state” to send data 2 to the primary NCP.
步骤四,主NCP收到数据2,将数据2修改为“未同步状态”,将数据2同步给备NCP。Step 4: The primary NCP receives the data 2, and the data 2 is modified to the "unsynchronized state", and the data 2 is synchronized to the standby NCP.
步骤五,备NCP收到数据2,将数据2设置为“已同步状态”,向主NCP发送数据2确认。In step 5, the standby NCP receives the data 2, sets the data 2 to the "synchronized state", and sends a data 2 confirmation to the primary NCP.
步骤六,主NCP收到数据2确认,将数据2修改为“已同步状态”,向线卡发送数据2。In step 6, the master NCP receives the data 2 acknowledgment, and modifies the data 2 to the "synchronized state", and sends the data 2 to the line card.
步骤七,线卡收到数据2,将数据2修改为“已同步状态”,向主NCP发送同步完成。Step 7: The line card receives the data 2, and the data 2 is modified to the "synchronized state", and the synchronization completion is sent to the main NCP.
步骤八,主NCP收到同步完成,向备NCP发送同步完成事件。In 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、线卡三者的数据和状态达到一致。At this point, the data and status of the primary NCP, the standby NCP, and the line card are consistent.
本优选实施例通过双确认机制,避免因为数据同步导致的异常故障,并且能够从根本上保证主控单元、备用主控单元以及业务处理单元(可能存在多个)的数据在任何时刻都是一致状态的。从而可以避免因为数据不一致导致的一系列问题。The preferred embodiment avoids abnormal faults caused by data synchronization through a double acknowledgement mechanism, and can fundamentally ensure that data of the master unit, the standby master unit, and the service processing unit (possibly multiple) are consistent at any time. State. This avoids a series of problems caused by data inconsistency.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行上述实施例的方法步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the storage medium may be configured to store program code for performing the method steps of the above embodiment:
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述实施例的方法。 Optionally, in the embodiment, the processor executes the method of the above embodiment according to the stored program code in the storage medium.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
基于本发明实施例提供的上述技术方案,采用主用主控单元接收业务处理单元发送的申请状态数据,该主用主控单元将该申请状态数据修改为未同步状态数据,该主用主控单元将该未同步状态数据同步给该业务处理单元;该主用主控单元将该未同步状态数据修改为正在同步状态数据,该主用主控单元同步该正在同步状态数据到备用主控单元;该主用主控单元接收确认消息,该确认消息包括该备用主控单元将该正在同步状态数据修改该已同步状态数据的确认内容,该主用主控单元修改该正在同步状态的数据为已同步状态的数据,该主用主控单元同步该已同步状态的数据到该业务处理单元,解决了数据不同步导致的异常故障的问题,实现了各单元数据的一致性,节约了维护成本。 According to the foregoing technical solution provided by the embodiment of the present invention, 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 to the unsynchronized status data, and the main control unit The unit synchronizes the unsynchronized state data to the service processing unit; the master control unit modifies the unsynchronized state data to the synchronization state data, and the master control unit synchronizes the synchronization state data to the standby master unit The master control unit receives the confirmation message, the confirmation message includes the confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the data in the synchronization state to The data of the synchronized state, the main control unit synchronizes the data of the synchronized state to the service processing unit, solves the problem of abnormal fault caused by data unsynchronization, realizes consistency of data of each unit, and saves maintenance cost. .

Claims (11)

  1. 一种数据同步方法,包括:A data synchronization method includes:
    主用主控单元接收业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The main control unit receives 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 synchronizes the unsynchronized status data. Giving the business processing unit;
    所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到备用主控单元;The main control unit modifies the unsynchronized state data to be synchronizing state data, and the main control unit synchronizes the synchronizing state data to the standby main control unit;
    所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The main control unit receives an acknowledgement message, the confirmation message includes a confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, and the main control unit modifies the synchronization. The data of the state is the data of the synchronized state, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
  2. 根据权利要求1所述的方法,其中,还包括:The method of claim 1 further comprising:
    所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;Receiving, by the active main control unit, an active/standby switching event, and sending the active/standby switching event to the service processing unit;
    在所述业务处理单元中的数据状态均是已同步状态的情况下,所述主用主控单元接收所述业务处理单元发送的同步完成事件。In a case where the data states in the service processing unit are all in a synchronized state, the primary control unit receives a synchronization completion event sent by the service processing unit.
  3. 根据权利要求1所述的方法,其中,还包括:The method of claim 1 further comprising:
    所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;Receiving, by the active main control unit, an active/standby switching event, and sending the active/standby switching 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 main control unit receives the synchronization state data, wherein the synchronization state data is the service processing unit. Modifying the unsynchronized state data or the application state data;
    所述主用主控单元将所述正在同步状态数据修改为未同步状态数据,所述主用主控单元发送所述未同步状态数据给所述备用主控单元;The main control unit modifies the synchronization status data to unsynchronized status data, and the main control unit sends the unsynchronized status data to the standby main control unit;
    所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述未同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。The primary control unit receives an acknowledgement message, the acknowledgement message includes a confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the The data of the unsynchronized state is data of the synchronized state, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
  4. 一种数据同步方法,包括:A data synchronization method includes:
    主用主控单元接收备用主控单元的上线事件,所述主用主控单元将未同步状态数据修改为正在同步状态,所述主用主控单元发送所述正在同步状态数据到所述备用主控单元;The main control unit receives an online event of the standby main control unit, the main control unit modifies the unsynchronized status data to the synchronized state, and the main control unit sends the synchronizing status data to the standby Main control unit
    所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述正在同 步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到业务处理单元。The primary control unit receives an acknowledgement message, the acknowledgement message includes a confirmation content that the standby master unit modifies the synchronized state data to the synchronized state data, and the master control unit modifies the Being in the same The data of the step state is data of the synchronized state, and the master control unit synchronizes the data of the synchronized state to the service processing unit.
  5. 根据权利要求1所述的方法,其中,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据之后,所述方法包括:The method according to claim 1, wherein after the primary control unit modifies the data of the synchronized state to the synchronized 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 non-synchronized state data.
  6. 一种数据同步装置,包括:A data synchronization device comprising:
    第一接收模块,设置为主用主控单元接收业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The first receiving module is configured to receive, by the main control unit, application status data sent by the service processing unit, where the main control unit modifies the application status data into unsynchronized status data, and the main control unit The unsynchronized state data is synchronized to the service processing unit;
    第一修改模块,设置为所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到备用主控单元;a first modifying module, configured to: the primary control unit modifies the unsynchronized state data to be synchronized state data, and the primary MME synchronizes the synchronized state data to the standby MME;
    第一确认模块,设置为所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。a first confirmation module, configured to receive, by the primary control unit, an acknowledgement message, where the confirmation message includes a confirmation content that the standby control unit modifies the synchronized state data to the synchronized state data, the primary The data of the synchronization state is modified by the main control unit to be the data of the synchronized state, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
  7. 根据权利要求6所述的装置,其中,还包括:The apparatus of claim 6 further comprising:
    第一倒换模块,设置为所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;The first switching module is configured to receive the active/standby switching event by the active main control unit, and send the active/standby switching event to the service processing unit;
    第二接收模块,设置为在所述业务处理单元中的数据状态均是已同步状态的情况下,所述主用主控单元接收所述业务处理单元发送的同步完成事件。The second receiving module is configured to receive, when the data states in the service processing unit are in a synchronized state, the primary control unit receives a synchronization completion event sent by the service processing unit.
  8. 根据权利要求6所述的装置,其中,还包括:The apparatus of claim 6 further comprising:
    第二倒换模块,设置为所述主用主控单元收到主备倒换事件,向所述业务处理单元发送所述主备倒换事件;The second switching module is configured to receive the active/standby switching event by the active main control unit, and send the active/standby switching event to the service processing unit;
    第三接收模块,设置为在所述业务处理单元包括所述未同步状态数据或者所述申请状态数据的情况下,所述主用主控单元接收正在同步状态数据,其中,所述正在同步状态数据是所述业务处理单元将所述未同步状态数据或者所述申请状态数据修改的;a third receiving module, configured to: when the service processing unit includes the unsynchronized state data or the application state data, the main control unit receives the synchronization state data, where the synchronization state is Data is that the service processing unit modifies the unsynchronized state data or the application state data;
    第二修改模块,设置为所述主用主控单元将所述正在同步状态数据修改为未同步状态数据,所述主用主控单元发送所述未同步状态数据给所述备用主控单元;a second modification module, configured to: the main control unit modifies the synchronization status data into unsynchronized status data, and the main control unit sends the unsynchronized status data to the standby main control unit;
    第二确认模块,设置为所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改所述未同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已 同步状态的数据到所述业务处理单元。a second confirmation module, configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, the main Modifying, by the main control unit, the data of the unsynchronized state into data of a synchronized state, where the main control unit synchronizes the The data of the synchronization state is sent to the service processing unit.
  9. 一种数据同步装置,包括:A data synchronization device comprising:
    第三修改模块,设置为主用主控单元接收备用主控单元的上线事件,所述主用主控单元将未同步状态数据修改为正在同步状态,所述主用主控单元发送所述正在同步状态数据到所述备用主控单元;a third modification module, configured to receive an online event of the standby main control unit, wherein the main control unit modifies the unsynchronized state data to the synchronization state, and the main control unit sends the ongoing Synchronizing status data to the standby master unit;
    第三确认模块,设置为所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改所述已同步状态数据的确认内容,所述主用主控单元修改正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到业务处理单元。a third confirmation module, configured to receive, by the main control unit, an acknowledgement message, where the confirmation message includes the confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, the main The data of the synchronization state is modified by the main control unit to be the data of the synchronized state, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
  10. 根据权利要求9所述的装置,其中,所述装置包括:The device of claim 9 wherein said device comprises:
    删除模块,设置为所述主用主控单元向所述备用主控单元发送同步完成事件,所述备用主控单元将本地不是已同步状态数据删除。And deleting the module, the primary control unit is configured to send a synchronization completion event to the standby main control unit, and the standby main control unit deletes the local non-synchronized state data.
  11. 一种数据同步系统,包括:主用主控单元,备用主控单元,业务处理单元;A data synchronization system includes: an active main control unit, a standby main control unit, and a service processing unit;
    所述主用主控单元接收所述业务处理单元发送的申请状态数据,所述主用主控单元将所述申请状态数据修改为未同步状态数据,所述主用主控单元将所述未同步状态数据同步给所述业务处理单元;The main control unit receives 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 Synchronizing state data to the service processing unit;
    所述主用主控单元将所述未同步状态数据修改为正在同步状态数据,所述主用主控单元同步所述正在同步状态数据到所述备用主控单元;The main control unit modifies the unsynchronized state data to be synchronizing state data, and the main control unit synchronizes the synchronizing state data to the standby main control unit;
    所述主用主控单元接收确认消息,所述确认消息包括所述备用主控单元将所述正在同步状态数据修改已同步状态数据的确认内容,所述主用主控单元修改所述正在同步状态的数据为已同步状态的数据,所述主用主控单元同步所述已同步状态的数据到所述业务处理单元。 The main control unit receives an acknowledgement message, the confirmation message includes a confirmation content that the standby main control unit modifies the synchronized state data to the synchronized state data, and the main control unit modifies the synchronization. The data of the state is the data of the synchronized state, and the main control unit synchronizes the data of the synchronized state to the service processing unit.
PCT/CN2016/070431 2015-07-27 2016-01-07 Data synchronization method, apparatus, and system WO2017016196A1 (en)

Applications Claiming Priority (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
CN201510448471.3 2015-07-27

Publications (1)

Publication Number Publication Date
WO2017016196A1 true WO2017016196A1 (en) 2017-02-02

Family

ID=57883985

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/070431 WO2017016196A1 (en) 2015-07-27 2016-01-07 Data synchronization method, apparatus, and system

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112612654A (en) * 2021-01-08 2021-04-06 成都民航空管科技发展有限公司 Multi-machine main-standby switching method of air traffic control automation system and redundancy service system

Families Citing this family (2)

* 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 中兴通讯股份有限公司 Main/standby switching method, BRAS (broadband remote Access Server) equipment and storage medium

Citations (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
JP2008140289A (en) * 2006-12-05 2008-06-19 Toshiba Corp Storage device
CN102075580A (en) * 2011-01-20 2011-05-25 迈普通信技术股份有限公司 Method and system for storing synchronous data in distributive network equipment
CN103077242A (en) * 2013-01-11 2013-05-01 北京佳讯飞鸿电气股份有限公司 Method for hot standby of dual database servers
CN104253707A (en) * 2013-06-28 2014-12-31 上海斐讯数据通信技术有限公司 Master disk and standby disk multicast service synchronizing method

Family Cites Families (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
EP1564656B1 (en) * 2004-02-10 2006-09-13 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
CN102510408B (en) * 2011-11-30 2015-01-14 武汉烽火网络有限责任公司 Method for realizing TCP (transmission control protocol) application main and standby changeover
CN103188065B (en) * 2011-12-30 2016-08-17 北京新媒传信科技有限公司 The method and system of data syn-chronization in a kind of business service
CN103902405B (en) * 2012-12-28 2017-02-08 杭州宏杉科技有限公司 Quasi-continuity data replication method and device

Patent Citations (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
JP2008140289A (en) * 2006-12-05 2008-06-19 Toshiba Corp Storage device
CN102075580A (en) * 2011-01-20 2011-05-25 迈普通信技术股份有限公司 Method and system for storing synchronous data in distributive network equipment
CN103077242A (en) * 2013-01-11 2013-05-01 北京佳讯飞鸿电气股份有限公司 Method for hot standby of dual database servers
CN104253707A (en) * 2013-06-28 2014-12-31 上海斐讯数据通信技术有限公司 Master disk and standby disk multicast service synchronizing method

Cited By (2)

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

Also Published As

Publication number Publication date
CN106657168A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
CN103744809B (en) Vehicle information management system double hot standby method based on VRRP
CN104486319B (en) Suitable for the configuration file real-time synchronization method and its system of high-availability system
EP2144400B1 (en) Distributed ethernet system and method for detecting fault based thereon
WO2018049983A1 (en) Data synchronization method and system, and synchronization acquisition method and device
WO2020224237A1 (en) Blockchain consensus method, apparatus, device and storage medium
DE102014204752A1 (en) ERROR TOLERANT CLOCK NETWORK
US10892839B2 (en) Method for fast reconfiguration of GM clocks in the TSN network by means of an explicit teardown message
CN106656589B (en) A kind of server dual-machine hot backup system
CN110601903A (en) Data processing method and device based on message queue middleware
CN108228397A (en) The method and apparatus that a kind of cluster span computer room synchronizes
CN103580915A (en) Method and device for determining main control node of trunking system
WO2017162079A1 (en) Data synchronization method and apparatus
WO2017016196A1 (en) Data synchronization method, apparatus, and system
WO2021057438A1 (en) Main/standby switching method and apparatus, bras device, and storage medium
CN105956207A (en) Binlog-based configurable mysql database real-time synchronization method
CN105591801B (en) A kind of virtual network function VNF fault handling method and VNF management equipment
WO2021115043A1 (en) Distributed database system and data disaster backup drilling method
CN113438111A (en) Method for restoring RabbitMQ network partition based on Raft distribution and application
JP5449229B2 (en) Call relief system and call relief method
CN112929438A (en) Business processing method and device of double-site distributed database
CN108984346B (en) Method, system and storage medium for producing data disaster tolerance
CN111083074A (en) High availability method and system for main and standby dual OSPF state machines
WO2016074570A1 (en) Security monitoring method and system
CN111241200B (en) Master-slave synchronous processing method and device based on SQLite database
CN114301763A (en) Distributed cluster fault processing method and system, electronic device and storage medium

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: 16829567

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: 16829567

Country of ref document: EP

Kind code of ref document: A1