Event processing method of fttr network, electronic device and readable storage medium

CN122420690BActive Publication Date: 2026-09-18ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610870971.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-09-18
Estimated Expiration
2046-06-16

AI Technical Summary

Technical Problem

[0003]然而,相关技术采用的FTTR网络保护通常是各层独立设计的,在FTTR网络出现异常事件,例如故障事件或主备倒换事件时,这种各层独立设计的方案会导致事件处理的时间较长

Benefits of technology

[0009] In this embodiment, in response to a target event occurring in the FTTR network, a target cooperative operation matching the target event is obtained. The target cooperative operation is determined based on a preset mapping relationship, which includes a mapping relationship between preset events and cooperative operations. The cooperative operation includes operations performed on at least two target layers among multiple layers divided according to the OSI model. The preset event includes the target event, and the cooperative operation includes the target cooperative operation. The target cooperative operation is executed to restore target services, including services interrupted by the target event. Thus, when a target event occurs in the FTTR network, a target cooperative operation matching the target event can be determined based on the preset mapping relationship. Compared to the protection mechanisms in related technologies that use independently designed layers, this embodiment can execute cooperative operations of at least two layers to restore services interrupted by the target event. This eliminates the need for each layer to perceive and respond in isolation, reducing the time spent waiting for each layer to perceive and respond, thereby reducing the time the device spends processing the target event and solving the problem of long event processing times in related technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122420690B_ABST
    Figure CN122420690B_ABST
Patent Text Reader

Abstract

The application discloses an event processing method of an FTTR network, an electronic device and a readable storage medium, and belongs to the field of communication. The method comprises the following steps: in response to a target event occurring in a fiber to the room (FTTR) network, acquiring a target cooperative operation matched with the target event, wherein the target cooperative operation is determined based on a preset mapping relationship, and the preset mapping relationship comprises a mapping relationship between a fault event and a cooperative operation; the cooperative operation comprises an operation performed for at least two target layers in a plurality of layers divided according to open system interconnection, the fault event comprises the target event, and the cooperative operation comprises the target cooperative operation; and performing the target cooperative operation, wherein the target cooperative operation is used for recovering a target service, and the target service comprises a service interrupted due to the target event.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communications, and specifically relates to an event processing method, electronic device, and readable storage medium for an FTTR network. Background Technology

[0002] Fiber to the Room (FTTR) networks, as a next-generation all-optical networking solution, can extend gigabit or even 10-gigabit fiber directly to every room or every corner of a campus, thus providing users with a better internet experience. To further improve network reliability, a redundancy backup mechanism is typically employed. This mechanism is implemented through two gateway devices. The secondary gateway in the network establishes connections with both gateway devices simultaneously, and under normal circumstances, the service is carried by the gateway device in the primary mode.

[0003] However, the FTTR network protection used in related technologies is usually designed independently for each layer. When abnormal events occur in the FTTR network, such as failure events or primary / standby switchover events, this independent layer design scheme will result in a long event processing time. Summary of the Invention

[0004] This application provides an event processing method, electronic device, and readable storage medium for an FTTR network, which can solve the problem of long event processing time in related technologies.

[0005] In a first aspect, embodiments of this application provide an event handling method for an FTTR network, executed by a first gateway device, comprising: In response to a target event occurring in the FTTR network, a target cooperative operation matching the target event is obtained. The target cooperative operation is determined based on a preset mapping relationship, which includes a mapping relationship between a preset event and a cooperative operation. The cooperative operation includes operations performed on at least two target layers among multiple layers divided according to the Open Systems Interconnection (OSI) model. The preset event includes the target event, and the cooperative operation includes the target cooperative operation. The target collaborative operation is performed to restore the target service, which includes the service interrupted due to the target event.

[0006] In a second aspect, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores a program or instructions, which, when executed by the processor, implement the method described in the first aspect.

[0007] Thirdly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the method described in the first aspect.

[0008] Fourthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.

[0009] In this embodiment, in response to a target event occurring in the FTTR network, a target cooperative operation matching the target event is obtained. The target cooperative operation is determined based on a preset mapping relationship, which includes a mapping relationship between preset events and cooperative operations. The cooperative operation includes operations performed on at least two target layers among multiple layers divided according to the OSI model. The preset event includes the target event, and the cooperative operation includes the target cooperative operation. The target cooperative operation is executed to restore target services, including services interrupted by the target event. Thus, when a target event occurs in the FTTR network, a target cooperative operation matching the target event can be determined based on the preset mapping relationship. Compared to the protection mechanisms in related technologies that use independently designed layers, this embodiment can execute cooperative operations of at least two layers to restore services interrupted by the target event. This eliminates the need for each layer to perceive and respond in isolation, reducing the time spent waiting for each layer to perceive and respond, thereby reducing the time the device spends processing the target event and solving the problem of long event processing times in related technologies. Attached Figure Description

[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a schematic diagram of a primary / backup redundancy protection mechanism in related technologies; Figure 2 This is a flowchart of an event handling method for an FTTR network provided in an embodiment of this application; Figure 3 This is a schematic diagram of a fault handling process provided in an embodiment of this application; Figure 4 This is a flowchart of another event handling method for an FTTR network provided in an embodiment of this application; Figure 5This is a schematic diagram of the logical architecture of a gateway device provided in an embodiment of this application; Figure 6 This is a flowchart of another event handling method for an FTTR network provided in an embodiment of this application; Figure 7 This is a flowchart of another event handling method for an FTTR network provided in an embodiment of this application; Figure 8 This is a flowchart of another event handling method for an FTTR network provided in an embodiment of this application; Figure 9 This is a schematic diagram of the interactive flow of a fault handling process provided in an embodiment of this application; Figure 10 This is a structural block diagram of an event processing device for an FTTR network provided in an embodiment of this application; Figure 11 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0013] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0014] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0015] FTTR (Fiber to the Radio) networking is an indoor all-optical networking solution based on fiber optic media. It extends gigabit or even 10-gigabit fiber from the entry point to every room, including the living room, bedroom, and study, aiming to completely solve the fundamental problems of traditional wired and wireless LAN (Wi-Fi) technologies in terms of coverage, wall penetration attenuation, and speed bottlenecks. As a next-generation all-optical networking solution, FTTR provides users with an ultimate internet experience. However, this highly centralized network architecture also poses challenges to the reliability of core equipment. Deploying a primary / backup protection mechanism for the core hub (main gateway) is key to achieving high reliability in FTTR networks.

