Data synchronization method, standby device, main device and control unit

By synchronizing data among modules ordered in the backup device, the problems of data loss and delay during the master-slave switching of the centralized control unit of the transmission network are solved, achieving highly reliable and efficient data transmission.

CN121644329APending Publication Date: 2026-03-10HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

When the primary device of the centralized control unit of the transmission network fails, there are problems of data loss and increased latency during the process of the backup device taking over the operation of the primary device, which leads to a decrease in the reliability of the primary-backup switchover.

Method used

A data synchronization method is adopted, which uses N+1 modules in the backup device to obtain backup data and response messages from the primary module through the first backup module, triggering the response of subsequent modules, ensuring data consistency and reliability, avoiding data loss, and reducing switching latency.

Benefits of technology

This effectively avoids abnormal data loss when the backup device takes over from the primary device, reduces switching latency, and improves the reliability of primary/backup switching and data synchronization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121644329A_ABST
    Figure CN121644329A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data synchronization method, a standby device, a main device and a control unit, based on the data synchronization method, when the main device breaks down and the standby device replaces the main device to work, abnormal loss of data stored in the standby device can be effectively avoided, and the reliability of data synchronization is improved. And the time delay of replacing the main device by the standby device is reduced. The method comprises the steps that a first standby module obtains a first response message, wherein the first response message is a message generated when a first main module responds to a target message; the first backup module receives first backup data from the first main module, the first backup data is result data generated when the first main module processes the target message, and the first backup module is used for transmitting the first backup data to the first main module when the main device breaks down. And replacing the first main module according to the first backup data, and triggering a second backup module to respond through the first response message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a data synchronization method, a backup device, a primary device, and a control unit. Background Technology

[0002] The transport network comprises multiple transport devices and provides a path for service transmission between two service nodes. This path may include one or more transport devices. For management and operation, the transport network includes a central control unit (CCU). To ensure CCU reliability, the CCU supports primary / backup failover. Figure 1 This diagram illustrates a primary / backup switchover process for an existing centralized control unit (CCU). The CCU includes a primary device 100 and a backup device 110. If the primary device 100 fails, the backup device 110 takes over the operation of the primary device 100. The primary device 100 may include a protocol layer 101 and an application layer 102, while the backup device 110 may include a protocol layer 111 and an application layer 112.

[0003] Step 101: The protocol layer 101 of the master device 100 receives the first message from the transmission device.

[0004] Step 102: The protocol layer 101 of the primary device 100 sends a first message to the protocol layer 111 of the backup device 110.

[0005] After receiving the first message, the protocol layer 101 of the master device 100 sends the first message to the protocol layer 111 in order to back up the first message.

[0006] Step 103: The protocol layer 101 of the master device 100 sends a second message to the application layer 102.

[0007] Protocol layer 101 processes the first message to obtain a second message. This processing may include parsing, packet reassembly, and other operations. The second message triggers a response from application layer 102. If protocol layer 101 successfully sends the second message to application layer 102, protocol layer 111 of backup device 110 deletes the first message.

[0008] Step 104: The application layer 102 of the primary device 100 sends backup data to the application layer 112 of the backup device 110.

[0009] Application layer 102 processes the second message to obtain backup data. If the primary device 100 fails, the backup device 110 takes over the operation of the primary device 100. However, if the application layer 102 of the primary device 100 fails after receiving the second message, and the application layer 102 has not yet successfully backed up the backup data to the backup device 110, and the protocol layer 111 of the backup device 110 has deleted the first message, then if the backup device 110 takes over the operation of the primary device 100, the backup device 110 will not have data related to the first message, and the application layer 112 will not be able to successfully take over the operation of the application layer 102 of the primary device 100. In order to successfully take over the operation of the primary device 100, the backup device 110 needs to obtain the first message again from the transmission device. This increases the latency of the primary / backup switchover, and the existing primary / backup switchover method is prone to data loss, reducing the reliability of the primary / backup switchover. Summary of the Invention

[0010] This application provides a data synchronization method. Based on this data synchronization method, when the primary device fails and the backup device takes over the work of the primary device, the abnormal loss of data stored in the backup device can be effectively avoided, and the latency of the backup device taking over the work of the primary device can be reduced.

[0011] In a first aspect, embodiments of this application provide a data synchronization method applied to a backup device. The method includes: a first backup module receiving a first response message; the backup device comprising N+1 backup modules ordered sequentially according to the response order, where N is any integer greater than or equal to 1; the first backup module being one of the first N backup modules; the first response message being a message generated by a first primary module in response to a target message; the first response message being used to trigger a response from a second primary module; the first backup module receiving first backup data from the first primary module; the first backup data being result data generated by the first primary module processing the target message; the first backup module being used to take over from the first primary module according to the first backup data in the event of a failure in the primary device; and being used to trigger a response from a second backup module through the first response message; the second backup module being ordered after the first backup module among the N+1 backup modules; and the primary device comprising the first primary module and the second primary module. The target message may include topology information, routing requests, fault indication information, service attribute information, device status information, link status information, alarm information, configuration information, statistical information, security information, policy information, etc.

[0012] Using the method described in this aspect, the first backup module can obtain first backup data from the first primary module. Therefore, in the event of a failure of the primary device, the first backup module can take over the operation of the primary module based on the first backup data, ensuring the reliability of the primary / backup switchover. Furthermore, the first backup module can also obtain a first response message from the first primary module. This first response message can trigger responses from all backup modules ranked after the first backup module, thereby preventing abnormal data loss during the primary / backup switchover and reducing the latency for the backup device to take over the operation of the primary device.

[0013] Based on the first aspect, in one optional implementation, after the first backup module obtains the first response message, the method further includes: if the primary device fails, the first backup module sends the first response message to the second backup module; the second backup module responds to the first response message to obtain second backup data, the second backup data being the result data generated by the second backup module processing the first response message; the second backup module takes over from the second primary module according to the second backup data.

[0014] In this implementation, if the primary device fails and the first backup module finds that the first response message has not been deleted, it means that the first response message has not been successfully responded to by N+1 primary modules. In order to avoid the loss of data during the primary-backup switchover, the first backup module sends the cached first response message to the second backup module to trigger the response of the second backup module through the first response message. Then, each backup module in the backup device, which is ordered after the first backup module, responds to the first response message again.

[0015] Based on the first aspect, in one optional implementation, after the second backup module responds to the first response message to obtain the second backup data, the method further includes: the first backup module receiving a first response message identifier from the second backup module, the first response message identifier being used to identify the first response message; and the first backup module deleting the first response message based on the first response message identifier.

[0016] In this implementation, if the primary device fails and the backup device takes over, and the second backup module successfully responds to the first response message, it sends a first response message identifier to the first backup module. The first backup module determines that the second backup module has successfully responded to the first response message based on the first response message identifier. Then, the first backup module deletes the first response message identifier. This approach ensures the reliability of the primary / backup switchover, prevents abnormal data loss, and improves the storage utilization of the corresponding cache area of ​​the first backup module.

[0017] Based on the first aspect, in an optional implementation, before the first backup module receives the first response message identifier from the second backup module, the method further includes: the second backup module sending a second response message to the third backup module, the third backup module being ordered after the second backup module among N+1 backup modules, the second response message being a message generated by the second backup module in response to the first response message; the third backup module responding to the second response message to obtain third backup data, the third backup data being result data generated by the third backup module processing the second response message; the third backup module taking over the third primary module according to the third backup data, the primary device further including the third primary module; the third backup module sending a second response message identifier to the second backup module, the second response message identifier being used to identify the second response message; and the second backup module obtaining the corresponding first response message identifier according to the second response message identifier.

[0018] In this implementation, if the primary device fails and the backup device takes over, and the third backup module successfully responds to the second response message, a second response message identifier is sent to the second backup module. The second backup module has already established a correspondence between the first and second response message identifiers. Therefore, based on the second response message identifier, the second backup module determines that the third backup module has successfully responded to the second response message. The second backup module then sends the first response message identifier corresponding to the second response message identifier to the first backup module. By sending the first response message identifier to the first backup module, the second backup module indicates to the first backup module that both the second and third backup modules have successfully responded to the first response message. The first backup module deletes the first response message based on the first response message identifier. This approach ensures the reliability of the primary / backup switchover, avoids abnormal data loss, and also improves the storage utilization of the cache corresponding to the first backup module.

[0019] Based on the first aspect, in one optional implementation, after the first backup module receives the first backup data from the first primary module, the method further includes: the second backup module receiving the second backup data from the second primary module, the second backup data being the result data generated by the second primary module in processing the first response message, the second backup module being used to take over the second primary module according to the second backup data in the event of a failure of the primary device.

[0020] Using this implementation, among N+1 backup modules, the second backup module, which is ordered after the first backup module, can achieve primary / backup switching without backing up the response messages of the second primary module at the same level, thereby improving the efficiency of data synchronization and reducing the latency of data synchronization.

[0021] Based on the first aspect, in one optional implementation, after the first backup module receives the first backup data from the first primary module, the method further includes: the second backup module obtaining a second response message, the second response message being a message generated by the second primary module in response to the first response message, the second response message being used to trigger a response from the third primary module, and the primary device further including the third primary module.

[0022] Using this implementation, among the N+1 backup modules, the second backup module, which is ordered after the first backup module, also needs to back up the response messages of the second primary module at the same level. This effectively ensures the consistency of data between upstream and downstream backup modules among the N+1 backup modules, guarantees the reliability of primary-backup switching, and effectively avoids data loss.

[0023] Based on the first aspect, in one optional implementation, after the first backup module receives the first backup data from the first primary module, the method further includes: the first backup module receiving a first response message identifier from the first primary module, the first response message identifier being used to identify the target message; and the first backup module deleting the first response message based on the first response message identifier.

[0024] In this implementation, when the primary device is in normal working condition, if the first primary module determines that all primary modules have successfully responded to the first response message, the first primary module sends a first response message identifier to the first backup module so that the first backup module deletes the first response message, thereby improving the storage utilization of the first backup module's cache.

[0025] Based on the first aspect, in one optional implementation, after the second backup module obtains the second response message, the method further includes: the second backup module sending a first response message identifier to the first backup module, the first response message identifier being used to identify the first response message; and the first backup module deleting the first response message based on the first response message identifier.

[0026] With this implementation, when the primary device is working normally, the first backup module deletes the first response message when it receives the first response message identifier from the second backup module, thereby improving the storage utilization of the cache area corresponding to the first backup module.

[0027] Based on the first aspect, in one optional implementation, after the second backup module sends the first response message identifier to the first backup module, the method further includes: the third backup module receiving third backup data from the third primary module, the third backup data being the result data generated by the third primary module processing the second response message, the third backup module being used to take over the third primary module according to the third backup data in the event of a failure of the primary device; the third backup module sending the second response message identifier to the second backup module, the second response message identifier being used to identify the second response message; and the second backup module deleting the second response message according to the second response message identifier.

[0028] In this implementation, if the third backup module successfully responds to the second response message, the second backup module is instructed to delete the second response message by sending a second response message identifier to the second backup module, thereby improving the storage utilization of the cache area corresponding to the second backup module.

[0029] Secondly, embodiments of this application provide a data synchronization method applied to a primary device. The method includes: a first primary module obtaining a target message; the primary device including N+1 primary modules ordered in the order of response, where N is any integer greater than or equal to 1, and the first primary module being one of the first N primary modules; the first primary module sending a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being used to trigger a response from the second primary module, the second primary module being ordered after the first primary module among the N+1 primary modules; the first primary module sending the first response message to a first backup module; and the first primary module sending first backup data to the first backup module, the first backup data being result data generated by the first primary module processing the target message, the first backup module being used to take over from the first primary module according to the first backup data in the event of a failure of the primary device.

[0030] For an explanation of the beneficial effects in this regard, please refer to the first aspect; further details will not be elaborated here.

[0031] Based on the second aspect, in an optional implementation, after the first primary module sends a first response message to the second primary module, the method further includes: the second primary module sending second backup data to the second backup module, the second backup data being the result data generated by the second primary module processing the first response message, and the second backup module being used to take over the second primary module according to the second backup data in the event of a failure of the primary device.

[0032] Based on the second aspect, in an optional implementation, after the first primary module sends a first response message to the second primary module, the method further includes: the second primary module sending a second response message to the second backup module, wherein the second response message is a message generated by the second primary module in response to the first response message.

[0033] Based on the second aspect, in an optional implementation, after the first primary module sends the first response message to the second primary module, the method further includes: the second primary module sending a first response message identifier to the first primary module, the first response message identifier being used to identify the first response message; and the first primary module deleting the first response message based on the first response message identifier.

[0034] Based on the second aspect, in an optional implementation, before the second primary module sends the first response message identifier to the first primary module, the method further includes: the second primary module receiving a second response message identifier from a third primary module, the second response message identifier being used to identify the second response message, the third primary module being ordered after the second primary module among N+1 primary modules; and the second primary module obtaining the corresponding first response message identifier based on the second response message identifier.

[0035] Based on the second aspect, in an optional implementation, before the second primary module receives the second response message identifier from the third primary module, the method further includes: the second primary module sending a second response message to the third primary module, the second response message being a message generated by the second primary module in response to the first response message, and the second response message being used to trigger a response from the third primary module.

[0036] Thirdly, embodiments of this application provide a backup device, which includes N+1 backup modules ordered sequentially according to the order of response, where N is any integer greater than or equal to 1. A first backup module is used to: obtain a first response message, wherein the first backup module is one of the first N backup modules ordered, the first response message is a message generated by the first primary module in response to a target message, and the first response message is used to trigger a response from the second primary module; receive first backup data from the first primary module, wherein the first backup data is result data generated by the first primary module in processing the target message, and the first backup module is used to take over the first primary module according to the first backup data in the event of a failure of the primary device, and is used to trigger a response from the second backup module through the first response message, wherein the second backup module is ordered after the first backup module among the N+1 backup modules, and the primary device includes the first primary module and the second primary module.

[0037] For an explanation of the beneficial effects in this regard, please refer to the first aspect; further details will not be elaborated here.

[0038] Fourthly, embodiments of this application provide a primary device comprising N+1 primary modules ordered in sequence according to the order of response, where N is any integer greater than or equal to 1. A first primary module is configured to: obtain a target message, wherein the first primary module is one of the first N primary modules; send a first response message to a second primary module, wherein the first response message is a message generated by the first primary module in response to the target message, and the first response message is used to trigger a response from the second primary module, wherein the second primary module is ordered after the first primary module among the N+1 primary modules; send a first response message to a first backup module; and send first backup data to the first backup module, wherein the first backup data is result data generated by the first primary module in processing the target message, and the first backup module is configured to take over from the first primary module according to the first backup data in the event of a failure of the primary device.

[0039] For an explanation of the beneficial effects in this regard, please refer to the first aspect; further details will not be elaborated here.

[0040] Fifthly, embodiments of this application provide a backup device, including a processor, a memory, and a transceiver. The transceiver is used to implement the function of communicating with the main device as described in any of the first aspects above. The processor implements the processing-related functions as described in any of the first aspects by calling software modules stored in the memory.

[0041] In a sixth aspect, embodiments of this application provide a primary device, including a processor, a memory, and a transceiver. The transceiver is used to implement the communication function with a backup device as described in any of the second aspects above. The processor implements the processing-related functions as described in any of the second aspects by calling software modules stored in the memory.

[0042] In a seventh aspect, embodiments of this application provide a control unit, including a primary device and a backup device, wherein the backup device is as described in any of the third aspects above, and the primary device is as described in any of the fourth aspects above.

[0043] Eighthly, embodiments of this application provide a chip system including a processor and a communication interface. The communication interface is used to receive data and transmit it to the processor, or to send data from the processor to another chip system. The processor is used to perform the method described in any of the first aspects above, or the method described in any of the second aspects above.

[0044] Ninthly, embodiments of this application provide a computer-readable storage medium including computer program instructions, which, when executed by a processor, cause the processor to perform the method described in any of the first aspects above, or the method described in any of the second aspects above.

[0045] In a tenth aspect, embodiments of this application provide a communication system including a primary device and a backup device, wherein the backup device is as described in any of the third aspects above, the primary device is as described in any of the fourth aspects above, and the communication system further includes one or more network elements. Attached Figure Description

[0046] Figure 1 Example diagram of implementing master / standby switching process for existing centralized control units;

[0047] Figure 2 An example diagram of the structure of a communication system used for data synchronization methods;

[0048] Figure 3 for Figure 2 The diagram shows examples of the types of devices included in the communication system.

[0049] Figure 4 This is a structural example diagram of a communication device;

[0050] Figure 5 A structural example diagram of a main device;

[0051] Figure 6 A flowchart illustrating the steps of a first embodiment of the data synchronization method provided in this application;

[0052] Figure 7 A flowchart illustrating the steps of a second embodiment of the data synchronization method provided in this application;

[0053] Figure 8 Example diagram of the first step of the primary / standby switchover provided in this application;

[0054] Figure 9 A flowchart illustrating the steps of a third embodiment of the data synchronization method provided in this application;

[0055] Figure 10 A flowchart illustrating the steps of a fourth embodiment of the data synchronization method provided in this application;

[0056] Figure 11 Example diagram of the second step of primary / standby switchover provided in this application;

[0057] Figure 12 A schematic block diagram of an embodiment of the communication device provided in this application;

[0058] Figure 13 This application provides a schematic diagram of one embodiment of a chip system. Detailed Implementation

[0059] To better understand the data synchronization method provided in the embodiments of this application, the following will first be combined with Figure 2The diagram illustrates the structure of the communication system to which the method described in this application is applied. Among them, Figure 2 An example diagram of the structure of a communication system used for data synchronization methods.

[0060] The communication system 200 includes a first network domain 210, a transmission network 220, and a second network domain 230. The transmission network 220 connects the first network domain 210 and the second network domain 230, enabling the transmission of services between them. The transmission network 220 includes multiple transmission devices; the type of transmission devices is not limited, as long as one or more transmission devices connected between the first network domain 210 and the second network domain 230 can enable the transmission of services between them. For example, the transmission network 220 can be an optical transport network (OTN), in which case each transmission device can be an OTN device. Alternatively, the transmission network 220 can also be a synchronous digital hierarchy (SDH) network, a packet transport network (PTN), a microwave transmission network, etc., without restriction. The first network domain 210 and the second network domain 230 can be Internet Protocol (IP) networks, etc.

[0061] Specifically, the transmission network 220 may include multiple transmission paths, for example, such as Figure 2 As shown, each transmission path in transmission network 220 connects the first network domain 210 and the second network domain 230. Different transmission paths include different transmission devices and / or have different numbers of transmission devices. For example, one transmission path includes transmission devices 221 and 223, while another transmission path includes transmission devices 221 and 224. It should be noted that there is no limitation on the number of transmission devices included in a transmission path. In this example, different transmission paths can correspond to different bandwidths and / or delays. Transmitting different services between the first network domain 210 and the second network domain 230 through different transmission paths can achieve bandwidth isolation and stable delays.

[0062] The transmission network 220 shown in this example also includes a control unit 240, which centrally controls the transmission network 220. For example, it may be implemented by calculating the various transmission paths connected between the first network domain 210 and the second network domain 230. This control unit 240 may be a CCU, etc. The first network domain 210 shown in this example may include one or more service devices, which may be devices for sending and / or receiving services. For a description of the structure of the second network domain 230, please refer to the description of the first network domain 210; specific details will not be repeated here. For example, the first network domain 210 may be a user-side network domain, and the second network domain 230 may be a server-side network domain. Alternatively, the first network domain 210 may be a server-side network domain, and the second network domain 230 may be a user-side network domain. In conjunction with... Figure 3 As shown, this illustrates Figure 2 The communication system shown includes examples of the types of devices, where, Figure 3 for Figure 2The diagram illustrates the types of devices included in the communication system. Taking a first network domain 210 as the user-side network domain, a transport network 220 containing OTN devices, and a second network domain 230 as the server-side network domain, the first network domain 210 may include an optical line terminal (OLT) 311 connected to OTN device 221, and an OLT 312 connected to OTN device 222. It should be noted that this example does not limit the number of OLTs included in the first network domain 210, nor the number of OLTs connected to the same OTN device. Taking OLT 311 as an example, OLT 311 also connects to one or more optical network units (ONUs). This example does not limit the number of ONUs connected to OLT 311. For an explanation of ONU connections to OLT 312, please refer to the explanation of OLT 311's ONU connections; details will not be elaborated here. The first network domain 210 includes ONUs that can connect to one or more user equipment (UEs). These user equipments (UEs) can be called terminals, mobile stations (MS), or mobile terminals (MTs), etc. Specifically, the user equipment can be a mobile phone, tablet computer, or computer with wireless transceiver capabilities. User equipment can also be virtual reality (VR) terminals, augmented reality (AR) terminals, wireless terminals in industrial control, wireless terminals in autonomous driving, wireless terminals in telemedicine, wireless terminals in smart grids, wireless terminals in smart cities, wireless terminals in smart homes, vehicle terminals, etc., without limitation. The second network domain 230 may include network device 301 connected to OTN device 223, and network device 302 connected to OTN device 224. Taking network device 301 as an example, this network device can be a router or switch, etc. Network device 301 can connect to one or more servers. For a description of network device 302, please refer to the description of network device 301. Detailed descriptions will not be repeated here.