[0016] For reference Figure 1 , Figure 1 This is a schematic diagram of a primary / backup redundancy protection mechanism in related technologies. For example... Figure 1 As shown, implementing primary and backup redundancy protection requires a primary gateway device and a backup gateway device. The primary and backup gateway devices can be connected via a specific direct connection (such as a network cable or fiber optic cable, used to carry service data or heartbeat information) to continuously exchange status information. Furthermore, optical links can be protected using a Passive Optical Network (PON) Type B protection network. Additionally, to support seamless Wi-Fi roaming, it is typically necessary to support scenarios where one network layer gateway instance (L3 sub-interface) corresponds to multiple downstream PON ports.

[0017] like Figure 1 As shown, both the primary gateway device and the backup gateway device can have at least one uplink port and n downlink PON ports. One downlink PON port of the primary gateway device and one downlink PON port of the backup gateway device can form a protection group. Figure 1 The primary gateway device's n downstream PON ports and the backup gateway device's n downstream PON ports form n protection groups. For two PON ports belonging to the same protection group, one PON port is in primary mode, and the other is in backup mode. It is understandable that not all n downstream PON ports under the primary gateway device are in primary mode, and not all n downstream PON ports under the backup gateway device are in backup mode.

[0018] The following describes an example implementation environment of the event handling method for an FTTR network provided in this application. This method can be applied to a redundant backup system consisting of two FTTR master gateway devices connected via a direct link or an uplink network. This redundant backup system can act as a network edge node, simultaneously providing Layer 2 access, Layer 3 gateway (one gateway instance corresponds to multiple PON ports), and various application layer services (DHCP server, Portal authentication, Mesh network control, and slave gateway management). The network contains a large number of terminal users' wireless access points (APs), workstations (STAs), and personal computers (PCs) accessed through optical network units (ONUs), placing high demands on service continuity and reliability.

[0019] The event handling method for FTTR networks provided in this application embodiment can be applied to the redundancy protection technology of the main gateway. It can coordinate the execution of corresponding actions by each target layer of the main gateway device, so that each originally independent target layer no longer perceives and responds in isolation, reducing the time spent waiting for each target layer to perceive and respond.

[0020] The event handling method for the FTTR network provided in this application embodiment can be executed by a target device, wherein the target device can be a master gateway device in the FTTR network, and the master gateway device can be connected to multiple slave gateways via optical fiber. The master gateway device can be, for example, a primary gateway device or a backup gateway device; here, a primary gateway device refers to a primary master gateway device, and a backup gateway device refers to a backup master gateway device.

[0021] The event processing method of the FTTR network provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0022] Please see Figure 2 , Figure 2 This is a flowchart of an event handling method for an FTTR network provided in an embodiment of this application. The method is executed by a first gateway device. Figure 2 As shown, the method includes the following steps: Step 210: In response to a target event occurring in the FTTR network, obtain the target cooperative operation matching the target event. The target cooperative operation is determined based on a preset mapping relationship, which includes the mapping relationship between preset events and cooperative operations. The cooperative operation includes operations performed on at least two target layers among multiple layers divided according to OSI. The preset event includes the target event, and the cooperative operation includes the target cooperative operation.

[0023] In this embodiment, the target event can be used to indicate a failure in the FTTR network or a change in the operating status of the second gateway device. The first gateway device is either a primary gateway device or a backup gateway device, and the second gateway device is either a primary gateway device or a backup gateway device. When a target event occurs in the FTTR network, if the first gateway device is the primary gateway device, the target event can be a failure event or a link-layer failover event. If the first gateway device is a backup gateway device, the target event can be a primary / backup failover event, indicating that the first gateway device switches from a backup state to a primary state and the second gateway device switches from a primary state to a backup state. It should be noted that both the primary and backup gateway devices are primary gateway devices; the primary gateway device refers to the actively used primary gateway device, and the backup gateway device refers to the standby primary gateway device.

[0024] Specifically, the target collaborative operation and target event matching indication indicate that there is a mapping relationship between the target collaborative operation and the target event. In particular, the preset mapping relationship may include a mapping relationship between multiple preset events and multiple collaborative operations, with a one-to-one correspondence between the multiple preset events and multiple collaborative operations. The multiple preset events may include a target event, and the collaborative operation among the multiple collaborative operations that has a mapping relationship with the target event can be identified as the target collaborative operation.

[0025] In this embodiment, OSI is a standard architecture proposed by the International Organization for Standardization for interconnecting computer or communication systems, comprising the following seven layers: Physical Layer, Link Layer (also known as Data Link Layer), Network Layer, Transport Layer, Session Layer, Presentation Layer, and Application Layer. For example, multiple layers may include at least two of the Link Layer, Network Layer, and Application Layer. However, it should be noted that the multiple layers and target layer in this embodiment are not limited to the Link Layer, Network Layer, and Application Layer mentioned herein, and may also be other layers in the aforementioned seven-layer structure.

[0026] For example, in one embodiment of this application, the first gateway device is a backup gateway device, and the target event is used to indicate a change in the operating status of the primary gateway device. Here, "first gateway device is a backup gateway device" means that the first gateway device is a backup gateway device before performing the target collaborative operation. In this case, the target event can be understood as a primary / backup switchover event, that is, it is necessary to switch the first gateway device from a backup gateway device to a primary gateway device, and switch the second gateway device from a primary gateway device to a backup gateway device. For example, the primary / backup switchover event is a switchover command or a heartbeat notification command, that is, a switchover command or heartbeat notification command sent by the second gateway device to the first gateway device. In this way, when the operating status of the second gateway device, which is the primary gateway device, changes, the various target layers of the first gateway device can be coordinated to perform corresponding operations in a timely manner.

[0027] Step 220: Execute the target collaborative operation, which is used to restore the target service, including the service interrupted due to the target event.

[0028] In this embodiment, by executing target collaborative operations, at least two target layers can be coordinated to perform corresponding operations in a unified manner, rather than each layer responding and executing in isolation. For example, when an FTTR network fails (e.g., the downstream PON port fiber is interrupted), the link layer completes the switchover operation first. In traditional primary / backup redundancy protection schemes, the application layer may not be aware that the link layer has completed the switchover, requiring users to re-authenticate or obtain a network protocol (Internet Protocol, IP) address. However, the event handling method for FTTR networks provided in this embodiment can coordinate at least two target layers to perform corresponding operations in a unified manner, i.e., execute the linkage operation of at least two target layers, thereby enabling faster recovery of target services interrupted by target events.