[0063] It should be noted that, Figure 2 as well as Figure 3 The accompanying drawings are merely illustrative and the number of devices included is not limited. Furthermore, except... Figure 2 as well as Figure 3 In addition to the devices shown, the communication system may also include other devices. Figure 2 as well as Figure 3 The names of the various devices and the naming of the various transmission paths are unrestricted, except... Figure 2 as well as Figure 3 In addition to the names shown, each device and each transmission path can be named in other ways. For example, when the first network domain and the second network domain communicate through OTN, the transmission path can also be named OTN pipe, etc., without restriction.

[0064] Taking the transmission of a service from the first network domain 210 to the second network domain 230 via the transport network 220 as an example, the ONU sends a service frame to the OLT 311. This service frame carries the service and the destination address. The destination address is used to identify the server. The OLT 311 determines the address of the next-hop network device (e.g., network device 301) from a pre-configured routing table based on the destination address of the service frame, and then sends the service frame to the OTN device 221. The OTN device 221 serves as the first node in a transmission path included in the transport network 220. An automatic switched optical network (ASON) is built on top of the transport network 220. The ASON includes a control plane, a management plane, and a transport plane. The OTN device 221 sends a routing request to the control unit 240 through the control plane. For example, this routing request may carry the destination address (i.e., the address of the server used to receive the service frame), the source address (the address of the ONU used to send the service frame), etc. The control unit 240 calculates the path information based on the routing request. This path information indicates multiple interconnected transmission devices included in the transmission plane. Each transmission device indicated by this path information is capable of transmitting service frames to network device 301. This example uses path information including the identifiers of OTN device 221 and OTN device 223. Control unit 240 sends this path information to OTN device 221 and OTN device 223. Then, OTN device 221, based on the path information, transmits the service frame from OLT 311 to OTN device 223. OTN device 223 then transmits the service frame from OTN device 221 to network device 301. Network device 301 then sends the service frame to server 301, identified by the destination address, so that server 301 can process the received service frame. Correspondingly, the process of the server sending service frames to the ONU is similar to the above process and will not be described in detail.

[0065] It is understandable that by centrally calculating the forwarding path of services through the control unit 240, conflicts during service transmission are effectively avoided, thus improving the reliability of service transmission. Moreover, as the core control unit in the ASON network, the control unit 240 can be a CCU or a software-defined network (SDN) controller. The control unit 240 centrally manages and schedules transport network resources, responsible for path calculation, resource allocation, and fault recovery for the entire transport network, thereby significantly simplifying the network system architecture. With the continuous expansion of communication network scale, the control unit 240 can support rapid recovery of large ASON networks. However, if the control unit 240 fails, it will affect the rerouting of services across the entire network; therefore, a reliability backup mechanism is needed for the control unit 240.

[0066] Figure 4This is a structural example diagram of a communication device. The communication device shown in this example includes one or more chassis. Taking a chassis 400 as an example, which may also be called a subrack, cabinet, or rack, the chassis 400 is used to fix a backplane 401. The backplane 401 is plugged into and connected to L single boards. For example, the backplane 401 connects single boards 411, 412, 413 to single board 41L, respectively. The value of L is not limited. Taking single board 411 as an example, single board 411 may also be called an interface board or line card, etc., without specific limitations. Taking single board 411 as an example, single board 411 includes one or more processors. Single board 411 can be integrated or detachably connected to one or more optical modules. The processor may include one or more chips, or one or more integrated circuits. For example, the processor may include one or more of the following: neural processing unit (NPU), optical digital signal processor (oDSP), field-programmable gate array (FPGA), application-specific integrated circuit (ASIC), system-on-chip (SoC), central processing unit (CPU), microcontroller unit (MCU), programmable logic device (PLD), network interface card (NIC) chip, storage interface chip, or other integrated chips, without further elaboration. For instance, the optical module included in board 411 is used to receive optical signals and perform photoelectric conversion to obtain electrical signals, and the processor included in board 411 is used to process these electrical signals. Alternatively, the processor included in board 411 may be used to send electrical signals to the optical module, and the optical module may be used to perform electro-optical conversion on the electrical signals to output optical signals.

[0067] Backplane 401 is also connected to one or more main control boards. This example uses two main control boards, namely main control board 430 and main control board 431, installed on backplane 401. It should be noted that the number of main control boards described in this example is optional and not limited. Taking main control board 430 as an example, main control board 430 can be used as a network management system to perform functions such as system management and equipment maintenance.

[0068] The chassis 400 may also include a power supply 421, a cooling system 422, and auxiliary boards 423. The power supply 421 supplies power to each board and each main control board. The cooling system 422 dissipates heat from each board and each main control board. The auxiliary boards 423 provide auxiliary functions such as external alarms or access to external clocks. Figure 2 as well as Figure 3 For the structure of the corresponding transmission equipment, please refer to [link / reference]. Figure 4 The specific details of the corresponding communication equipment structure will not be elaborated here.

[0069] based on Figure 4 The description of the communication device illustrates an optional example of the control unit structure:

[0070] Example 1 illustrates a scenario where the control unit is located within a single chassis but on different main control boards.

[0071] Specifically, to improve the reliability of the control unit, the control unit includes a primary device and a backup device. In the event of a failure of the primary device, the backup device can take over the operation of the primary device to ensure the normal operation of the control unit. In this example, taking the primary device and the backup device as different main control boards, the primary device can be main control board 430, and the backup device can be main control board 431.

[0072] Combination Figure 5 The structure of the main device is described in the diagram, wherein, Figure 5 This is a structural example diagram of a master device. The master device 500 specifically includes a processor 501 and a transceiver 503. Optionally, the master device 500 also includes a memory 502. The processor 501 is connected to both the memory 502 and the transceiver 503 via a system bus 511. The processor 501 can access the memory 502 via the system bus 511; for example, the processor 501 can perform data read / write operations or code execution in the memory 502 via the system bus 511. The system bus 511 can be, for example, a quick path interconnect (QPI) or an ultra path interconnect (UPI). The system bus 511 is divided into an address bus, a data bus, and a control bus. The main function of the processor 501 is to interpret the instructions (or code) of the computer program and process the data in the computer software. The instructions of the computer program and the data in the computer software can be stored in the memory 502. For a description of the processor 501, please refer to... Figure 4The specific details of the corresponding processor are not elaborated here. Transceiver 503 is connected to backplane 401, enabling communication with any single board and backup device included in the communication equipment. Transceiver 202 can be a module, circuit, transceiver, or any device capable of communication. Memory 502 is used to store instructions. These instructions can be computer programs. Memory 502 can be read-only memory (ROM) or other types of static storage devices capable of storing static information and / or instructions; it can also be random access memory (RAM) or other types of dynamic storage devices capable of storing information and / or instructions; it can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital optical discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, without limitation. It should be noted that the memory 502 can exist independently of the processor 501, or it can be integrated with the processor 501. The memory 502 can be used to store instructions, program code, or some data, etc. The memory 502 can be located inside or outside the main device 500, without limitation. The processor 501 is used to execute the instructions stored in the memory 502 to implement the method provided by the main device in the embodiments of this application. For a description of the backup device structure, please refer to... Figure 5 The specific details of the corresponding main device structure will not be elaborated here.

[0073] The communication equipment housing the primary and backup devices shown in this example can be a separate server within the transmission network, distinct from the transmission equipment. Alternatively, the communication equipment housing the primary and backup devices can also be a transmission device within the transmission network. In this case, the transmission device can perform the functions of both the primary and backup devices, and the boards included in the transmission device can also transmit services between the first and second network domains. It can be understood that the primary and backup devices shown in this example are implemented using two different main control boards located on the same chassis. Therefore, if the main control board serving as the primary device fails, the main control board serving as the backup device can take over the operation of the primary device, improving the reliability of the control unit.

[0074] Example 2 illustrates a scenario where the control unit is located within a single chassis but on different boards.

[0075] For descriptions of the single-panel and its structure, please refer to [link / reference]. Figure 4 as well as Figure 5 As shown, details will not be elaborated further. For a description of the communication equipment where the primary and backup devices are located, please refer to Example 1, which will not be elaborated further. It can be understood that the primary and backup devices shown in this example are implemented through two different boards located on the same chassis. Therefore, if the board serving as the primary device fails, the board serving as the backup device can take over the operation of the primary device, improving the reliability of the control unit.

[0076] Example 3 illustrates a scenario where the control units are located within the same chassis, and one of the primary and backup devices is located on the main control board while the other is located on a single board.

[0077] For a description of the single-board and main control board, please refer to Example 1; further details will not be provided here. For example, the primary device is located on the main control board, and the backup device is located on the single-board. Alternatively, the primary device may be located on the single-board, and the backup device may be located on the main control board.

[0078] Example 4 illustrates how control units are located on the same main control board and implemented through different software modules.

[0079] Specifically, in combination Figure 4 As shown, taking the main control board 430 as an example of the control unit, the memory 502 of the main control board 430 stores multiple primary modules. The processor 501 executes the work of the primary device by sequentially calling the multiple primary modules. Similarly, the memory 502 of the main control board 430 stores multiple backup modules. The processor 501 executes the work of the backup device by sequentially calling the multiple backup modules.

[0080] Example 5 illustrates a control unit located on the same board and implemented through different software modules. For details, please refer to Example 4. Further details will not be elaborated here.

[0081] Example 6 illustrates a control unit with a primary device and a backup device located on different chassis.

[0082] For example, the same communication device may include multiple chassis. For a description of each chassis, please refer to [link to documentation]. Figure 4 The specific details are omitted here. For example, the primary device is located on the first frame (specifically on the main control board or single board included in the first frame, without limitation), and the backup device is located on the second frame (specifically on the main control board or single board included in the second frame, without limitation), wherein the first frame is different from the second frame. The primary device and the backup device can then communicate via cables or similar means.

[0083] Example 7 illustrates an example where the control unit includes a primary device and a backup device, each located on a different communication device. For a description of the communication device structure, please refer to [link to example 7]. Figure 4 The corresponding explanations will not be elaborated upon here.

[0084] The above examples, using the control unit in a transmission network, do not limit the type of network the control unit can be used on. See the following optional examples: Example 1: The control unit can also be used in a data center network. Example 2: The control unit can also be used in a wireless local area network (WLAN). Example 3: The control unit can also be used in cloud computing. Example 4: The control unit can also be used in an Internet of Things (IoT) network. Example 5: The control unit can also be used in a fiber-to-the-room (FTTR) network.

[0085] This application provides embodiments such as Figure 6 The data synchronization method shown for implementing master / slave switchover is based on the data synchronization method provided in this embodiment, aiming to improve the reliability of the control unit. Among other things, Figure 6 A flowchart illustrating the steps of a first embodiment of the data synchronization method provided in this application.

[0086] Step 601: The first primary module of the control unit obtains the target message.

[0087] The control unit's primary components include N+1 primary modules, where N is any integer greater than or equal to 1. These N+1 primary modules are ordered sequentially according to the order in which they respond to the target messages. For example, Figure 6 The primary device shown includes N+1 primary modules, namely the first primary module, the second primary module, and so on up to the N+1th primary module. The N+1 primary modules are ordered sequentially according to the order in which they respond to the target message. Specifically, the primary device first processes the obtained target message to obtain a processed first response message, and then passes the first response message to the downstream second primary module. The second primary module processes the first response message from the first primary module to obtain a second response message, which is then passed to the downstream third primary module, and so on, until the processed message is passed to the N+1th primary module. It can be understood that the first primary module is the first node in the response to the target message, and the N+1th primary module is the tail node.

[0088] This example uses a control unit applied to a transmission network. The control unit can receive the target message from the transmission equipment. The transmission equipment can send the target message to the control unit based on the Transmission Control Protocol (TCP). Specifically, the transmission equipment can send the target message to the control unit based on the TCP Path Computation Element Protocol (PCEP). The type of target message is not limited, as long as it can trigger responses from the various primary devices of the control unit. The following illustrates various possible examples of target messages:

[0089] Example 1

[0090] The target message sent by the transmission device to the control unit can carry topology information, which indicates the connection structure between various transmission devices in the transmission network. Figure 2 As shown, the topology information is used to indicate the connection relationship between OTN device 221 and OTN device 223. The control unit stores the topology information and can use it to calculate the path of transmission services.

[0091] Example 2

[0092] The target message sent by the transmission device to the control unit may carry a routing request, which may include the source address, destination address, etc., of the transmission service. For example, Figure 3 The OTN device 221 shown can send a target message carrying a routing request to the control unit. The control unit performs calculations based on the routing request to obtain path indication information, which includes the addresses of each transmission device that the service frame passes through in sequence during transmission in the transmission network.

[0093] Example 3

[0094] The target message sent by the transmission device to the control unit may carry fault indication information, which indicates that a fault has occurred in the transmission device. For example... Figure 3 As shown, if a path for transmitting a service frame includes OTN device 221 and OTN device 223, with OTN device 221 as the first node and OTN device 223 as the last node, and if OTN device 221 malfunctions and cannot successfully transmit the service frame, then OTN device 221 sends a fault indication message to the control unit. The control unit can recalculate the path for transmitting the service frame based on the fault indication message, thus avoiding the faulty OTN device.

[0095] Example 4

[0096] The target message sent by the transmission equipment to the control unit may carry service attribute information. For example, attribute information may include messages indicating service traffic, bandwidth requirements, etc. The control unit can calculate the path based on the attribute information to improve the utilization efficiency of the transmission network bandwidth.

[0097] The above description of the target message is an optional example and is not limited. It can be defined specifically according to the transport network architecture, protocol specifications, and the functions undertaken by the control unit. For example, the target message may also carry device status information, link status information, alarm information, configuration information, statistical information, security information, policy information, etc. Among these, device status information is used to indicate the operating status, health status, and load of the transmission equipment, enabling the control unit to monitor the performance and stability of the transmission equipment based on the device status information. Link status information is used to indicate the link of the transmission service (e.g., ...). Figure 2 The first network domain (shown) displays connectivity, bandwidth utilization, and bit error rate of the links used for service transmission. Alarm information indicates a fault in the transmission equipment, enabling the control unit to avoid faulty equipment during path calculation and improve the connectivity of the calculated path. Configuration information indicates the configuration parameters, security policies, and routing protocol settings of the transmission equipment. Statistical information is used for traffic statistics and service analysis, aiding the control unit in resource allocation. Security information includes security-related information such as virus protection and intrusion detection. Policy information indicates routing policies, traffic allocation policies, and Quality of Service (QoS).

[0098] The above example illustrates how the first primary module receives the target message from the transmission device. The specific method is not limited. For instance, the target message could also be a message generated by the first primary module itself. In this case, the target message generated by the first primary module could carry various information to be sent to the transmission device. For example, the target message could carry control commands to control the transmission device's start, stop, or reset. Alternatively, the target message could carry data requests to request the transmission device to send specific data, attributes, or status information. Another example is a configuration update command to send new configuration parameters to the transmission device to adjust its operating mode or performance. Furthermore, the target message could carry error indication information to indicate abnormal conditions detected by the control unit in the transmission device. Finally, the target message could carry status notifications to inform the transmission device of changes in the control unit's status, such as changes in connection status or channel quality. Finally, the target message could carry time synchronization information to achieve time synchronization between the control unit and the transmission device. The above example uses a target message generated by the first primary module, carrying information for transmission to the transmitting device. In other examples, the information carried by the target message may not be sent to the transmitting device, but rather processed sequentially by the N+1 primary modules included in the control unit. For example, the information carried by the target message could be status monitoring information used to monitor the control unit, detecting its own operating status, resource usage, error logs, etc. Alternatively, the target message could carry internal management information used to maintain the normal operation and optimize the performance of the control unit. Or, the target message could carry test information to help diagnose problems with the control unit or verify its performance.

[0099] It should be clarified that there are no restrictions on the type and quantity of information carried by the target message, and the type and quantity of information carried by the target message can be dynamically adjusted according to the specific application.

[0100] Step 602: The first primary module processes the target message to generate the first backup data and sends the first backup data to the first standby module.

[0101] The control unit also includes a backup device, which takes over control of the transmission network in the event of a failure of the primary device. For this purpose, the backup device includes N+1 backup modules, such as a first backup module, a second backup module, and so on up to the N+1th backup module. It can be understood that the number of primary modules included in the primary device is equal to the number of backup modules included in the backup device. Specifically, the backup device includes a first backup module at the same level as the first primary module, which takes over the function of the first primary module; a second backup module at the same level as the second primary module, which takes over the function of the second primary module; and so on, up to an N+1th backup module at the same level as the N+1th primary module, which takes over the function of the N+1th primary module.

[0102] It should be clarified that, taking the example where the number of primary modules in the primary device of the control unit is equal to the number of backup modules in the backup device, and where the N+1 primary modules and N+1 backup modules have a one-to-one relationship, this means that each primary module is backed up by only one backup module. For example, if the first primary module is backed up only by the first backup module, then when the primary device fails, the first backup module takes over the operation of the first primary device; the specific relationship is not limited. Alternatively, the N+1 primary modules and backup modules may have a many-to-one relationship, meaning that multiple primary modules are backed up by one backup module. Furthermore, the N+1 primary modules and backup modules can also have a one-to-many relationship, meaning that each primary module is backed up by multiple backup modules. The example of a one-to-one relationship between N+1 primary modules and N+1 backup modules will be used for illustration.

[0103] After receiving the target message, the primary module processes it to obtain the first backup data. If the primary device fails, the first backup module can take over the work of the primary module. The primary module processes the target message in ways including, but not limited to, parsing, verification, and conversion. The first backup data is generated in response to the primary module's processing of the target message. Specifically, after obtaining and processing the target message, the primary module can output the first backup data based on the content of the target message or the processing result. For example, if the primary module is a protocol stack, the processor of the primary device calls the instructions of the protocol stack to parse (or decapsulate) the target message. Specifically, the protocol stack removes the header and trailer information of the target message to restore the original data of the target message. The restored original data can then be used as the first backup data. For example, if the first backup data is a packet, and the primary module fails, the first backup module continues to process the received packets to take over the work of the primary module.

[0104] Taking the example of the first backup module receiving the first backup data from the first primary module, in other examples, the first primary module may also send a target message to the first backup module, and the first backup module processes the target message to obtain the first backup data.

[0105] Step 603: The first primary module sends a first response message to the first backup module.

[0106] After receiving the target message, the first primary module processes it to obtain the first response message. The first response message then indicates the result of the primary module's processing of the target message. Specifically, after the primary module processes the target message to generate first backup data, it generates a result based on the target message. This result may directly be the first backup data, and the first response message carries this first backup data. For example, if the target message carries a routing request, the primary module parses the target message to recover the routing request. The primary module then encapsulates the routing request, adding appropriate protocol headers and trailers to obtain the first response message. These added headers and trailers ensure that the first response message can be correctly transmitted and recognized in the primary device. Alternatively, the result generated by the primary module based on the target message may be processing status information, such as whether the target message processing was successful, failed, or requires processing by a downstream primary module. Furthermore, the first response message may carry data transmission confirmation, retransmission, flow control, congestion control, error detection, etc.

[0107] It is understood that the first backup module can receive the first backup data and the first response message from the first primary module. Therefore, if the primary device fails, the first backup module can directly take over the work of the first primary module based on the first response message and the first backup data. The execution sequence between steps 602 and 603 is not limited.

[0108] Taking the example of the first backup module receiving the first response message from the first primary module, in other examples, the first primary module may also send a target message to the first backup module, and the first backup module processes the target message to obtain the first response message.

[0109] Step 604: The first primary module sends a first response message to the second primary module.

[0110] The first primary module sends the received first response message to the second primary module, which is located downstream of the first primary module. Since the second primary module is a downstream primary module of the first primary module, it is ordered after the first primary module among the N+1 primary modules included in the primary device.

[0111] There are no restrictions on the execution sequence between steps 603 and 604.

[0112] Step 605: The second primary module processes the first response message to generate the second backup data and sends the second backup data to the second standby module.