[0029] In this embodiment, in response to a target event occurring in the FTTR network, a target cooperative operation matching the target event is obtained. The target cooperative operation is determined based on a preset mapping relationship, which includes a mapping relationship between preset events and cooperative operations. The cooperative operation includes operations performed on at least two target layers among multiple layers divided according to the OSI model. The preset event includes the target event, and the cooperative operation includes the target cooperative operation. The target cooperative operation is executed to restore target services, including services interrupted by the target event. Thus, when a target event occurs in the FTTR network, a target cooperative operation matching the target event can be determined according to the preset mapping relationship. Compared to the protection mechanism in related technologies that uses independent design for each layer, this embodiment can execute cooperative operations of at least two layers to restore services interrupted by the target event. This eliminates the need for each layer to perceive and respond in isolation, reducing the time spent waiting for each layer to perceive and respond, thereby reducing the time for the device to process the target event and solving the problem of long event processing time in related technologies.

[0030] Optionally, in one embodiment of this application, the preset events include fault events and operating status conditions, and the preset mapping relationships include a first mapping relationship and a second mapping relationship. The first mapping relationship includes the mapping relationship between fault events and the operating status conditions of the first gateway device, and the second mapping relationship includes the mapping relationship between the operating status conditions of the first gateway device and collaborative operations. In this way, the operating status conditions of the first gateway device can be monitored and managed through the first and second mapping relationships, making the mapping process of collaborative operations more logical.

[0031] In this embodiment, the first gateway device operates in either a primary or standby state. A first mapping relationship can be used to map fault events to the operating state of the first gateway device; for example, when fault A occurs, the first gateway device should be in the primary state, and when fault B occurs, the first gateway device should be in the standby state. A second mapping relationship can be used to map the operating state of the first gateway device to collaborative operations performed by multiple target layers; for example, collaborative operation 1 is performed when the first gateway device is in the primary state, and collaborative operation 2 is performed when the first gateway device is in the standby state.

[0032] For example, the operational status may further include the status of each PON port of the gateway device, including the status of uplink ports and downlink PON ports. The status of the uplink port can be either active (UP) or inactive (DOWN), and the status of the downlink PON port can be either active or inactive. Through the first mapping relationship, a fault event can be mapped to the operational status of the first gateway device. Through the second mapping relationship, the operational status (primary or standby) of the first gateway device and the status of each downlink PON port of the first gateway device can be mapped to collaborative operations performed by at least two target layers.

[0033] For example, in one embodiment of this application, the first gateway device is the primary gateway device before performing the target collaborative operation. The first gateway device has at least one uplink port and multiple downlink PON ports. The target event includes a target fault, which includes at least one of the following faults: the target downlink PON port among the multiple downlink PON ports cannot receive a signal, and the target downlink PON port is one of the multiple downlink PON ports that is in an active state; at least one uplink port is in a non-working state; the first gateway device performs a restart or power-off operation; the direct link between the first gateway device and the second gateway device is disconnected (the direct link between the primary and backup gateways is down), and the second gateway device is the backup gateway device before the first gateway device performs the target collaborative operation.

[0034] In this context, "the target downstream PON port cannot receive a signal" refers to at least one downstream PON port being inactive. This includes two scenarios: a single downstream PON port switching from active to inactive (i.e., a single active PON port going down), and all downstream PON ports being inactive (i.e., the last active PON port going down). "At least one upstream port is inactive" means all upstream ports of the first gateway device switching from active (UP) to inactive (DOWN). The direct link between the first and second gateway devices refers to the dedicated direct link used for heartbeat detection, configuration synchronization, and state negotiation between the two master gateway devices in a dual-master gateway backup scheme. It should be noted that this only lists some possible fault events in certain scenarios, and the embodiments of this application are not limited to handling these specific fault events.

[0035] For example, in the event of any of the above-mentioned failure events, please refer to Table 1 below and Figure 3 To handle the corresponding fault events, Figure 3 This is a schematic diagram of a fault handling process provided in an embodiment of this application.

[0036]

[0037] Table 1 As shown in Table 1, fault events can serve as triggering conditions for fault handling. Table 1 allows you to find the operating status of the primary and backup gateways when various fault events are triggered, as well as the actions that each layer in the primary and backup gateways should perform. When the fault events "all uplink ports go from UP to DOWN" or "primary device restarts or loses power" are triggered, the actions performed by the network and application layers of the first gateway device can be referenced from the actions performed by the network and application layers of the first gateway device when the fault event "last active PON port goes DOWN" is triggered. Table 1 does not provide a detailed description of each action. In Table 1, "primary device" refers to the primary gateway device, and "backup device" refers to the backup gateway device.

[0038] like Figure 3 As shown, when a target fault occurs, the fault type can be determined first, that is, to determine which of the following fault events the target fault belongs to: a single active PON port DOWN; the last active PON port DOWN; all uplink ports going from UP to DOWN; the primary gateway device being powered off or restarted; and the direct connection port between the primary and backup ports DOWN.

[0039] When the target fault indicates that a single active PON port is down, the link layer performs the following operations: triggers a Type B switchover for that PON port; the network layer performs the following operations: establishes a service bypass channel; and the application layer performs the following operations: protects the primary gateway device's service operation. When the target fault indicates that the last active PON port is down, the link layer performs the following operations: triggers a Type B switchover for that PON port; the network layer performs the following operations: performs standby device promotion to primary; and the application layer performs the following operations: the primary device stops responding to service, and the standby device takes over all application layer services. When the target fault indicates that all uplink ports are down, the link layer performs the following operations: forces all PON ports to perform a Type B switchover; the network layer performs the following operations: the standby device is promoted to primary; and the application layer performs the following operations: the primary device stops responding to service, and the standby device takes over all application layer services.

[0040] When the target fault indicates that the primary gateway device has lost power or restarted, the link layer performs the following operations: the standby device triggers a failover after detecting a loss of signal (LOS); the network layer performs the following operations: the standby device is promoted to primary; the application layer performs the following operations: the primary device stops responding to services, and the standby device takes over all application layer services. When the target fault indicates that the primary / standby heartbeat is interrupted (the direct connection between primary and standby is down), the link layer does not take any action or issue an alarm; the network layer performs the following operations: the forwarding state of the primary device remains unchanged, the standby gateway device locks the transparent transmission channel to prevent dual primary operation, and reports a critical alarm; the application layer performs the following operations: the MESH controller enters independent operation mode or issues an alarm. Through the above fault handling process, end-to-end protection can be achieved.

[0041] In one embodiment of this application, a target collaborative operation is used to switch the operating state of a first gateway device. After executing the target collaborative operation, the operating state of the first gateway device switches from a first state to a second state. The first state is one of a primary state and a standby state, and the second state is the other of the primary state and the standby state. In other words, by executing the target collaborative operation, the operating state of the first gateway device can be switched from the first state to the second state. Since the target collaborative operation is a coordinated operation of multiple target layers, faster device state switching can be achieved, allowing each target layer to quickly reach the desired state. Furthermore, in this embodiment, the target layers do not perceive and switch states in isolation, ensuring the consistency of the states of each target layer of the first gateway device.

[0042] Correspondingly, in one embodiment of this application, after obtaining the target cooperative operation matching the target event, the event handling method of the FTTR network further includes: a first gateway device sending a control command to a second gateway device; the control command instructing the second gateway device to switch its operating state from a second state to a first state. Here, the first gateway device is one of a primary gateway device and a backup gateway device, and the second gateway device is the other of a primary gateway device and a backup gateway device. The control command is, for example, a link-layer failover command. After the first gateway device obtains the target cooperative operation for switching the operating state of the first gateway device, it can send a control command to the second gateway device instructing the switching of the second gateway device's operating state, thereby ensuring that both the primary and backup gateway devices can complete the state switch in a timely manner.

[0043] See also Figure 4 , Figure 4 This is a flowchart of another event handling method for an FTTR network provided in an embodiment of this application. The method is executed by a first gateway device, which may include a global management module and multiple coordination modules. Figure 4 As shown, the method includes the following steps: Step 410: Determine the target collaborative operation matching the target event from the preset mapping relationship through the global management module. The target collaborative operation includes the target operation corresponding to each collaborative module. The target operation corresponding to the collaborative module is the operation that the target layer of the collaborative module should perform in response to the target event.

[0044] In this embodiment, the preset mapping relationship is stored in the global management module, and each of the multiple collaborative modules corresponds to a target layer. Taking at least two target layers including the link layer, network layer, and application layer as an example, the multiple collaborative modules may include a link layer collaborative module, a network layer collaborative module, and an application layer collaborative module. The link layer collaborative module is used to execute the corresponding actions of the link layer, the network layer collaborative module is used to execute the corresponding actions of the network layer, and the application layer collaborative module is used to execute the corresponding actions of the application layer.

[0045] See also Figure 5 , Figure 5 This is a schematic diagram of the logical architecture of a gateway device provided in an embodiment of this application. The logical architecture of both the first gateway device and the second gateway device in this embodiment can be adopted. Figure 5The logical architecture shown below is illustrated using the first gateway device as an example. The first gateway device may include a multi-layer collaborative protection module, a driver module, and a protocol module. The core of this application lies in the multi-layer collaborative protection module running on each gateway device. The multi-layer collaborative protection module may include a global management module (also known as a global primary / backup status management submodule), a link layer collaboration module (also known as a link layer collaboration submodule), and a network layer collaboration module (also known as a network layer collaboration submodule). The driver module may include a PON driver unit and an uplink / direct-connection port driver unit. The protocol module may include a Dynamic Host Configuration Protocol Server (DHCP server), a Portal, a routing protocol stack, and a mesh network.

[0046] The global management module can comprehensively consider the "PON port status" and "uplink port status" information of the first gateway device to determine whether the device should be in primary or standby status. The global management module can maintain a core "hierarchical trigger matrix" (the content of the matrix is ​​the preset mapping relationship, as shown in Table 1). That is to say, the preset mapping relationship can be stored in the global management module. After any fault event is reported to the global management module, the global management module can query the matrix to issue unified coordinated operations. The coordinated operations include the primary / standby status information of the first gateway device or the execution actions of each target layer.

[0047] The link layer coordination module is responsible for interacting with the driver and monitoring the status of each port (including uplink ports and PON ports) in real time, and reporting port status changes to the global management module immediately. The link layer coordination module can also receive switchover commands from the global management module and execute Type B protection switchover actions for the downlink PON ports. The network layer coordination module is used to manage gateway modes, trigger linkages, and manage transparent transmission channels. This module can perform primary / backup switching actions at the network layer, such as publishing / revoking routes via routing protocols and establishing or dismantling service transparent forwarding channels (service transparent transmission channels). Specifically, when the first gateway device is in standby mode, a service transparent forwarding channel can be established and maintained from the downlink PON port to the second gateway device (primary gateway device). When the first gateway device switches from standby mode to primary mode, the forwarding plane can be switched from the service transparent forwarding channel to the local gateway, and then the service transparent forwarding channel can be dismantled. The application layer collaboration module can embed multiple agents (such as DHCP server primary and backup agents, Portal authentication primary and backup agents, and Mesh control primary and backup agents) to be responsible for completing the primary and backup failover of services such as DHCP server, Portal authentication, and Mesh controller when triggered by specific events.

[0048] This application's embodiments illustrate the execution logic of each module in a scenario where a preset mapping relationship (hierarchical trigger matrix) is stored in the global management module. However, it should be noted that... Figure 5 This is merely an example of the logical architecture of a gateway device. The first and second gateway devices in this application embodiment are not limited to the logical architecture described herein. For example, the hierarchical trigger matrix can be jointly managed by a global management module, a link layer coordination module, a network layer coordination module, and an application layer coordination module, rather than being managed solely by the global management module.

[0049] Step 420: Send the target operation corresponding to the collaboration module to each collaboration module through the global management module; receive the target operation corresponding to the collaboration module through each collaboration module.

[0050] In this embodiment, at least two target layers may include a first target layer and a second target layer, and multiple coordination modules may include a first coordination module corresponding to the first target layer and a second coordination module corresponding to the second target layer. Target coordination operations may include a first operation that the first target layer should perform in response to the target event, and a second operation that the second target layer should perform in response to the target event. The first operation that the first target layer should perform in response to the target event can be sent to the first coordination module through the global management module, and the second operation that the second target layer should perform in response to the target event can be sent to the second coordination module through the global management module. The first target layer may be one of the link layer, network layer, and application layer, and the second target layer may be another of the link layer, network layer, and application layer, and the first target layer and the second target layer are different. In one example, at least two target layers may further include a third target layer, which may be another of the link layer, network layer, and application layer, and the first target layer, the second target layer, and the third target layer are different.

[0051] Step 430: Execute the target coordination operation, which is used to restore the target service, including the service interrupted due to the target event.

[0052] In this embodiment, a global management module is used to store and manage preset mapping relationships. The preset mapping relationships can be set and adjusted directly through the global management module, which facilitates the management of preset mapping relationships.

[0053] In one embodiment of this application, step 430, performing the target coordination operation, includes: executing the target operation that the target layer should perform at the target layer corresponding to each coordination module. For example, a first target operation can be executed at the network layer through the network layer coordination module, a second target operation can be executed at the application layer through the application layer coordination module, and a third target operation can be executed at the link layer through the link layer coordination module. In this way, the global management module can uniformly coordinate and manage the execution of the corresponding operations by each coordination module, rather than each coordination module acting independently, and can promptly link the target layers to execute the corresponding target operations.