[0113] For an explanation of how the second primary module processes the first response message to generate the second backup data, please refer to the explanation of how the first primary module processes the target message to generate the first backup data shown in step 602; details will not be repeated here. For example, the second primary module could be an application layer module. If the first response message carries a routing request, the second primary module, based on the source address, destination address, and other information extracted from the first response message, uses an algorithm (e.g., shortest path algorithm, multi-constraint path algorithm, etc.) to calculate the path to obtain a path that satisfies the transmission requirements of the service frame in the transport network. The second primary module can then generate path response information based on the calculated path, which carries the addresses of each transmission device included in the path. Finally, the second primary module sends the second backup data, including the path response information, to the second backup module.

[0114] Step 606: The second primary module sends a second response message to the third primary module.

[0115] As the downstream primary module of the second primary module, the third primary module is ordered after the second primary module in the N+1 primary modules of the primary device. The second response message is used to indicate the result of the second primary module processing the first response message. For example, the first response message carries path response information. The second primary module processes the first response message to parse the path response information from it. The second primary module encapsulates the path response information to obtain a second response message, which carries the path response information. This enables the third primary module to forward the path response information to the transmission device, thereby allowing the transmission device receiving the path response information to transmit service frames according to the instructions in the path response information.

[0116] There are no restrictions on the execution sequence between steps 605 and 606.

[0117] Step 607: The third primary module processes the second response message to generate the third backup data and sends the third backup data to the third standby module.

[0118] For an explanation of how the third primary module processes the second response message to generate the third backup data, please refer to the explanation of how the first primary module processes the target message to generate the first backup data as shown in step 602. Further details will not be elaborated here.

[0119] Taking a primary device comprising three primary modules as an example, it should be clarified that the number of primary modules in the primary device is not limited. For ease of understanding, the first primary module is taken as the primary module ranked first among the N+1 primary modules in the primary device. Based on the method shown in this embodiment, if a primary / backup switch occurs in the control unit (i.e., the primary device fails and the backup device takes over the work of the primary device), the consistency of data between the primary modules and the backup modules at the same level can be effectively guaranteed. That is, among the N+1 primary modules, each primary module can send backup data to the backup module at the same level, so that the backup module can successfully take over the work of the primary module at the same level based on the backup data.

[0120] Based on the method shown in this embodiment, if the control unit sends a primary / backup switch, it can also effectively ensure the consistency of data between the upstream and downstream backup modules. That is, if the primary device fails, the first backup module sends a first response message to the second backup module to ensure the consistency of the first response message received by the first backup module and the second backup module.

[0121] Because the backup module of the backup device can ensure data consistency with the primary module of the same level, and can also ensure data consistency between N+1 backup modules and between upstream and downstream backup modules, it effectively avoids data loss due to primary-backup switching, improves the accuracy and reliability of the backup device taking over the work of the primary device, and effectively reduces the latency of primary-backup switching.

[0122] Furthermore, among the N+1 primary modules, data consistency between each primary module and its corresponding backup module avoids the backup device replacing the primary device from re-establishing protocol connections with each transmission device. This ensures that even if the control unit initiates a primary / backup switchover, the protocol connection between the control unit and each transmission device remains uninterrupted. For example, the first primary module (e.g., a protocol stack) has already established a protocol connection with the transmission device. The first backup data sent by the first primary module to the first backup module may include the configuration information of the first primary module (e.g., routing table, network configuration information, session table, security policies, etc.). When the primary device fails, the control unit can directly switch the traffic between the control unit and the transmission device to the first backup module. The configuration information stored in the first backup module is synchronized in real time with the configuration information stored in the first primary module. Therefore, the first backup module can ensure that the protocol connection between the first backup module and the transmission device remains uninterrupted based on the configuration information, effectively guaranteeing the continuity of communication between the control unit and the transmission device.

[0123] Based on the method shown in this embodiment, if the primary device fails, the first backup module has stored the first response message. The first backup module can directly send the first response message to the downstream second backup module to trigger each backup module after the first backup module to respond to the first response message in sequence, thereby avoiding data loss during the primary / backup switchover and reducing the latency of the primary / backup switchover.

[0124] Figure 7 The flowchart illustrates the steps of a second embodiment of the data synchronization method provided in this application. Using the method shown in this embodiment, the first backup module, which serves as the first node, can delete the first response message to improve the storage utilization of the cache area corresponding to the first backup module.

[0125] Step 701: The first primary module of the control unit obtains the target message.

[0126] Taking the first primary module of the primary device as the protocol layer as an example, specifically, the protocol layer includes a protocol stack and a PCEP layer. The protocol stack of the first primary module receives TCP packets, which are used as target messages.

[0127] Step 702: The first primary module processes the target message to generate the first backup data and sends the first backup data to the first standby module.

[0128] For example, if the protocol stack of the first primary module has successfully received a TCP packet, it sends the TCP packet to the protocol stack of the first backup module at the same level, so that the TCP packet can be stored in the buffer corresponding to the protocol stack of the first backup module. The TCP packet carries an identifier. If the protocol stack of the first backup module successfully receives the TCP packet and has successfully stored it in the buffer corresponding to the protocol stack of the backup device, the protocol stack of the first backup module sends a first backup message to the protocol stack of the first primary module. The first backup message indicates that the protocol stack of the first backup module has backed up the TCP packet. For example, the first backup message carries an identifier for the TCP packet. The protocol stack of the first primary module returns a second backup message to the protocol stack of the first backup module based on the first backup message. The second backup message indicates that the protocol stack of the first primary module has received the first backup message. If the protocol stack of the first primary module successfully sends the second backup message, it can then send the TCP packet to the PCEP layer of the first primary module. Upon successful receipt of a TCP packet at the PCEP layer of the primary module, the primary module sends the TCP packet to the PCEP layer of the primary module. Both the TCP packets sent from the PCEP layer of the primary module to the primary module and the TCP packets sent from the protocol stack of the primary module to the protocol stack of the primary module can serve as the first backup data sent from the primary module to the primary module.

[0129] Step 703: The first primary module sends a first response message to the first backup module.

[0130] For example, if the protocol stack of the first primary module can receive multiple TCP packets, it can send these packets to the PCEP layer of the first backup module to achieve the purpose of sending the first response message. Specifically, the PCEP layer of the first backup module will reassemble the received TCP packets until a complete and correctly formatted message can be formed as the first response message. In other examples, the PCEP layer of the first primary module can also reassemble M TCP packets to obtain the first response message, and then send the first response message to the PCEP layer of the first backup module; the specific method is not limited.

[0131] Optionally, the PCEP layer of the first backup module sends the identifiers of each TCP packet included in the first response message to the protocol stack of the first backup module, and the protocol stack of the first backup module deletes the corresponding TCP packet according to the identifier of the TCP packet.

[0132] Step 704: The first primary module sends a first response message to the second primary module.

[0133] For example, the PCEP layer of the first primary module reassembles M TCP packets to obtain a first response message. If the first primary module successfully obtains the first response message, the M TCP packets can be deleted. Alternatively, if the second primary module is a resource layer, then the resource layer receives the first response message sent from the PCEP layer of the first primary module.

[0134] Step 705: The second primary module processes the first response message to generate second backup data and sends the second backup data to the second standby module.

[0135] Step 706: The second primary module sends a second response message to the third primary module.

[0136] For example, the third primary module can be the business layer, and the second response message can carry the second backup data obtained by the resource layer.

[0137] The explanation of the execution process of steps 701 to 707 can also be found in steps 601 to 607, and will not be repeated here.

[0138] Step 707: The second main module creates the identifier mapping relationship.

[0139] The second main module can create the identifier mapping relationship shown in Table 1:

[0140] Table 1

[0141] First Response Message Identifier Second response message identifier

[0142] The first response message identifier is used to identify the first response message. The second response message identifier is used to identify the second response message. Specifically, when the second primary module receives the first response message from the first primary module, the second primary module can assign the first response message identifier to the first response message. Alternatively, if the first response message already carries the first response message identifier, then the second primary module can parse the first response message identifier from the first response message. The second primary module can also assign the second response message identifier to the second response message or parse the second response message identifier from the second response message. For details, please refer to the explanation of how the second primary module obtains the first response message identifier; further details will not be elaborated here.

[0143] The timing of steps 707, 705, and 706 for the first primary module is not limited.

[0144] Step 708: The third primary module processes the second response message to generate the third backup data and sends the third backup data to the third standby module.

[0145] For a description of the execution process of step 709, please refer to [link / reference]. Figure 6 The corresponding step 607 is shown below, and will not be elaborated further.

[0146] Step 709: The third primary module sends the first notification message to the second primary module.

[0147] Taking the third primary module as the last in the N+1 primary modules as an example, if the third primary module has successfully received the second response message from the second primary module (as shown in step 706) and has successfully backed up the third backup data to the third standby module at the same level (as shown in step 708), then the third primary module sends a first notification message to the second primary module. The first notification message is used to indicate that the third primary module has successfully received the second response message and has successfully backed up the third backup data. Therefore, the first notification message carries the second response message identifier.

[0148] Step 710: The second primary module sends a second notification message to the first primary module.

[0149] Upon receiving the first notification message, the second primary module parses the second response message identifier from the first notification message and obtains the corresponding first response message identifier by querying the identifier mapping relationship. The second primary module then sends a second notification message to the first primary module, this second notification message carrying the first response message identifier. It can be understood that this second notification message, by carrying the first response message identifier, notifies the third primary module that it has successfully received the second response message and successfully backed up the third backup data, and that the second primary module has successfully received the first response message and successfully backed up the second backup data.

[0150] Optionally, if the second primary module successfully receives the first notification message from the third primary module, it may send a first feedback message to the third primary module, which carries a second response message identifier. The third primary module then determines that the second primary module has successfully received the first notification message based on this first feedback message. If the third primary module has not received the first feedback message from the second primary module within the timer's duration, it will send the first notification message to the second primary module again. The timer's starting point is the moment the third primary module sends the first notification message; the specific length of the timer's duration is not limited.

[0151] Step 711: The first primary module sends a deletion instruction message to the first backup module.

[0152] When the first primary module receives the second notification message, it parses the first response message identifier from the second notification message and sends a deletion instruction message carrying the first response message identifier to the first backup module.

[0153] Optionally, if the first primary module successfully receives the second notification message from the second primary module, the first primary module may send a second feedback message to the second primary module, which carries the identifier of the first response message. The second primary module then determines that the first primary module has successfully received the second notification message based on the second feedback message. If the second primary module has not received the second feedback message from the first primary module within the timer's duration, the second primary module will send the second notification message to the first primary module again. For a description of the timer configured in the second primary module, please refer to the description of the timer configured in the third primary module; details will not be elaborated here.