[0054] See also Figure 6 , Figure 6 This is a flowchart of another event handling method for an FTTR network provided in an embodiment of this application. The method is executed by a first gateway device, which includes a global management module and multiple coordination modules. Preset mapping relationships may include a first mapping relationship and a second mapping relationship. The first mapping relationship can be stored in the global management module, and the second mapping relationship can be stored in each coordination module. Each coordination module corresponds to a target layer. Target coordination operations include the target operations that each target layer should perform in response to a target event. Figure 6 As shown, the method includes the following steps: Step 610: Determine the target working status that matches the target event from the first mapping relationship through the global management module, and send the target working status to each collaborative module through the global management module.

[0055] In this embodiment, the first mapping relationship includes a mapping relationship between a fault event and the operating state of the first gateway device, where the target event can be a target fault. The global management module can determine the target operating state matching the target fault from the first mapping relationship. The first gateway device should switch its operating state to the target operating state, which is either a primary state or a standby state. Then, the global management module can send the target operating state to each of the multiple collaborative modules, thereby controlling each target layer to perform corresponding actions, causing the first gateway device to switch to the target operating state.

[0056] Step 620: Based on the received target working state, the collaboration module determines the target operation that matches the target working state from the second mapping relationship. The target operation matched by each collaboration module is the target operation that the target layer corresponding to the collaboration module should execute.

[0057] In this embodiment, the second mapping relationship may include multiple sub-mapping relationships, each corresponding one-to-one with a plurality of collaborative modules. For any one of the multiple sub-mapping relationships, the sub-mapping relationship may be stored in the corresponding collaborative module. For any one of the multiple collaborative modules, the collaborative module determines a target operation matching the received target working state from the sub-mapping relationships corresponding to the collaborative module, and uses this target operation as the target operation to be executed by the target layer corresponding to the collaborative module.

[0058] Step 630: Execute target coordination operations, which include the target operations that each target layer should perform in response to the target event.

[0059] In one embodiment of this application, performing a target collaborative operation includes: executing the target operation that the target layer should perform at the target layer corresponding to each collaborative module. For example, a first target operation can be executed at the network layer through a network layer collaborative module, a second target operation can be executed at the application layer through an application layer collaborative module, and a third target operation can be executed at the link layer through a link layer collaborative module. In this way, the global management module can uniformly coordinate and manage the execution of corresponding operations by each collaborative module, rather than each collaborative module acting independently, and can promptly link the target layers to execute the corresponding target operations.

[0060] In this embodiment, the target operation to be performed by each target layer is no longer determined by the global management module, but by the corresponding collaborative module of each target layer. This can reduce the burden on the global management module and make better use of the computing resources of each collaborative module.

[0061] See also Figure 7 , Figure 7 This is a flowchart of another event handling method for an FTTR network provided in an embodiment of this application, which is executed by a first gateway device. Figure 7 As shown, the method includes the following steps: Step 710: In response to receiving a handover event reported by the link layer, obtain the first target operation that the network layer should perform for the target event and the second target operation that the application layer should perform for the target event. The handover event is reported by the link layer after performing the handover operation in response to the target event.

[0062] In this embodiment, the target event can be the switching event or the target fault. The first gateway device has multiple downstream PON ports, and the switching operation can include a switching action for at least one of the multiple downstream PON ports. The switching mechanism of the downstream PON ports is briefly described below, where the downstream PON ports are in an active or inactive state. For a downstream PON port in an active state, the downstream PON port is in a certain Type B protection group, and according to the Type B protection mechanism, the downstream PON port is opened and in a working state, and ONUs can register to the downstream PON port. For a downstream PON port in an inactive state, the downstream PON port is in a certain Type B protection group, and according to the Type B protection mechanism, the downstream PON port is closed and in a standby state, and ONUs cannot register to the downstream PON port.

[0063] The switching operation in this embodiment is used to switch at least one downstream PON port from a third state to a fourth state. The third state is one of an active state and an inactive state, and the fourth state is the other of an active state and an inactive state. In one example, the target event is that one of the multiple downstream PON ports in the active state fails to receive a signal. In this case, the link layer responds to this target event by performing a switching operation on the downstream PON port, that is, performing a Type B protection switch on the downstream PON port, switching the downstream PON port from the active state to the inactive state. In another example, the target event is that the last downstream PON port in the active state fails to receive a signal. In this case, the link layer responds to this event by performing a switching operation on the target downstream PON port, that is, performing a Type B protection switch on the downstream PON port, switching the downstream PON port from the active state to the inactive state.

[0064] Step 720: Perform the target cooperative operation, which includes the first target operation and the second target operation.

[0065] In this embodiment, the target cooperative operation includes operations performed on at least two of the multiple layers divided according to the OSI model. These multiple layers include the link layer, network layer, and application layer, and the at least two target layers include the network layer and the application layer. A first target operation corresponding to the network layer can be performed at the network layer, and a second target operation corresponding to the application layer can be performed at the application layer. Because the link layer in this embodiment performs a switching operation in response to the target event, fast switching at the link layer can be achieved.

[0066] In one embodiment, the first gateway device includes a global management module and multiple coordination modules. These coordination modules include a link-layer coordination module corresponding to the link layer, a network-layer coordination module corresponding to the network layer, and an application-layer coordination module corresponding to the application layer. The step of obtaining the first target operation and the second target operation in response to receiving a switchover event reported by the link layer includes: in response to receiving a switchover event reported by the link-layer coordination module through the global management module, obtaining the first target operation and the second target operation through the global management module. The switchover event is reported by the link-layer coordination module after performing a switchover operation in response to the target event. The step of executing the target coordination operation includes: executing the first target operation corresponding to the network layer at the network layer through the network-layer coordination module, and executing the second target operation corresponding to the application layer at the application layer through the application-layer coordination module.

[0067] In this embodiment, after detecting a target event, the link-layer coordination module directly executes a handover operation. The global management module then determines the first target operation to be executed at the network layer and the second target operation to be executed at the application layer based on the handover operation performed by the link-layer coordination module. The first and second target operations can be determined according to the preset mapping relationship. It should be noted that the execution order of the first and second target operations is not restricted; the second target operation can be executed after the first target operation, or after the second target operation, or both can be executed simultaneously.

[0068] For example, in one embodiment of this application, the first target operation and the second target operation are issued simultaneously. Executing the target collaborative operation includes: executing the target operations corresponding to each target layer in parallel on at least two target layers. For instance, the first target operation and the second target operation are issued simultaneously by the global management module, and the first and second target operations are executed in parallel at the network layer and application layer through the network layer collaboration module and the application layer collaboration module. In this way, by executing the first and second target operations in parallel, the execution efficiency of the target collaborative operation can be improved, enabling rapid fault handling.

[0069] See also Figure 8 , Figure 8 This is a flowchart of another event handling method for an FTTR network provided in an embodiment of this application. The method is executed by a first gateway device, which is the primary gateway device. Figure 8 As shown, the method includes the following steps: Step 810: In response to receiving the target event reported by the link layer, obtain the first target operation that the network layer should perform in response to the target event, the second target operation that the application layer should perform in response to the target event, and the third target operation that the link layer should perform in response to the target event.

[0070] In this embodiment, the third target operation may be a switching operation. The explanation of the switching operation can be found above and will not be repeated here. After the link layer detects a target event, the third target operation may not be executed immediately; instead, the target event may be reported. After receiving the target event reported by the link layer, the link layer, network layer, and application layer will then coordinate to execute the corresponding target operations. In this embodiment, the target event may be a target fault. The fault scenarios for target faults can be found above and will not be elaborated here.

[0071] Step 820: Execute the target cooperative operation, which includes the first target operation, the second target operation, and the third target operation.

[0072] In this embodiment, the first gateway device is the primary gateway device before executing the target cooperative operation. The target cooperative operation includes operations performed on at least two target layers among multiple layers divided according to the OSI model. In this embodiment, the at least two target layers include the link layer, the network layer, and the application layer. Specifically, a first target operation corresponding to the network layer can be executed at the network layer, a second target operation corresponding to the application layer can be executed at the application layer, and a third target operation corresponding to the link layer can be executed at the link layer. The execution order of the first, second, and third target operations is not limited here; they can be executed in parallel or sequentially, which will not be elaborated further here.

[0073] In one embodiment, the first gateway device includes a global management module and multiple coordination modules. The multiple coordination modules include a link layer coordination module corresponding to the link layer, a network layer coordination module corresponding to the network layer, and an application layer coordination module corresponding to the application layer. The step of obtaining a first target operation to be performed by the network layer, a second target operation to be performed by the application layer, and a third target operation to be performed by the link layer in response to a target event reported by the link layer coordination module includes: obtaining the first target operation, the second target operation, and the third target operation through the global management module in response to a target event reported by the link layer coordination module. The step of executing the target coordination operation includes: after receiving the first target operation sent by the global management module through the network layer coordination module, executing the first target operation at the network layer through the network layer coordination module; after receiving the second target operation sent by the global management module through the application layer coordination module, executing the second target operation at the application layer through the application layer coordination module; and after receiving the third target operation sent by the global management module through the link layer coordination module, executing the third target operation at the link layer through the link layer coordination module.

[0074] In this embodiment, the target operations to be performed by each target layer are obtained uniformly, rather than a certain layer being executed first. This allows for unified coordination of the execution actions of each target layer, resulting in more reliable target collaborative operations.

[0075] For example, in one embodiment of this application, the first target operation, the second target operation, and the third target operation can be issued simultaneously. Step 820, executing the target coordination operation, includes: executing the target operations corresponding to each target layer in parallel at at least two target layers. For instance, the first target operation, the second target operation, and the third target operation are issued simultaneously by the global management module, and executed in parallel at the network layer, application layer, and link layer through the network layer coordination module, application layer coordination module, and link layer coordination module. In this way, by executing the first target operation, the second target operation, and the third target operation in parallel, the execution efficiency of the target coordination operation can be improved, enabling rapid fault handling.

[0076] Optionally, in one embodiment of this application, the first target operation and the second target operation are issued after the third target operation is completed at the link layer. Step 820, executing the target coordination operation, includes: after the third target operation at the link layer is completed, executing the first target operation and the second target operation respectively at the network layer and the application layer. The execution order of the first target operation and the second target operation is not limited here; the first target operation can be executed first and then the second target operation, or the second target operation can be executed first and then the first target operation, or both can be executed simultaneously. For example, the first target operation and the second target operation are issued by the global management module after the third target operation is completed by the link layer coordination module. This ensures that the target operations corresponding to the network layer and the application layer are executed only after the handover operation at the link layer is completed, thereby ensuring more reliable execution of the target coordination operation.

[0077] To facilitate understanding of the event handling process in the entire FTTR network, the following uses a typical complex fault scenario, "uplink port interruption of the primary gateway device," as an example to describe in detail the collaborative workflow provided by the embodiments of this application. The process is divided into three stages: the first stage is fault detection and global decision-making; the second stage is the execution process on the first gateway device side; and the third stage is the execution process on the second gateway device side. Before handling the fault event, the first gateway device is the primary gateway device, and the second gateway device is the backup gateway device.

[0078] First, let's introduce the first phase (fault detection and global decision-making). Fault detection: The link layer coordination module of the first gateway device detects an uplink port DOWN (Link Down event) and immediately reports it to the local global management module. Global decision-making: The global management module of the first gateway device queries the "layered trigger matrix," determines the trigger condition "uplink port DOWN," and decides to execute device-level primary / standby switchover. Then, the global management module sends a "Type B protection switchover" command to the link layer coordination module, and subsequently sends a "primary switch to standby" command to the network layer coordination module and the application layer coordination module.

[0079] The second phase (execution process on the first gateway device side) is described below. Link layer actions (forced switchover): Upon receiving the instruction from the global management module, immediately switch all downstream PON ports (Type B) to the backup gateway device via the PON driver. After completion, report the "optical path switchover complete" status to the global management module. Network layer actions (route silence): Upon receiving the "primary switchover to backup" instruction from the global management module, immediately stop sending all dynamic routing protocol (e.g., BGP) packets and actively withdraw gateway routes advertised to the upper-layer network (or lower their priority to the lowest level), ensuring that upper-layer network devices no longer forward traffic to this faulty node. Dynamic routing protocols include Open Shortest Path First (OSPF) or Border Gateway Protocol (BGP). Application layer actions (service suspension): Upon receiving the "primary switchover to backup" instruction from the global management module, stop external response interfaces such as the DHCP Server and Portal authentication service, and cease processing new service requests.