[0154] Step 712: The first backup module deletes the first response message.

[0155] After the first backup module receives the deletion instruction message from the first primary module, it parses the first response message identifier from the deletion instruction message. Then, based on the first response message identifier, the first backup module deletes the first response message from the cache area corresponding to the first backup module to improve the utilization rate of the cache area.

[0156] Taking the example of the third primary module sending notification messages in reverse order according to the N+1 primary modules until the first primary module receives the notification information and instructs the first backup module at the same level to delete the first response message, this is not a limitation. In other examples, among the N+1 primary modules in the sequential order, the primary module at the first position (e.g., the first primary module) and the primary module at the last position (e.g., the third primary module) can be directly connected. In this case, the first notification message sent by the third primary module can be sent directly to the first primary module. Then, the first primary module can directly send a deletion instruction message to the first backup module based on the first communication message. Specifically, for example, the second response message sent by the second primary module to the third primary module carries the identification correspondence shown in Table 1. The third primary module obtains the first response message identifier corresponding to the second response message identifier based on the identification correspondence. Then, the first notification message sent by the third primary module to the first primary module can carry the first response message identifier, and the first primary module can then send a deletion instruction message carrying the first response message identifier to the first backup module. For example, after the second primary module creates the identifier mapping relationship, it sends the identifier mapping relationship to the first primary module. The third primary module directly sends a first notification message carrying the second response message identifier to the first primary module. Then, the first primary module obtains the first response message identifier corresponding to the second response message identifier based on the identifier mapping relationship, and then sends a deletion instruction message carrying the first response message identifier to the first backup module.

[0157] Using the method shown in this embodiment, each backup module of the backup device can ensure data consistency with the primary module at the same level, and also ensure data consistency among the N+1 backup modules and between upstream and downstream backup modules. Therefore, in the event of a failure in the primary device, each backup module can accurately and reliably take over from the primary module at the same level. To improve the storage utilization of the cache area corresponding to the backup device, the primary module at the bottom of the N+1 primary modules (e.g., the third primary module shown in the example above) sequentially sends notification messages to the downstream primary modules until the first primary module, acting as the first node, sends a deletion instruction message to the first backup module, enabling the first backup module to delete the first response message according to the deletion instruction message.

[0158] based on Figure 6 as well as Figure 7 The data synchronization method shown in the embodiments enables the control unit to perform primary / standby switching, improves the reliability of primary / standby switching, and reduces the latency of primary / standby switching. Several optional examples of primary / standby switching are described below.

[0159] Example 1, see example 1. Figure 8 As shown, where, Figure 8 This is an example diagram illustrating the first step of the primary / standby switchover provided in this application.

[0160] Step 801: The first primary module of the control unit obtains the target message.

[0161] Step 802: The first primary module processes the target message to generate the first backup data and sends the first backup data to the first standby module.

[0162] Step 803: The first primary module sends a first response message to the first backup module.

[0163] Step 804: The first primary module sends a first response message to the second primary module.

[0164] For a description of the execution process of steps 801 to 804, please refer to [link / reference]. Figure 6 The corresponding steps 601 to 604 are shown in detail, and will not be elaborated further.

[0165] If the primary device malfunctions because the primary module has successfully sent a first response message to the secondary primary module, but the secondary primary module has not yet responded to obtain a second response message and has not yet processed the first response message to obtain the second backup data, then the backup device needs to take over the work of the primary device.

[0166] Combination Figure 7 As shown in the example, since the third primary module has not yet successfully received the second response message from the second primary module and has not yet successfully backed up the third backup data, the third primary module will not send the first notification message to the second primary module. Therefore, the first response message stored in the first backup module has not been deleted, indicating that the first response message has not yet been successfully responded to by the second and third primary modules. For this reason, the first backup module executes step 805 as shown below.

[0167] Step 805: The first backup module sends a first response message to the second backup module.

[0168] If the primary device malfunctions and the first backup module detects that the first response message has not been deleted, the first backup module directly sends the first response message to the second backup module. This first response message triggers the second and third backup modules to respond in sequence, ensuring that the backup device successfully takes over the work of the primary module. The first backup module does not need to re-obtain the target message, effectively reducing the latency of primary-backup switching.

[0169] Step 806: The second backup module creates the identifier correspondence.

[0170] For instructions on creating the identifier mapping for the second backup module, please refer to [link / reference needed]. Figure 7The description of the corresponding relationship for creating the identifier in the second main module shown in step 707 will not be repeated here.

[0171] It should be clarified that, taking the creation of the identifier mapping relationship by the second backup module as an example, in other examples, the identifier mapping relationship can also be created by the second primary module which is in normal working condition, and the second primary module will send the created identifier mapping relationship to the second backup module.

[0172] Step 807: The second backup module sends a second response message to the third backup module.

[0173] Since the primary device has failed, the second backup module can process the first response message to obtain the second backup data. The second backup module then takes over the operation of the second primary module based on this second backup data. For detailed instructions, please refer to [link to instructions]. Figure 6 The corresponding step 605 describes how the second primary module processes the first response message to obtain the second backup data, which will not be elaborated upon here. The second backup module sends a second response message to the third backup module to trigger its response; for a detailed explanation of this process, please refer to [link to relevant documentation]. Figure 6 The description of the second primary module sending the second response message to the third primary module in step 606 is not elaborated here.

[0174] Step 808: The third backup module sends a first notification message to the second backup module.

[0175] After receiving the second response message, the third backup module processes it to obtain the second backup data. Based on this second backup data, the second response message takes over the work of the third primary module. For details, please refer to [link to documentation]. Figure 6 The corresponding step 607, which describes the third primary module processing the second response message to obtain the third backup data, will not be elaborated upon here. For an explanation of the first notification message sent by the third backup module to the second backup module, please refer to [link to relevant documentation]. Figure 7 The description of the first notification message sent by the third primary module to the second primary module, as shown in step 709, will not be elaborated further.

[0176] Step 809: The second backup module sends a second notification message to the first backup module.

[0177] For instructions on how the second backup module sends a second notification message to the first backup module, please refer to [link to documentation]. Figure 7 The description of the second notification message sent by the second primary module to the first primary module in step 710 is not detailed here.

[0178] Step 810: The first backup module deletes the first response message.

[0179] For a description of the execution process in step 810, please refer to [link / reference]. Figure 7 The corresponding step 712 is shown below, and will not be elaborated further.

[0180] It is understandable that when the first backup module receives the second notification message from the second backup module, it can parse the first response message identifier from the second notification message. Then, based on the first response message identifier, the first backup module can delete the first response message identified by the first response message identifier from the cache area corresponding to the first backup module, so as to improve the utilization rate of the cache area of ​​the first backup module.

[0181] The data synchronization method shown in this embodiment can effectively ensure data consistency between upstream and downstream modules in N+1 backup modules. For example, if a primary / backup switch occurs and the cache corresponding to the first backup module contains a first response message that has not yet been deleted, it means that the second backup module, and so on up to the N+1th backup module, has not yet responded to the first response message. Therefore, the first backup module sends the first response message to the second backup module to trigger the second backup module to respond sequentially up to the N+1th backup module. This avoids data loss between adjacent backup modules during the primary / backup switch, ensures that the backup device can reliably take over the primary device in the event of a failure of the primary device, and reduces the latency of the primary / backup switch.

[0182] Example 2, this example shows the control unit successfully executing as follows: Figure 6 As shown in steps 601 to 603, but without subsequent steps, it can be understood that the first primary module has not yet successfully sent the first response message to the second primary module. At this point, the primary device has failed, and the backup device takes over the work of the primary device. Therefore, the control unit performs the primary / backup switchover process. Please refer to [link to relevant documentation]. Figure 8 The corresponding steps 805 to 810 are shown in detail, and will not be elaborated further.

[0183] Example 3, as shown in this example, demonstrates that the control unit has successfully executed the following... Figure 6 Steps 601 to 605 are shown, but the second primary module has not yet sent the second response message to the third primary module. At this time, the primary device has failed, and the backup device takes over the primary device's fault. The control unit then performs the primary / backup switchover process. Please refer to [link to relevant documentation]. Figure 8 The corresponding steps 805 to 810 are shown in detail, and will not be elaborated further.

[0184] Example 4, as shown in this example, demonstrates that the control unit has successfully executed the following... Figure 6Steps 601 to 606 are shown, but the third primary module has not yet successfully backed up the third backup data to the third backup module. At this time, the primary device fails, and the backup device takes over the fault of the primary device. Then, the control unit performs the primary / backup switchover process. Please refer to [link to relevant documentation]. Figure 8 The corresponding steps 805 to 810 are shown in detail, and will not be elaborated further.

[0185] It is understood that by using the data synchronization method shown in this embodiment, regardless of when the primary device fails, as long as the first backup module detects the first response message that has not yet been deleted, the first backup module will, through steps 805 to 810, enable N+1 backup modules to respond to the first response message in sequence, so that in the event of a failure of the primary device, the N+1 backup modules can respond to the first response message normally. For example, if the first response message carries a routing request, then in the event of a failure of the primary device, the backup device can complete the path calculation based on the sequential responses of the N+1 backup modules to the first response message.

[0186] Figure 6 In the illustrated embodiment, taking the example of only the first primary module (acting as the head node) sending a response message to the backup modules out of N+1 primary modules, in... Figure 9 In the illustrated embodiment, among the N+1 primary modules, the top N primary modules will all send response messages to the backup modules of the same level. Figure 6 Based on the above, further reduce the latency of primary / standby switchover. Specifically, Figure 9 A flowchart illustrating the steps of a third embodiment of the data synchronization method provided in this application.

[0187] Step 901: The first primary module of the control unit obtains the target message.

[0188] Step 902: The first primary module processes the target message to generate the first backup data and sends the first backup data to the first standby module.

[0189] Step 903: The first primary module sends a first response message to the first backup module.

[0190] Step 904: The first primary module sends a first response message to the second primary module.

[0191] Step 905: The second primary module processes the first response message to generate the second backup data and sends the second backup data to the second standby module.

[0192] For a description of the execution process of steps 901 to 905, please refer to [link / reference needed]. Figure 6 The corresponding steps 601 to 605 are shown in detail, and will not be elaborated further.

[0193] Step 906: The second primary module sends a second response message to the second backup module.

[0194] In this embodiment, relative to Figure 6 The difference is that, upon receiving the first response message, the second primary module sends a second response message to the second backup module at the same level to back up the second response message to the second backup module. For an explanation of the second response message, please refer to [link to documentation]. Figure 6 The corresponding step 606 is shown below, and will not be elaborated further.

[0195] Step 907: The second primary module sends a second response message to the third primary module.

[0196] For a description of the execution process in step 907, please refer to [link / reference]. Figure 6 The corresponding step 606 is shown below, and will not be elaborated further.

[0197] Step 908: The third primary module processes the second response message to generate the third backup data and sends the third backup data to the third standby module.

[0198] For a description of the execution process of step 908, please refer to [link / reference]. Figure 6 The corresponding step 607 is shown below, and will not be elaborated further.

[0199] Using the method shown in this embodiment, among the N+1 backup modules included in the backup device, excluding the last node (i.e., the N+1th backup module), each backup module receives response messages and backup data from the primary module at the same level. This effectively ensures data consistency between the backup modules of the backup device and the primary module at the same level, and also ensures data consistency among the N+1 backup modules and between upstream and downstream backup modules. This effectively avoids data loss due to primary / backup switching, improves the accuracy and reliability of the backup device taking over the work of the primary device, and effectively reduces the latency of primary / backup switching. For an explanation of data consistency, please refer to [link to relevant documentation]. Figure 6 The corresponding explanations will not be elaborated upon here.

[0200] Figure 10 The flowchart of the fourth embodiment of the data synchronization method provided in this application shows that, with each backup module of the backup device able to ensure data consistency with the primary module of the same level, and also able to ensure data consistency between N+1 backup modules and between upstream and downstream backup modules, each backup module can delete response messages from backup modules of the same level, except for the last node (i.e., the N+1th backup module), thereby improving the storage utilization of the cache area corresponding to each backup module.

[0201] Step 1001: The first primary module of the control unit obtains the target message.

[0202] Step 1002: The first primary module processes the target message to generate the first backup data and sends the first backup data to the first standby module.

[0203] Step 1003: The first primary module sends a first response message to the first backup module.

[0204] Step 1004: The first primary module sends a first response message to the second primary module.

[0205] Step 1005: The second primary module processes the first response message to generate the second backup data and sends the second backup data to the second standby module.

[0206] Step 1006: The second primary module sends a second response message to the second backup module.

[0207] For a description of the execution process of steps 1001 to 1006, please refer to [link to documentation]. Figure 9 The corresponding steps 901 to 906 are shown in detail, and will not be elaborated further.

[0208] Step 1007: The second primary module sends the identifier correspondence to the second backup module.

[0209] For instructions on creating the identifier mapping relationship in the second primary module, please refer to [link / reference]. Figure 7 The corresponding step 707 is shown below, and will not be elaborated further.

[0210] Taking the creation of an identifier correspondence by the second primary module as an example, in other examples, the second primary module may send at least one of the first response message identifier and the second response message identifier to the second backup module, and the second backup module will create the identifier correspondence.

[0211] Step 1008: The second backup module sends a first response message identifier to the first backup module.

[0212] If the second backup module has already created an identifier correspondence, it obtains the second response message identifier corresponding to the second response message identifier and sends the first response message identifier to the first backup module.

[0213] Step 1009: The first backup module deletes the first response message.

[0214] If the first backup module successfully receives the first response message identifier, it can determine that the second response message has been successfully cached in the cache area corresponding to the second backup module. Then, the first backup module deletes the first response message based on the first response message identifier.

[0215] Step 1010: The second primary module sends a second response message to the third primary module.

[0216] Step 1011: The third primary module processes the second response message to generate the third backup data and sends the third backup data to the third standby module.

[0217] For a description of the execution process of steps 1010 to 1011, please refer to [link to documentation]. Figure 9 The corresponding steps 907 to 908 are shown below, and will not be described in detail.

[0218] Step 1012: The third backup module sends a second response message identifier to the second backup module.

[0219] Upon receiving the third backup data, the third backup module can obtain the identifier of the second response message. For example, if the third primary module successfully sends the third backup data to the third backup module, it sends the second response message identifier to the third backup module. Alternatively, the third backup module can parse the second response message identifier from the third backup data, etc., without further limitation. If the third backup module obtains the second response message identifier, it indicates that the second response message has been successfully responded to by the third primary module. Therefore, the second backup module no longer needs to cache the second response message. For this purpose, the third backup module sends the second response message identifier to the second backup module to notify it to delete the second response message.

[0220] Step 1013: The second backup module deletes the second response message.

[0221] Upon receiving the second response message identifier, the second backup module deletes the second response message based on the second response message identifier.

[0222] Using the method shown in this embodiment, if the first backup module determines that the second primary module has successfully responded to the first response message, then the cached first response message is deleted; if the second backup module determines that the third primary module has successfully responded to the second response message, then the cached second response message is deleted, and so on. This is to improve the storage utilization rate of the cache area corresponding to the backup device.

[0223] based on Figure 9 as well as Figure 10 The data synchronization method shown enables the control unit to perform primary / standby switching, improving the reliability of the switching and reducing its latency. Specifically, Figure 11 Example diagram of the second step of the primary / standby switchover provided in this application.

[0224] Step 1101: The first primary module of the control unit obtains the target message.

[0225] Step 1102: The first primary module processes the target message to generate the first backup data and sends the first backup data to the first standby module.

[0226] Step 1103: The first primary module sends a first response message to the first backup module.

[0227] Step 1104: The first primary module sends a first response message to the second primary module.

[0228] Step 1105: The second primary module processes the first response message to generate the second backup data and sends the second backup data to the second standby module.

[0229] Step 1106: The second primary module sends a second response message to the second backup module.

[0230] Step 1107: The second primary module sends the identifier correspondence to the second backup module.

[0231] Step 1108: The second backup module sends a first response message identifier to the first backup module.

[0232] Step 1109: The first backup module deletes the first response message.

[0233] Step 1110: The second primary module sends a second response message to the third primary module.

[0234] For a description of the execution process of steps 1101 to 1110, please refer to [link to documentation]. Figure 10 The corresponding steps 1001 to 1010 are shown in detail, and will not be elaborated further.

[0235] If the primary device fails when the second primary module has sent a second response message to the third primary module, but the third primary module has not yet backed up the third backup data to the third backup module, the backup device will take over the operation of the primary device. The process of the backup device taking over the primary device to perform a primary / backup switchover is shown in the following steps:

[0236] Step 1111: The second backup module sends a second response message to the third backup module.

[0237] If the second response message cached by the second backup module has not been deleted, then if the second backup module detects the second response message, it means that the second response message has not been responded to by the third primary module. Therefore, the second backup module sends the second response message to the third backup module so that the third backup module can take over the work of the third primary module and respond to the second response message.

[0238] Step 1112: The third backup module sends a second response message identifier to the second backup module.

[0239] If the third backup module has successfully responded to the second response message, then the second response message identifier is sent to the second backup module. The second response message identifier indicates that the second backup module should delete the second response message in order to improve the storage utilization of the cache area corresponding to the second backup module.

[0240] Step 1113: The second backup module deletes the second response message.

[0241] If the second backup module receives a second response message identifier from the third backup module, it indicates that the second response message has been successfully responded to by the third backup module. In order to improve storage utilization, the second backup module deletes the second response message.

[0242] For instructions on how a backup device can take over operation from a primary device in case the primary device fails in other examples, please refer to [link to relevant documentation]. Figure 8 The corresponding explanations will not be elaborated upon here.

[0243] Using the primary / standby switchover method shown in this embodiment, if the third primary module successfully receives the second response message, but has not yet backed up the third backup data to the third standby module, then... Figure 8 In a corresponding embodiment, the first backup module needs to send a first response message to the second backup module, and the second backup module then sends a second response message to the third backup module. Figure 11 In the corresponding embodiment, instead of the first backup module sending the first response message to the second backup module, the second backup module directly sends the second response message to the third backup module. It can be understood that when the primary device fails, if the backup module (e.g., the second backup module) finds that the cached response message (e.g., the second response message) has not been deleted, it directly sends the cached response message to the adjacent backup module (e.g., the third backup module) so that the adjacent backup module can respond to the response message. There is no need to retrieve the response message again from the backup module that is ranked first. This can reduce the latency of the primary-backup switchover while avoiding data loss during the primary-backup switchover process.

[0244] Figure 12 This is a schematic block diagram illustrating an embodiment of the communication device provided in this application. Specifically, the communication device 1200 includes a transmitting module 1201, a processing module 1202, and a receiving module 1203. The transmitting module 1201 may also be referred to as a transmitter, transmitting unit, or transmitting device. The receiving module 1203 may also be referred to as a receiver, receiving unit, or receiving device. The processing module 1202 is used to implement corresponding processing functions. The transmitting module 1201 and the receiving module 1203 may also be referred to as a communication interface or communication unit.

[0245] Optionally, the communication device 1200 further includes a storage unit, which can be used to store instructions and / or data. The processing module 1202 can read the instructions and / or data in the storage unit to execute corresponding processing control actions.

[0246] For example, the communication device 1200 can be the main device shown in the above embodiments, or it can be a module (such as a software module, hardware chip, circuit, etc.) applied to the main device. In the above method embodiments, the sending module 1201 is used to execute the sending-related steps implemented by the main device, the processing module 1202 is used to execute the processing-related steps implemented by the main device, and the receiving module 1203 is used to execute the receiving-related steps implemented by the main device.

[0247] For example, the communication device 1200 can be a backup device as shown in the above embodiments, or it can be a module (such as a software module, hardware chip, circuit, etc.) applied to the backup device. In the above method embodiments, the sending module 1201 is used to execute the sending-related steps implemented by the backup device, the processing module 1202 is used to execute the processing-related steps implemented by the backup device, and the receiving module 1203 is used to execute the receiving-related steps implemented by the backup device.

[0248] It should be understood that the specific process of each module performing the above-mentioned steps has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.

[0249] Figure 13 This application provides a schematic diagram of an embodiment of a chip system. The chip system 1300 (or may also be referred to as a processing system) includes logic circuitry 1310 and a communication interface (input / output interface) 1320.

[0250] The logic circuit 1310 can be a processing circuit in the chip system 1300. The logic circuit 1310 can be coupled to a memory unit, calling instructions from the memory unit, enabling the chip system 1300 to implement the methods and functions of the embodiments of this application. The communication interface 1320 can be an input / output circuit in the chip system 1300, outputting processed information from the chip system 1300, or inputting data or signaling information to be processed into the chip system 1300 for processing.