[0080] Finally, the third stage (execution process on the second gateway device side) is introduced. Link layer actions (perform protection switching): Receives the Type B switching command from the first gateway device and executes the Type B protection switching action (opens all downstream PON ports). Alternatively, it can execute the protection switching action based on its own Type B protection switching logic (each PON port detects LOS). After detecting the recovery of the downstream PON port optical signal and confirming the physical link is "UP", it sends a "PON port link ready" signal to the local global management module. Global decision (status confirmation): The local global management module receives the PON port status at the link layer, determines that the local device needs to switch to the primary state, and sequentially sends the "standby switch to primary" command to the network layer coordination module and the application layer coordination module. Network layer actions (switching and route announcement): Receives the "standby switch to primary" command from the global management module and executes the switching action: After receiving the command, it dismantles all established service pass-through channels and simultaneously executes route announcement: The routing protocol (e.g., OSPF) immediately broadcasts the gateway route to the upper-layer network through the intact uplink port of the standby device. Application layer action (service activation): Upon receiving the "standby switch to primary" command from the global management module, and based on the previously completed real-time primary / standby data synchronization, triggers the primary / standby switchover for services such as DHCP server, Portal authentication, MESH controller, and secondary gateway management. After the second gateway device becomes the primary gateway device from the standby gateway device, its application layer module will enable local services and establish local dynamic data (such as IP address leases, MESH control information, etc.) to achieve seamless takeover.

[0081] Additionally, you can refer to Figure 9 Let's understand the end-to-end collaborative protection timeline under an "uplink DOWN" fault. Figure 9 This is a schematic diagram of the interactive flow of a fault handling process provided in an embodiment of this application. For example... Figure 9 As shown, after detecting an uplink port DOWN (Link Down event), the global management module of the primary gateway device (hereinafter referred to as the primary global management module) can query the hierarchical trigger matrix and notify the link layer of the primary gateway device (hereinafter referred to as the primary link layer) to force a Type B switchover. After the primary link layer performs the PON port switchover, it can notify the link layer of the backup gateway device (hereinafter referred to as the backup link layer) to perform a Type B switchover. After the backup link layer performs the PON port switchover, it can return the PON port link status to the global management module of the backup gateway device (hereinafter referred to as the backup global management module). After detecting that all PON ports are active, the backup global management module decides to switch its working state to primary.

[0082] The Global Management Module - Primary can issue commands to the network layer of the primary gateway device (hereinafter referred to as the Network Layer Primary), causing the Network Layer Primary to switch from primary to standby. The Global Management Module - Backup can issue commands to the network layer of the backup gateway device (hereinafter referred to as the Network Layer Backup), causing the Network Layer Backup to switch from standby to primary, dismantling the transparent channel, and activating VLAN interfaces and OSPF route advertisements. The Global Management Module - Primary can issue commands to the application layer of the primary gateway device (hereinafter referred to as the Application Layer Primary), causing the Application Layer Primary to switch from primary to standby, triggering service failover. The Global Management Module - Backup can issue commands to the application layer of the backup gateway device (hereinafter referred to as the Application Layer Backup), causing the Application Layer Backup to switch from standby to primary, and rebuilding dynamic data using local application services. After completing the link layer, network layer, and application layer switches, network services are restored, service paths are rebuilt, and seamless switching is achieved for users.

[0083] It should be noted that when the global management module of the primary gateway device needs to switch between primary and backup states, in addition to indirectly triggering the decision of the global management module on the backup gateway device through the change of PON port status via Type B protection switching as described above, the global management module on the backup gateway device can also be notified directly through the heartbeat link to switch between primary and backup states.

[0084] Furthermore, the core of the event handling method for FTTR networks provided in this application lies in constructing a multi-layered collaborative protection framework centered on "state". Key technical features include the introduction of a hierarchical trigger matrix (containing preset mapping relationships) and a global management module. Through these two core components, the originally independent link layer, network layer, and application layer protection mechanisms can be organically integrated into a complete system capable of intelligent response and collaborative operation.

[0085] Specifically, this application embodiment creates a clear rule base (layered trigger matrix) that defines the actions and sequence of responses that each layer should take in response to the protection mechanism under various fault events (e.g., downlink PON port downlink, uplink port downlink, device restart, or power failure). Simultaneously, a global management module oversees the entire system, ensuring that the state transitions and behaviors of each layer conform to the overall protection strategy. This architecture enables the system to automatically trigger the most suitable end-to-end protection process based on the fault type and scope, achieving a leap from "passive response" to "intelligent healing."

[0086] It is important to note that the embodiments of this application are not simply patching up traditional protection mechanisms, but rather creating a new "system-level" solution. By integrating discrete protection mechanisms through a centralized, layered trigger matrix and a global management module, this architecture solves the problem of "protection silos," specifically bringing the following beneficial effects: First, improved system availability: Through collaborative linkage, the service recovery time under complex faults is optimized from minutes in traditional solutions to sub-seconds, achieving high availability. Second, automated and simplified operation and maintenance: Administrators only need to focus on top-level protection policies (such as selecting gateway modes), eliminating the need for tedious configuration of parameters at each layer. The fault recovery process is fully automated, reducing reliance on human labor and the risk of operational errors. Third, enhanced system reliability: It provides a systematic solution to cope with various single-point and even complex faults, improving the resilience and reliability indicators of network devices, such as Mean Time To Repair (MTTR). Furthermore, the embodiments of this application provide a full-stack, intelligent collaborative protection system architecture and method from the physical link layer, network layer to the application layer (including DHCP service, Portal authentication service, and Mesh control service). The event handling method for FTTR networks provided in this application can be used not only for FTTR networks, but also for optical line terminals (OLTs) and other network devices that support PON access to form a primary / backup redundancy protection network.

[0087] For reference Figure 10 , Figure 10 This is a structural block diagram of an event processing device for an FTTR network provided in an embodiment of this application. Figure 10 As shown, the event processing device 1000 for the FTTR network provided in this application embodiment includes: an acquisition module 1010 and an execution module 1020.

[0088] The acquisition module 1010 is used to acquire a target cooperative operation matching the target event in response to the occurrence of a target event in the FTTR network. The target cooperative operation is determined based on a preset mapping relationship, which includes a mapping relationship between a preset event and a cooperative operation. The cooperative operation includes operations performed on at least two target layers among multiple layers divided according to the OSI model. The preset event includes the target event, and the cooperative operation includes the target cooperative operation. The execution module 1020 is used to execute the target collaborative operation, which is used to restore the target service, including the service interrupted due to the target event.

[0089] In this embodiment, in response to a target event occurring in the FTTR network, a target cooperative operation matching the target event is obtained. The target cooperative operation is determined based on a preset mapping relationship, which includes a mapping relationship between preset events and cooperative operations. The cooperative operation includes operations performed on at least two target layers among multiple layers divided according to the OSI model. The preset event includes the target event, and the cooperative operation includes the target cooperative operation. The target cooperative operation is executed to restore target services, including services interrupted by the target event. Thus, when a target event occurs in the FTTR network, a target cooperative operation matching the target event can be determined based on the preset mapping relationship. Compared to the protection mechanisms in related technologies that use independently designed layers, this embodiment can execute cooperative operations of at least two layers to restore services interrupted by the target event. This eliminates the need for each layer to perceive and respond in isolation, reducing the time spent waiting for each layer to perceive and respond, thereby reducing the time the device spends processing the target event and solving the problem of long event processing times in related technologies.

[0090] The event processing device for the FTTR network provided in this application embodiment can implement the various processes implemented in the above method embodiments. To avoid repetition, it will not be described again here.

[0091] like Figure 11As shown, this application embodiment also provides an electronic device 1100, which can be an adapter or various types of computers, etc. The electronic device 1100 includes a processor 1110 and a memory 1120. The memory 1120 stores programs or instructions, which, when executed by the processor 1110, implement the steps of any of the methods described above. For example, when the program is executed by the processor 1110, it implements the following process: in response to a target event occurring in the FTTR network, a target cooperative operation matching the target event is obtained. The target cooperative operation is determined based on a preset mapping relationship, which includes a mapping relationship between a preset event and a cooperative operation; the cooperative operation includes operations performed on at least two target layers among multiple layers divided according to Open Systems Interconnection, the preset event includes the target event, and the cooperative operation includes the target cooperative operation; the target cooperative operation is executed to restore a target service, which includes services interrupted due to the target event. Thus, when a target event occurs in the FTTR network, a target collaborative operation matching the target event can be determined according to a preset mapping relationship. Compared with the protection mechanism that uses independent design of each layer in related technologies, the embodiment of this application can execute the collaborative operation of at least two layers, thereby restoring the service interrupted by the target event. This eliminates the need for each layer to perceive and respond in isolation, reducing the time spent waiting for each layer to perceive and respond, thereby reducing the time for the device to process the target event and solving the problem of long event processing time in related technologies.

[0092] This application also provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of various embodiments of the event handling method for an FTTR network and achieve the same technical effect. To avoid repetition, these steps will not be repeated here.

[0093] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0094] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0095] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.

[0096] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0097] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0098] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for event processing of an FTTR network, characterized in that, Redundancy protection for a master gateway device connected to multiple slave gateways via optical fiber; the method is executed by a first gateway device and includes: In response to a target event occurring in the Fiber to the Room (FTTR) network, a target cooperative operation matching the target event is acquired. The target cooperative operation is determined based on a preset mapping relationship, which includes a mapping relationship between preset events and cooperative operations. The cooperative operation includes operations performed on at least two target layers among multiple layers divided according to Open Systems Interconnection (OSI). The preset event includes the target event, and the cooperative operation includes the target cooperative operation. The target event is used to indicate a change in the operational status of a second gateway device. Both the first gateway device and the second gateway device are the primary gateway device. The target collaborative operation is executed to restore the target service, which includes services interrupted due to the target event; the target collaborative operation is also used to switch the operating state of the first gateway device. After performing the target collaborative operation, the working state of the first gateway device switches from a first state to a second state; the first state is one of a primary state and a standby state, and the second state is the other of a primary state and a standby state; The at least two target layers include a first target layer and a second target layer. The first target layer is one of the link layer, network layer, and application layer, and the second target layer is another of the link layer, network layer, and application layer.

2. The method according to claim 1, characterized in that, The preset events include fault events and working status conditions, and the preset mapping relationship includes a first mapping relationship and a second mapping relationship; the first mapping relationship includes the mapping relationship between the fault events and the working status conditions of the first gateway device, and the second mapping relationship includes the mapping relationship between the working status conditions of the first gateway device and the collaborative operation.

3. The method according to claim 1, characterized in that, The first gateway device includes a global management module and multiple collaboration modules. The preset mapping relationship is stored in the global management module, and each collaboration module corresponds to a target layer. The acquisition of the target collaborative operation matching the target event includes: The global management module determines the target collaborative operation that matches the target event from the preset mapping relationship. The target collaborative operation includes the target operation corresponding to each collaborative module. The target operation corresponding to the collaborative module is the operation that the target layer of the collaborative module should perform in response to the target event. The global management module sends the target operation corresponding to the collaboration module to each collaboration module; and each collaboration module receives the target operation corresponding to the collaboration module.

4. The method according to claim 2, characterized in that, The first gateway device includes a global management module and multiple collaboration modules. The first mapping relationship is stored in the global management module, and the second mapping relationship is stored in each of the collaboration modules. Each collaboration module corresponds to a target layer. The target collaboration operation includes the target operation that each target layer should perform in response to the target event. The acquisition of the target collaborative operation matching the target event includes: The global management module determines the target working state that matches the target event from the first mapping relationship, and sends the target working state to each of the collaborative modules through the global management module. The collaboration module determines the target operation that matches the target working state from the second mapping relationship based on the received target working state. The target operation matched by each collaboration module is the target operation that the target layer corresponding to the collaboration module should execute.

5. The method according to claim 3 or 4, characterized in that, The execution of the target collaborative operation includes: through each of the collaborative modules, executing the target operation that the target layer should perform at the target layer corresponding to the collaborative module.

6. The method according to claim 1, characterized in that, The plurality of layers include a link layer, a network layer, and an application layer; the at least two target layers include the network layer and the application layer; the target cooperative operation includes a first target operation that the network layer should perform in response to the target event and a second target operation that the application layer should perform in response to the target event; The acquisition of the target collaborative operation matching the target event includes: In response to receiving the handover event reported by the link layer, the first target operation and the second target operation are obtained; The switching event is reported by the link layer after performing a switching operation in response to the target event.

7. The method according to claim 1, characterized in that, The first gateway device is the primary gateway device; the at least two target layers include the link layer, the network layer, and the application layer; the target coordination operation includes a first target operation that the network layer should perform in response to the target event, a second target operation that the application layer should perform in response to the target event, and a third target operation that the link layer should perform in response to the target event; The acquisition of the target collaborative operation matching the target event includes: In response to receiving the target event reported by the link layer, the first target operation, the second target operation, and the third target operation are obtained.

8. The method according to claim 6 or 7, characterized in that, The first target operation and the second target operation are issued simultaneously; the execution of the target collaborative operation includes: The target operations corresponding to each of the at least two target layers are executed in parallel.

9. The method according to claim 7, characterized in that, The first target operation and the second target operation are sent out after the third target operation is completed at the link layer; The execution of the target cooperative operation includes: After the third target operation at the link layer is completed, the first target operation and the second target operation are executed at the network layer and the application layer, respectively.

10. The method according to claim 1, characterized in that, The first gateway device is a backup gateway device, and the target event is used to indicate a change in the operating status of the primary gateway device.

11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that, when executed by the processor, implement the method as described in any one of claims 1 to 10.

12. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 10.

13. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 10.