[0251] Optionally, the logic circuit 1310 may be implemented by one or more processors, including the one or more processors or the processing portion of the one or more processors.

[0252] Alternatively, the communication interface 1320 may include transceiver circuitry, a transceiver, input / output circuitry, or a communication interface.

[0253] As one option, the chip system 1300 is used to implement the operations performed by the primary or backup device in the various method embodiments described above.

[0254] Specifically, the logic circuit 1310 is used to implement the processing-related operations performed by the primary device or the backup device in the above method embodiments; the communication interface 1320 is used to implement the sending and / or receiving-related operations performed by the primary device or the backup device in the above method embodiments.

[0255] This application also provides a computer-readable storage medium storing computer instructions for implementing the methods executed by a primary device or a backup device in the above-described method embodiments.

[0256] For example, when the computer program is executed by a computer, it enables the computer to implement the methods performed by the primary or backup device in the various embodiments of the above methods.

[0257] This application also provides a computer program product comprising instructions which, when executed by a computer, implement the methods performed by a primary device or a backup device in the above-described method embodiments.

[0258] This application also provides a communication system, which includes the primary device and backup device described in the above embodiments. The communication system also includes one or more network elements. For example, the network element may be a transmission device, etc. For detailed explanation, please refer to [link to relevant documentation]. Figure 2 or Figure 3 The corresponding explanations will not be elaborated upon here.

[0259] The explanations and beneficial effects of the relevant contents in any of the devices provided above can be found in the corresponding method embodiments provided above, and will not be repeated here.

[0260] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method of data synchronization, characterized by, The method is applied to a backup device, and the method comprises: A first backup module obtains a first response message, the backup device comprises N+1 backup modules arranged in a response sequence, N is an arbitrary integer greater than or equal to 1, the first backup module is one of the first N backup modules, the first response message is a message generated by a first master module in response to a target message, and the first response message is used to trigger a second master module response; The first backup module receives first backup data from the first master module, the first backup data is result data generated by the first master module in processing the target message, the first backup module is used to replace the first master module according to the first backup data in the case of a failure of a master device, and the first backup module is used to trigger a second backup module response through the first response message, the second backup module is arranged after the first backup module in the N+1 backup modules, and the master device comprises the first master module and the second master module.

2. The method of claim 1, wherein, After the first backup module obtains the first response message, the method further comprises: If the master device fails, the first backup module sends the first response message to the second backup module; The second backup module responds to the first response message to obtain second backup data, the second backup data is result data generated by the second backup module in processing the first response message; The second backup module replaces the second master module according to the second backup data.

3. The method of claim 2, wherein, After the second backup module responds to the first response message to obtain the second backup data, the method further comprises: The first backup module receives a first response message identifier from the second backup module, and the first response message identifier is used to identify the first response message; The first backup module deletes the first response message according to the first response message identifier.

4. The method of claim 3, wherein, Before the first backup module receives the first response message identifier from the second backup module, the method further comprises: The second backup module sends a second response message to a third backup module, the third backup module is arranged after the second backup module in the N+1 backup modules, and the second response message is a message generated by the second backup module in response to the first response message; The third backup module responds to the second response message to obtain third backup data, the third backup data is result data generated by the third backup module in processing the second response message; The third backup module replaces a third master module according to the third backup data, and the master device further comprises the third master module; The third backup module sends a second response message identifier to the second backup module, and the second response message identifier is used to identify the second response message; The second backup module obtains the corresponding first response message identifier according to the second response message identifier.

5. The method of claim 1, wherein, After the first backup module receives the first backup data from the first master module, the method further comprises: The second backup module receives second backup data from the second primary module, the second backup data being result data generated by the second primary module in processing the first response message, and the second backup module is configured to take over the second primary module according to the second backup data in the case of failure of the primary device.

6. The method of claim 5, wherein, After the first backup module receives the first backup data from the first primary module, the method further comprises: The second backup module obtains a second response message, the second response message being a message generated by the second primary module in response to the first response message, and the second response message being configured to trigger a response of a third primary module, the primary device further comprising the third primary module.

7. The method according to claim 1 or 5, characterized in that, After the first backup module receives the first backup data from the first primary module, the method further comprises: The first backup module receives a first response message identifier from the first primary module, the first response message identifier being configured to identify the target message; The first backup module deletes the first response message according to the first response message identifier.

8. The method of claim 6, wherein, After the second backup module obtains the second response message, the method further comprises: The second backup module sends a first response message identifier to the first backup module, the first response message identifier being configured to identify the first response message; The first backup module deletes the first response message according to the first response message identifier.

9. The method of claim 8, wherein, After the second backup module sends the first response message identifier to the first backup module, the method further comprises: A third backup module receives third backup data from the third primary module, the third backup data being result data generated by the third primary module in processing the second response message, and the third backup module being configured to take over the third primary module according to the third backup data in the case of failure of the primary device; The third backup module sends a second response message identifier to the second backup module, the second response message identifier being configured to identify the second response message; The second backup module deletes the second response message according to the second response message identifier.

10. A method of data synchronization, characterized by, The method is applied to a primary device, and the method comprises: A first primary module obtains a target message, the primary device comprising N+1 primary modules arranged in a sequence of response, N being any integer greater than or equal to 1, and the first primary module being one of the first N primary modules; The first primary module sends a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, and the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; The first primary module sends the first response message to a first backup module; The first master module sends first backup data to the first backup module, the first backup data is result data generated by the first master module in processing the target message, and the first backup module is used to replace the first master module according to the first backup data in case of failure of the master device.

11. The method of claim 10, wherein, After the first master module sends the first response message to the second master module, the method further comprises: The second master module sends second backup data to the second backup module, the second backup data is result data generated by the second master module in processing the first response message, and the second backup module is used to replace the second master module according to the second backup data in case of failure of the master device.

12. The method of claim 11, wherein, After the first master module sends the first response message to the second master module, the method further comprises: The second master module sends a second response message to the second backup module, the second response message being a message generated by the second master module in response to the first response message.

13. The method according to any one of claims 10 to 12, characterized in that, After the first master module sends the first response message to the second master module, the method further comprises: The second master module sends a first response message identifier to the first master module, the first response message identifier being used to identify the first response message; The first master module deletes the first response message according to the first response message identifier.

14. The method of claim 13, wherein, Before the second master module sends the first response message identifier to the first master module, the method further comprises: The second master module receives a second response message identifier from a third master module, the second response message identifier being used to identify the second response message, and the third master module is arranged after the second master module in the N+1 master modules; The second master module obtains the corresponding first response message identifier according to the second response message identifier.

15. The method of claim 14, wherein, Before the second master module receives the second response message identifier from the third master module, the method further comprises: The second master module sends a second response message to the third master module, the second response message being a message generated by the second master module in response to the first response message, and the second response message is used to trigger the response of the third master module.

16. A back-up device, characterized by The backup device comprises N+1 backup modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, and the first backup module is used to: Obtain a first response message, the first backup module being one of the first N backup modules, the first response message being a message generated by the first master module in response to the target message, and the first response message being used to trigger the response of the second master module; receive first backup data from the first primary module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take over the first primary module according to the first backup data in the case of failure of the primary device, and being configured to trigger a response of a second backup module by the first response message, the second backup module being arranged after the first backup module in the N+1 backup modules, the primary device comprising the first primary module and the second primary module.

17. A master device, comprising: The primary device comprises N+1 primary modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, the first primary module being configured to: obtain a target message, the first primary module being one of the first N primary modules arranged in sequence; send a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; send the first response message to a first backup module; send first backup data to the first backup module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take over the first primary module according to the first backup data in the case of failure of the primary device.

18. A control unit, characterized by The primary device comprises N+1 primary modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, the first primary module being configured to:

19. A chip system, characterized by obtain a target message, the first primary module being one of the first N primary modules arranged in sequence; 20. A computer-readable storage medium, characterized in that, send a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; send the first response message to a first backup module; send first backup data to the first backup module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take over the first primary module according to the first backup data in the case of failure of the primary device. The primary device comprises N+1 primary modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, the first primary module being configured to: obtain a target message, the first primary module being one of the first N primary modules arranged in sequence; send a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; send the first response message to a first backup module; send first backup data to the first backup module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take over the first primary module according to the first backup data in the case of failure of the primary device. The primary device comprises N+1 primary modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, the first primary module being configured to: obtain a target message, the first primary module being one of the first N primary modules arranged in sequence; send a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; send the first response message to a first backup module; send first backup data to the first backup module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take over the first primary module according to the first backup data in the case of failure of the primary device. The primary device comprises N+1 primary modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, the first primary module being configured to: obtain a target message, the first primary module being one of the first N primary modules arranged in sequence; send a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; send the first response message to a first backup module; send first backup data to the first backup module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take over the first primary module according to the first backup data in the case of failure of the primary device. The primary device comprises N+1 primary modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, the first primary module being configured to: obtain a target message, the first primary module being one of the first N primary modules arranged in sequence; send a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; send the first response message to a first backup module; send first backup data to the first backup module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take over the first primary module according to the first backup data in the case of failure of the primary device. The primary device comprises N+1 primary modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, the first primary module being configured to: obtain a target message, the first primary module being one of the first N primary modules arranged in sequence; send a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; send the first response message to a first backup module; send first backup data to the first backup module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take over the first primary module according to the first backup data in the case of failure of the primary device. The primary device comprises N+1 primary modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, the first primary module being configured to: obtain a target message, the first primary module being one of the first N primary modules arranged in sequence; send a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; send the first response message to a first backup module; send first backup data to the first backup module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take over the first primary module according to the first backup data in the case of failure of the primary device. The primary device comprises N+1 primary modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, the first primary module being configured to: obtain a target message, the first primary module being one of the first N primary modules arranged in sequence; send a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; send the first response message to a first backup module; send first backup data to the first backup module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take over the first primary module according to the first backup data in the case of failure of the primary device. The primary device comprises N+1 primary modules arranged in sequence according to the order of response, N being any integer greater than or equal to 1, the first primary module being configured to: obtain a target message, the first primary module being one of the first N primary modules arranged in sequence; send a first response message to a second primary module, the first response message being a message generated by the first primary module in response to the target message, the first response message being configured to trigger a response of the second primary module, the second primary module being arranged after the first primary module in the N+1 primary modules; send the first response message to a first backup module; send first backup data to the first backup module, the first backup data being result data generated by the first primary module in processing the target message, the first backup module being configured to take