Network fault recovery method and device and readable storage medium
By carrying the detection results of the fault detection protocol and the tag value of the recovery strategy in the link management message, the problem of low fault recovery efficiency in the prior art is solved, and efficient fault recovery between devices is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-10
AI Technical Summary
In existing technologies, network fault detection and recovery protocols interact independently between devices, resulting in low fault recovery efficiency. The lack of a unified fault information transmission and coordination mechanism leads to lengthy fault location and decision-making processes, making it difficult to improve overall recovery efficiency.
By adding a flag value to the flag field of the link management message, the detection results of multiple fault detection protocols and various fault recovery strategies are carried, realizing unified management and transmission of fault recovery strategies among devices, thereby improving fault recovery efficiency.
It enables efficient transmission of fault detection protocol detection results and recovery strategies between different devices in the communication link, improving the efficiency of network fault recovery and reducing the lengthy fault location and decision-making process.
Smart Images

Figure CN121841944A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a network fault recovery method, device and readable storage medium. BACKGROUND
[0002] Network communication technology widely supports data centers, enterprise operations, industrial control and smart home fields, and provides an indispensable basic connection for the efficient operation of society, and profoundly changes people's way of life and work. However, the physical link of network communication is easily affected by factors such as cable damage, interface aging and environmental interference, which may cause network performance degradation or interruption. Therefore, it is necessary to detect network faults and implement recovery strategies according to the detection results to ensure network smoothness.
[0003] In the related art, fault detection is performed according to multiple fault detection protocols, and fault recovery is performed by executing the fault recovery protocol corresponding to each fault detection protocol. Since the fault detection protocol and the fault recovery protocol interact separately between devices, the efficiency of fault recovery is low. SUMMARY
[0004] The embodiments of the present application provide a network fault recovery method, device and readable storage medium, which can transmit the detection results of multiple fault detection protocols and multiple fault recovery strategies between different devices of a network communication link through a universal link management packet, thereby improving the efficiency of fault recovery.
[0005] The technical scheme of the embodiments of the present application is as follows: The embodiments of the present application provide a network fault recovery method, the method comprising: receiving a first packet sent by a first device in a communication link, wherein the first packet is obtained by adding a first mark value to at least one first bit position in a link management packet of the first device according to the detection result of at least one fault detection protocol, the first bit position is a reserved bit position of a flag field in the link management packet, and the first bit position corresponds to the fault detection protocol one by one; receiving a second packet sent by the first device, wherein the second packet carries at least one common fault recovery strategy, the at least one common fault recovery strategy is determined by the first device from a plurality of fault recovery strategies carried by a pre-set fault recovery protocol, and the common fault recovery strategy is the fault recovery strategy deployed by the devices in the communication link; According to the first message, a target fault recovery strategy is determined from at least one of the common fault recovery strategies carried by the second message, a third message carrying the target fault recovery strategy is generated, and devices in the communication link are caused to execute the fault recovery strategy, wherein the target fault recovery strategy is used to recover the network fault of the communication link indicated by the detection result.
[0006] Embodiments of the present application provide another network fault recovery method, which comprises: According to a detection result of at least one fault detection protocol deployed by a first device in a network communication link, a first mark value is added to at least one first bit position in a link management message of the first device, and a first message is obtained; The first message is sent to a second device, wherein the second device is a device different from the first device in the communication link, the first bit position is a reserved bit position of a flag field in the link management message, the first bit position corresponds to the fault detection protocol one by one, and the first message is used to instruct the second device to determine a target fault recovery strategy from common fault recovery strategies; At least one common fault recovery strategy is determined, which is deployed by devices in the communication link, and a second message is generated based on at least one of the common fault recovery strategies; The second message is sent to the second device, wherein the second message is used to cause the second device to determine a target fault recovery strategy based on the first message and generate a third message based on the target fault recovery strategy, the target fault recovery strategy is determined from at least one of the common fault recovery strategies carried by the second message, and the third message is used to cause devices in the communication link to execute the fault recovery strategy.
[0007] Embodiments of the present application provide a network fault recovery device, which comprises: A first detection module is configured to receive a first message sent by a first device in a communication link, wherein the first message is obtained by adding a first mark value to at least one first bit position in a link management message of the first device according to a detection result of at least one fault detection protocol, the first bit position is a reserved bit position of a flag field in the link management message, and the first bit position corresponds to the fault detection protocol one by one. A first management module is configured to receive a second message sent by the first device, wherein the second message carries at least one common fault recovery strategy, the at least one common fault recovery strategy is determined by the first device from a plurality of fault recovery strategies carried by a pre-set fault recovery protocol, and the common fault recovery strategy is the fault recovery strategy deployed by devices in the communication link. The recovery module determines a target fault recovery strategy from at least one common fault recovery strategy carried in the second message based on the first message, and generates a third message carrying the target fault recovery strategy to enable the device in the communication link to execute the fault recovery strategy, wherein the target fault recovery strategy is used to recover the network fault of the communication link indicated by the detection result.
[0008] This application provides another network fault recovery device, including: The second detection module is used to add a first flag value to at least one first bit position in the link management message of the first device according to the detection result of at least one fault detection protocol deployed by the first device in the network communication link, so as to obtain the first message; The first transmission module is used to send the first message to the second device, wherein the second device is a device in the communication link that is different from the first device, the first bit position is a reserved bit position of the flag field in the link management message, the first bit position corresponds one-to-one with the fault detection protocol, and the first message is used to instruct the second device to determine the target fault recovery strategy from the common fault recovery strategy; The second management module is used to determine at least one common fault recovery strategy deployed by all devices in the communication link, and to generate a second message based on at least one of the common fault recovery strategies. The second transmission module sends the second message to the second device, wherein the second message is used to enable the second device to determine a target fault recovery strategy based on the first message and generate a third message based on the target fault recovery strategy, wherein the target fault recovery strategy is determined from at least one of the common fault recovery strategies carried in the second message, and the third message is used to enable the device in the communication link to execute the fault recovery strategy.
[0009] This application provides an electronic device, the electronic device comprising: Memory is used to store executable instructions or computer programs. When a processor executes computer-executable instructions or computer programs stored in the memory, it implements the network fault recovery method provided in the embodiments of this application.
[0010] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions, which, when executed by a processor, implements the network fault recovery method provided in this application.
[0011] The embodiments of this application have the following beneficial effects: By adding a first mark value in the first bit position of the flag field of the link management packet of the device, the link management packet can carry the information of the detection result of the fault detection protocol, and since the link management packet has multiple first bit positions, the detection result of multiple fault detection protocols can be carried in the link management packet by adding the first mark value in the first bit position, so that the detection result of multiple detection protocols can be transmitted by transmitting the communication link management packet between the devices in the communication link. In addition, by carrying multiple fault recovery strategies in the first bit position of the flag field, the transmission of multiple fault recovery strategies between devices is realized, and different fault recovery strategies of different devices are uniformly managed by the link management packet, thereby improving the efficiency of network fault recovery. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 is a structural schematic diagram of a network fault recovery system architecture provided by an embodiment of the present application; Figure 2 is a first structural schematic diagram of a network fault recovery apparatus provided by an embodiment of the present application; Figure 3 is a second structural schematic diagram of a network fault recovery apparatus provided by an embodiment of the present application; Figure 4 is a first flowchart of a network fault recovery method provided by an embodiment of the present application; Figure 5 is a structural schematic diagram of a link management packet provided by an embodiment of the present application; Figure 6 is a second flowchart of a network fault recovery method provided by an embodiment of the present application; Figure 7 is a third flowchart of a network fault recovery method provided by an embodiment of the present application; Figure 8 is a fourth flowchart of a network fault recovery method provided by an embodiment of the present application; Figure 9 is a fifth flowchart of a network fault recovery method provided by an embodiment of the present application; Figure 10 is a flowchart of a fault recovery method in an actual application scenario provided by an embodiment of the present application; Figure 11 is a block diagram of a fault management system provided by an embodiment of the present application.
[0013] It should be noted that the above-mentioned "first" and "second" are only used to distinguish different schemes, and do not represent the degree of superiority or priority in the implementation process. DETAILED DESCRIPTION
[0014] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as limitations to the present application. All other embodiments obtained by those of ordinary skill in the art without creative effort fall within the scope of the present application.
[0015] In the following description, "some embodiments" are referred to, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0016] In the following description, the terms "first\second\third" are only used to distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0017] Before the embodiments of the present application are further described in detail, the terms and phrases involved in the embodiments of the present application are explained, and the terms and phrases involved in the embodiments of the present application are applicable to the following explanations.
[0018] 1) Link Management Protocol Messages, a kind of general control messages in the data link layer of a communication network such as Ethernet, such as messages based on the IEEE 802.3ah standard of Ethernet. 2) Flag field, one or a group of bit positions in the Link Management Protocol message for indicating the basic state, type or urgent attribute of the message. 3) Content field, an area in the Link Management Protocol message carrying specific management instructions or information types, including multiple bit positions. 4) Fault detection protocol, a standardized network communication protocol, the core function of which is to automatically trigger alarms and state updates according to preset fault judgment conditions (such as link interruption, performance degradation). As an example, common fault detection protocols include Ethernet Last Mile Operation Administration and Maintenance (OAM-EFM), Ethernet Connectivity Fault Management (OAM-CFM), Bidirectional Forwarding Detection (BFD) and Network Quality Analysis (NQA). 5) Fault recovery protocol is a standardized network communication protocol that works in conjunction with the fault detection protocol. When the system receives a warning signal from the fault detection protocol, the recovery strategy preset in the fault recovery protocol can be automatically triggered. Common fault recovery protocols include Virtual Router Redundancy Protocol (VRRP), Multi-Protocol Label Switching Traffic Engineering Fast Re-Route (MPLS TE FRR), Ethernet Automatic Protection Switching (EAPS), Rapid Spanning Tree Protocol (RSTP) and its evolution Multi-Spanning Tree Protocol (MSTP), which recover network connectivity by recalculating and activating loop-free backup tree paths.
[0019] In related technologies, communication network fault recovery is usually implemented through the linkage of multiple protocols in layers and domains. For example, in a service path spanning access and core networks, fault detection may rely on both OAM-EFM and general BFD protocols at the link layer for monitoring; once a fault is detected, recovery actions are executed by specific protocols such as VRRP (implementing gateway switching), MPLS FRR (implementing local re-routing) or fast convergence of routing protocols, forming a chain of "detection-announcement-recovery". However, the above-mentioned communication network fault recovery method has inherent deficiencies: different protocols (such as OAM, BFD) usually run independently and interact separately, lacking a unified fault information transmission and coordination mechanism in complex heterogeneous links. For the same link fault, multiple detection protocols repeatedly send probe and alarm messages, occupying additional bandwidth resources, and the fault localization and decision-making process may be lengthy due to information isolation or conflict, making it difficult to further improve the overall recovery efficiency.
[0020] The embodiment of the present application provides a network fault recovery method, device and readable storage medium, which can transmit detection results of multiple fault detection protocols and multiple fault recovery strategies between different devices of a network communication link through a general link management packet, thereby improving the efficiency of fault recovery. The following describes an exemplary application of the network fault recovery device provided by the embodiment of the present application. Referring to Figure 1 , Figure 1 is an architecture schematic diagram of the network fault recovery system 100 provided by the embodiment of the present application. The network fault system 100 of the embodiment of the present application at least includes a first device 300, a second device 400 and a fourth device 600. In some embodiments, the network fault system 100 can further include a third device 500. The second device 400 can be a server of a network fault recovery application. The second device 400 can constitute the network fault recovery device of the embodiment of the present application, that is, the network fault recovery method of the embodiment of the present application is implemented through the second device 400. The first device 300 and the fourth device 600 are connected to the second device 400 through a network 200. In addition, the first device 300 and the fourth device 600 have a communication connection. The third device 500 is in standby standby state and does not access the network communication link. The network 200 can be a wide area network or a local area network, or a combination of the two.
[0021] Referring to Figure 1 The network fault recovery method of the embodiment of the present application can be executed by the second device 400, that is, a management device in the communication link. Alternatively, a client of the network fault recovery application can be set in the first device 300, and the network fault recovery method of the embodiment of the present application is implemented in the first device 300.
[0022] Referring to Figure 2 , Figure 2 is a structure schematic diagram of the second device 400 provided by the embodiment of the present application, Figure 2 The second device 400 shown in FIG. 4 includes at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together through a bus system 440. It can be understood that the bus system 440 is used to realize the connection communication between the components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the purpose of clear illustration, only the data bus is shown in Figure 2Various buses are labeled as a bus system 440. The processor 410 can be an integrated circuit chip with signal processing capability, such as a general purpose processor, a digital signal processor (DSP), etc. The user interface 430 includes one or more output devices 431 that enable presentation of media content. The user interface 430 also includes one or more input devices 432. The storage 450 can be a solid state memory, a hard disk drive, an optical disk drive, etc. The operating system 451 includes system programs for handling various basic system services and performing hardware dependent tasks. The network communication module 452 is for reaching other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, wireless fidelity (WiFi), universal serial bus (USB), etc.; the presentation module 453 is for reaching via one or more output devices 431 associated with the user interface 430 (e.g., a display screen, a speaker, etc.); the input processing module 454 is for detecting and interpreting one or more user inputs or interactions from one or more input devices 432.
[0023] In some embodiments, the apparatus provided by the embodiments of the present application can be implemented in software, Figure 2 The network fault recovery apparatus 455 stored in the storage 450 of the second device 400 is shown, which can be software in the form of programs and plug-ins, etc., including the following software modules: a first detection module 4551, a first management module 4552 and a recovery module 4553, which are logical, and thus can be combined or further split according to the functions implemented. The functions of the various modules will be described below.
[0024] In some embodiments, the apparatus provided by the embodiments of the present application can be implemented in another software manner, Figure 3The structure of the first device 300 is shown, which is the same as the structure of the second device 400, including at least one processor 310, a memory 350, at least one network interface 320 and a user interface 330. The various components in the first device 300 are coupled together through a bus system 340. It can be understood that the first device 300 includes the bus system 340, a network communication module 352, a presentation module 353, an input processing module 354, a user interface 330, the user interface 330 including one or more output devices 331, and one or more input devices 332. It is also shown that the network failure recovery device 355 stored in the memory 350 of the first device 300, which can be software in the form of programs and plug-ins, including the following software modules: a second detection module 3554, a first transfer module 3555, a second management module 3556 and a second transfer module 3557, which are logical, so any combination or further splitting can be made according to the implemented functions. The functions of the various modules will be described below.
[0025] Referring to Figure 4 , Figure 4 is the first flowchart of the network failure recovery method provided by the embodiments of the present application, which will be described in combination with the steps shown in Figure 4 , as shown in Figure 4 , taking the first device and the server (second device) as an example for the execution subject of the network failure recovery method, wherein the second device is a management device in the communication link, and the third device is a device communicating with the first device, the method comprising the following steps 101 to 105.
[0026] In step 101, the first device adds a first mark value to at least one first bit position in the link management packet of the first device according to the detection result of at least one failure detection protocol deployed by the first device, to obtain a first packet.
[0027] Here, in the communication network, different device nodes along the way often deploy heterogeneous failure detection protocols according to their positions and functions: the failure detection protocol deployed on the network node will detect the communication link in real time, and once it determines that a failure occurs, it will immediately generate a clear failure signal. The failure signal is then automatically transferred to the preconfigured failure recovery protocol to trigger the execution of the preset switching or rerouting logic. When detecting the communication link in real time, the cause of the failure needs to be investigated through the linkage of multiple failure detection protocols, which is referred to as linkage one for convenience of description. When the cause of the failure is determined, multiple failure recovery protocols need to be linked to gradually recover the network communication, which is referred to as linkage two.
[0028] Here, the communication link management message is a type of control message commonly used at the network data link layer. The working logic and standard protocols of this message have been built into various heterogeneous network devices. As an example, the communication link management message in the OAM-EFM-PDU message format is as follows: Figure 5 As shown. See also Figure 5 The communication link management message includes: Destination Address, Source Address, Length / Type, Subtype, Code, Data / Pad, Frame Check Sequence (FCS), and Flags. It should be noted that the Flags field is a 2-byte control field, and its most critical bit 0 (LSB) is the PDU Active bit. Setting it to 1 indicates that the sender is in active mode (can initiate full-function OAM operation), and setting it to 0 indicates that it is in passive mode (can only respond).
[0029] See Figure 6 , Figure 6 The first device in step 101 adds a first tag value to at least one first bit position in the link management message of the first device according to the detection result of at least one fault detection protocol deployed by the first device in the network communication link, and obtains a first message, which can be achieved through the following steps 1011 to 1012.
[0030] In step 1011, a third correspondence is determined between each first bit position in the link management message of the first device and the fault detection protocol.
[0031] In this embodiment, the flag field protocol specification of the link management message contains 2 bytes for identifying the status value. Typically, the lower 7 bits of the flag field are occupied, and the upper 9 bits are reserved. The first bit position in this application is selected from the upper 9 bits of the flag field. As an example, to distinguish between the first message carrying the detection result of the fault detection protocol and the message carrying the fault recovery strategy, a message identifier can be added to the upper 9 bits. For example, a 00 (0x0) identifier value can be added to the 7:8 bits (second bit position) of the link management message to indicate that the message is a link-one message, and a first flag value can be added to the 9:15 bits (first bit position). For example, if the fault detection protocol deployed by the first device is the OAM-EFM protocol and the general BFD protocol, a third correspondence can be established between the OAM-EFM protocol and the 9th bit position, and a third correspondence can be established between the BFD protocol and the 10th bit position.
[0032] In step 1012, a first bit position for adding the first mark value is determined, the first mark value is added in the first bit position for adding the first mark value, and a first message is obtained.
[0033] The first bit position for adding the first mark value and the fault detection protocol indicated by the detection result exist a third correspondence relationship.
[0034] As an example, when the detection result of the OAM-EFM protocol indicates that there is a network fault, a mark value 1 is added in the bit position (9th bit position) which has the third correspondence relationship with the OAM-EFM protocol to obtain the first message. When the other devices of the communication link receive the first message, it can be determined that the OAM-EFM protocol of the first device detects the network fault. In addition, in this way, the detection results of multiple fault detection protocols of the first device can be transmitted through one first message.
[0035] Due to the universal characteristics of the link management message in heterogeneous devices, the embodiments of the present application realize the linkage of different fault detection protocols of different devices in the communication link, and improve the efficiency of communication fault recovery.
[0036] In step 102, the second device receives the first message sent by the first device in the communication link.
[0037] Here, the second device can determine the detection result of the fault detection protocol deployed by the first device by receiving the first message sent by the first device, that is, the position and reason of the communication fault are determined, so as to select a fault recovery strategy. In addition, the second device can collect the communication quality of each device in the communication link by receiving the first message of the first device, and then visually display the detailed link quality information of the current overall link. Combined with the network state, the main performance bottleneck of the current link is analyzed, which can be used to select the link configuration scheme in the future, and reduce the occurrence of link fault problems.
[0038] In step 103, the first device determines at least one common fault recovery strategy deployed by the devices in the communication link, and generates a second message based on the at least one common fault recovery strategy.
[0039] Here, the fault recovery protocol is a protocol including specific technical standards and execution mechanisms for implementing network self-healing. The fault recovery protocol usually carries a fault recovery strategy, which is used to guide how these protocols are deployed and coordinated. In the embodiments of the present application, at least one common fault recovery strategy is determined for the devices deployed in the communication link, and the process of linkage until the completion of fault recovery via the multi-fault recovery protocol is called linkage two. Linkage two includes three stages, stage 1 is to determine the common fault recovery strategy of the devices on the communication link, stage 2 is to determine the fault recovery strategy to be adopted from the common fault recovery strategy, and stage 3 is to determine the details of the fault recovery strategy.
[0040] It should be noted that the network fault recovery strategies supported by different devices on a communication link can be different. For example, the fault recovery strategy of an access device (such as a home optical modem) as the starting / ending point of the link usually focuses on simple port switching or restart, and the core goal is to quickly recover the connection of a single user; while the backbone router at the core position of the link must deploy complex strategies such as millisecond-level fast reroute (FRR) to ensure the uninterrupted of massive key services at the link or network level. It should be noted that since network communication is essentially a distributed system in which both devices in the communication link cooperate, the fault recovery process involves the synchronous conversion of the states of both communication parties (such as master / standby, active / inactive conversion), and a fault recovery strategy common to multiple devices needs to be used for recovery. The common fault recovery strategy is not a strategy that all devices participating in communication need to deploy, but a fault recovery strategy that needs to be deployed by the devices participating in fault recovery (including the local device and the peer device that have failed).
[0041] In the embodiments of the present application, referring to Figure 7 , Figure 7 The common fault recovery strategy in step 103 is shown, which can be obtained through steps 1031 to 1035.
[0042] In step 1031, according to the fault recovery protocol deployed by the first device, the fault recovery strategy supported by the first device is determined.
[0043] In the embodiments of the present application, the first device can send a query request to the second device in advance, and the second device sends the fault recovery protocol deployed by the first device, which is stored in the second device in advance, to the first device after receiving the query request.
[0044] In step 1032, for each fault recovery strategy, a first correspondence between each fault recovery strategy and a first bit position is determined.
[0045] It should be noted that, in order to ensure that the fault recovery protocol common to the plurality of devices can be determined by the messages of different devices in the communication link, all devices in the communication link adopt the same first correspondence relationship, and the first bit position in the link management message is marked with the first corresponding relationship of the fault recovery strategy.
[0046] In step 1033, a sixth marking value is added to the first bit position in the link management message of the first device to obtain a fourth message.
[0047] The first bit position for adding the sixth marking value is the first bit position having the first corresponding relationship with the fault recovery strategy supported by the first device.
[0048] As an example, taking the first device and the fourth device as core routers backing up each other as an example, for the sake of simplicity, the first device will be referred to as router A and the fourth device will be referred to as router B in the following description. The router A is a primary gateway and deploys a local interface backup strategy, a BFD strategy and an OSPF strategy, and the router B only deploys the BFD strategy and the OSPF strategy. That is, in the link management message of the first device, the first bit position having the first corresponding relationship with the local interface backup strategy (bit position 11), the BDF strategy (bit position 12) and the OSPF strategy (bit position 13) is added with a marking value 1 to obtain the fourth message.
[0049] In step 1034, the fourth device generates a fifth message and sends the fifth message to the first device.
[0050] The fifth message is obtained by adding a seventh marking value to the first bit position in the management message of the fourth device, the first bit position for adding the seventh marking value has the first corresponding relationship with the fault recovery strategy supported by the fourth device, the fourth device is a device different from the first device and the second device in the network communication link, and the fault recovery strategy supported by the fourth device is determined based on the fault recovery protocol deployed by the fourth device.
[0051] Continuing the above example, in the link management message of the fourth device, the first bit position having the first corresponding relationship with the BDF strategy (bit position 12) and the OSPF strategy (bit position 13) is added with a marking value 1 to obtain the fourth message.
[0052] It should be noted that, in order to distinguish the fourth message and the fifth message from other messages of the embodiments of the present application, a 01 (0x1) marking value can be added to the second bit position (7:8 position) in the fourth message and the fifth message.
[0053] In step 1035, the fault recovery strategy carried in the fourth message and the fifth message is determined as a common fault recovery strategy.
[0054] Here, by comparing the duplicated first bit positions in the two messages, we can find that both messages contain a fault recovery strategy corresponding to the first bit position of the marked value, indicating a shared fault recovery strategy. Continuing the example above, comparing the fourth and fifth messages reveals that bit positions 12 (corresponding to the BFD strategy) and 13 (corresponding to the OSPF strategy) are shared fault recovery strategies between the two routers. When a direct link between the two routers fails, the shared BFD+OSPF strategy must be relied upon: BFD detects the fault in milliseconds and, after synchronous confirmation, immediately notifies the local OSPF processes of both routers. Based on this consistent signaling and state machine, the two routers synchronously mark the link as failed and collaboratively perform network-wide route convergence calculations. Ultimately, traffic is restored through a pre-calculated backup path (such as via an aggregation layer switch).
[0055] This application embodiment improves fault recovery efficiency by transmitting link management messages marked with their respective deployed fault recovery strategies between the first device and the fourth device.
[0056] In some embodiments, see Figure 8 , Figure 8 The generation of the second message based on at least one common fault recovery strategy in step 103 is shown to be achieved through steps 1036 to 1037.
[0057] In step 1036, an eighth flag value is added to the second bit position in the link management message of the first device to obtain the sixth message. The second bit position is a reserved bit position in the flag field of the link management message that is different from the first bit position.
[0058] As an example, a 10 (0x2) flag value can be added to the second bit position to distinguish the sixth message from other messages in this application embodiment, in order to indicate that the sixth message will have a flag value representing a common fault recovery strategy added.
[0059] In step 1037, a ninth tag value is added to the first bit position of the sixth message to obtain the second message, wherein the first bit position used to add the ninth tag value has a first correspondence with the common fault recovery strategy.
[0060] This application embodiment adds a mark to the first bit position according to the first correspondence of the determined fault recovery strategy, thereby enabling multiple common fault recovery strategies to be carried in a single link management message. This reduces the step of the second device confirming the deployed fault recovery strategy with each device in the communication link, thus improving the efficiency of fault recovery.
[0061] In step 104, the second device receives the second message sent by the first device.
[0062] The second message carries at least one common fault recovery strategy, and the at least one common fault recovery strategy is determined by the first device from a plurality of fault recovery strategies carried in a pre-set fault recovery protocol. The common fault recovery strategy is a fault recovery strategy deployed by devices in the communication link.
[0063] Here, the second device can determine the common fault recovery strategy of the first device (the local end) and the fourth device (the opposite end) by receiving the second message sent by the first device, and then select a target fault recovery strategy from the common fault recovery strategy to recover the network fault when the first device fails.
[0064] In step 105, the second device determines a target fault recovery strategy from the at least one common fault recovery strategy carried in the second message according to the first message, generates a third message carrying the target fault recovery strategy, and makes devices in the communication link execute the fault recovery strategy.
[0065] The target fault recovery strategy is used to recover the network fault of the communication link indicated by the detection result.
[0066] In some embodiments, referring to Figure 9 , Figure 9 It is shown that the determination of the target fault recovery strategy from the at least one common fault recovery strategy carried in the second message according to the first message in step 105 and the generation of the third message carrying the target fault recovery strategy can be implemented by performing steps 1051 to 1053.
[0067] In step 1051, in the case where the second message carries a plurality of common fault recovery strategies, a plurality of target fault recovery strategies are determined from the plurality of common fault recovery strategies carried in the second message according to the first message.
[0068] As an example, in the example of the above-mentioned routers A and B, it is assumed that the routers A and B are deployed with a common MPLS TE FRR strategy, a BFD strategy, an OSPF strategy, and a VRRP strategy. When a direct fiber link between the two routers is interrupted, the recovery process is triggered in a hierarchical and orderly manner: first, the most direct and fastest MPLS TE FRR is immediately activated (about 50 milliseconds) to switch the traffic to the preset standby tunnel, at this time, the service is recovered, and the subsequent slower strategies are not activated; only when the FRR fails unexpectedly, the BFD detects the unreachable path and triggers the OSPF to perform route re-convergence (about 1-2 seconds) to guide the traffic to be transmitted through other network paths; and the VRRP is not used in such a link failure because it is suitable for machine failure rather than link interruption. In the embodiments of the present application, the number of target fault recovery strategies is less than or equal to the number of common fault recovery strategies.
[0069] In step 1052, priorities of the plurality of target fault recovery strategies are determined based on priorities of the plurality of fault detection protocols.
[0070] As an example, the network system can preferentially activate the most targeted and fastest local dedicated fault recovery strategy, and if the service is successfully recovered, the subsequent fault recovery strategies of lower priority will not be activated, so as to ensure that the fault recovery is achieved with the smallest cost and the highest efficiency, and unnecessary network disturbance is avoided.
[0071] In some embodiments, before step 1052, the priorities of the fault detection protocols can be determined by steps 10521 to 10522.
[0072] In step 10521, a fourth correspondence between a network fault indicated by the fault detection protocol and the link layer, the network layer, and the transport layer is determined.
[0073] In step 10522, the priorities of the fault detection protocols having the fourth correspondence with the link layer, the network layer, and the transport layer are set from high to low in accordance with the priorities of the link layer, the network layer, and the transport layer from high to low.
[0074] The embodiments of the present application achieve the use of the fastest dedicated solution at the bottom layer by determining the priorities in the order of link layer, network layer, and transport layer; only when the bottom layer solution fails or is not applicable, the general solution with a larger impact range but a slower speed is activated step by step, so as to balance the recovery speed, resource consumption, and impact range, and further improve the efficiency of fault recovery.
[0075] In step 1053, the third packet carrying the target fault recovery strategy is generated in the order of the priorities of the plurality of target fault recovery strategies from high to low.
[0076] In some embodiments, the third packet carrying the target fault recovery strategy is generated in the order from high to low of the priorities of the plurality of target fault recovery strategies in step 1053, which can be implemented by performing steps 10531 to 10533.
[0077] In step 10531, in the case that the network communication state is not recovered to normal, the target fault recovery strategy with the highest priority is selected from the target fault recovery strategies that are not currently selected in the order from high to low of the priorities of the plurality of target fault recovery strategies.
[0078] It should be noted that the second device is not executed locally after the target fault recovery strategy is selected, but a third packet is generated and sent to other devices (such as the first device and the third device) that execute the fault recovery strategy, and the target fault recovery strategy carried by the third packet is executed by the other devices to perform fault recovery. Since a device can only execute one fault recovery strategy at the same time, the target fault recovery strategy with the highest priority needs to be selected one by one to generate the third packet.
[0079] In step 10532, a second marker value is added to the second bit position in the link management packet of the second device.
[0080] The second device is a device in the communication link that is different from the first device, and the second bit position is a reserved bit position in the flag field of the link management packet that is different from the first bit position.
[0081] In the embodiments of the present application, the target fault recovery strategy carried in the packet can be represented by adding a 10 marker value (0x2) in the second bit position (7:8 bit position).
[0082] In step 10533, a first correspondence relationship between each fault recovery strategy and the first bit position is determined, a third marker value is added to the first bit position of the link management packet of the second device, and a third packet is obtained.
[0083] The first bit position used to add the third marker value has a first correspondence relationship with the target fault recovery strategy with the highest priority, and the third packet is used to make at least one of the first device and the third device execute the target fault recovery strategy carried by the third packet.
[0084] Here, the first bit position to which the third marker value is added is the first bit position in the link management packet to which the second marker value is added.
[0085] In some embodiments, in the case that each target fault recovery strategy with the highest priority corresponds to a plurality of execution parameters, the following steps 105331 to 105333 are further performed before the third packet is obtained in step 10533.
[0086] In step 105331, for each execution parameter corresponding to each highest priority target fault recovery strategy, a second correspondence between each execution parameter and a third bit position is determined.
[0087] Here, the execution parameter is also called negotiation details, and is essentially a standardized process of information exchange and confirmation between network devices to reach a consensus on state awareness and collaborative action, while following established rules. The core purpose is to ensure the atomicity and conflict-free of recovery actions, and to prevent communication interruption or logical confusion caused by unilateral operation. For example, in the VRRP strategy, the negotiation details include: multiple routers in a local area network exchange and compare each other's priority values through periodic VRRP announcement packets; the device with the highest priority is elected as the "master gateway" through negotiation, and the rest are confirmed as "backup gateways", and the status is continuously synchronized; when the master device fails, the backup device will re-initiate a round of priority comparison negotiation after detecting the continuous absence of multiple announcement packets, and finally elect a new master device and update the status, thereby completing the smooth switching of the gateway without IP address conflict.
[0088] In step 105332, based on the highest priority target fault recovery strategy carried in the link management packet and the current link information, an execution parameter corresponding to the highest priority target fault recovery strategy carried in the link management packet is determined.
[0089] In some embodiments, the determination of the execution parameter corresponding to the highest priority target fault recovery strategy carried in the link management packet based on the highest priority target fault recovery strategy carried in the link management packet and the current link information in step 105332 can be achieved by performing the following steps.
[0090] First, in the case where the highest priority target fault recovery strategy carried in the link management packet is to restart the link, based on the current link information, the service interruption time when restarting the link according to different candidate execution parameters is determined.
[0091] Then, the execution parameter is selected from the candidate execution parameters based on the service interruption time.
[0092] Following the above example, in the case of only considering the service interruption time, the execution parameter corresponding to the fast restart scheme with the shortest interruption time in the candidate execution parameters can be selected, and the selected execution parameter is added to the link management packet.
[0093] In the embodiments of the present application, the execution parameter can also be selected by considering factors such as resource overhead and performance impact, recovery range and convergence, policy risk and stability, and operation and maintenance complexity.
[0094] In some embodiments, the step 105332 of determining the execution parameter corresponding to the target fault recovery strategy with the highest priority carried in the link management packet based on the target fault recovery strategy with the highest priority carried in the link management packet and the current link information can also be implemented by performing the following steps.
[0095] First, in the case where the target fault recovery strategy with the highest priority carried in the link management packet is a switching link, the performance indicators of multiple candidate links are determined based on the current link information, and a candidate link with a performance indicator within a set indicator interval is selected as the first link.
[0096] Here, the performance indicator is an indicator for evaluating link quality, and can generally include bandwidth, throughput, latency, jitter, packet loss rate and availability. The indicator interval can be determined according to the service type, for example, real-time services such as voice calls prefer to select a path with low latency, low jitter and low packet loss, while large file transmission prefers a path with high bandwidth and high throughput.
[0097] Then, the instruction to select the first link to perform the switching link is set as the execution parameter.
[0098] In the embodiments of the present application, the devices in the communication link can exchange and synchronize real-time link performance data through an extended protocol (such as OSPF-TE, BGP-LS) or a measurement protocol (such as TWAMP); then select a candidate link according to the performance indicator; and finally determine the instruction to select the candidate path, such as the instruction to confirm and coordinate the switching action and timing, as the execution parameter to ensure that the traffic is migrated to the candidate path without interruption or out-of-order.
[0099] In step 105333, a fourth marker value is added to the second bit position in the link management packet with the second marker value, and a fifth marker value is added to the third bit position in the link management packet with the second marker value, wherein the third bit position has a second correspondence relationship with the execution parameter corresponding to the target fault recovery strategy with the highest priority.
[0100] In the embodiments of the present application, the addition of the marker value 11 (0x3) in the second bit position (7:8 bit position) can represent that the packet carries the target fault recovery strategy and the details of different fault recovery means (execution parameter).
[0101] In some embodiments, the third bit position comprises the first bit position and a fourth bit position, the fourth bit position being determined from bit positions in the content field of the link management packet which are not occupied, and in the above case, the adding of the fifth flag value in the third bit position in the link management packet with the second flag value added is implemented by the following steps.
[0102] In the case where the number of execution parameters is less than or equal to the number of the first bit positions, the fifth flag value is added in the first bit position in the link management packet with the second flag value added.
[0103] Or, in the case where the number of execution parameters is greater than the number of the first bit positions, the fourth bit position is determined from the content field of the link management packet with the second flag value added, and the fifth flag value is added in the first bit position and the fourth bit position.
[0104] Here, the number of execution parameters is greater than the number of the first bit positions, indicating that the first bit positions cannot completely mark the execution parameters, and thus the execution parameters can be marked in the first bit positions and the content field in the modified link management packet by modifying the structure of the link management packet. The modified link management packet is shown in Table 1.
[0105] Table 1
[0106] Referring to Table 1, by reserving positions in the code field (code), the area in the packet is used to distinguish the type of the packet, and there are 8 bits in total. The 05-FD of the code field of the packet is occupied, and different identifiers are added to correspond to different fault recovery means strategies (fault recovery means negotiation) respectively. For example, 05 represents restart, 06 represents link switching, etc. The negotiation details (execution parameters) can be placed in the content field of the modified link management packet.
[0107] The embodiments of the application improve the amount of execution parameters of the fault recovery strategy carried in the link management packet by selecting the fourth bit position in the content field to identify the execution means in the case where the first bit positions are insufficient to write the execution parameters, thereby improving the fault recovery efficiency.
[0108] In some embodiments, after at least one of the first and third devices executes the target fault recovery strategy carried in the third message, the link can be detected through various fault detection protocols, and the first message can be regenerated based on the detection results. The second device can obtain the fault history and link information by parsing the historical first message, and can intelligently generate communication link configuration by analyzing the fault history and link information. For example, if the primary link (low latency, low packet loss) has recently experienced frequent transient interruptions (fault history), while the backup link has poor quality (high latency fault detected), the system may recommend: enabling more sensitive fault detection for the primary link (such as shortening the BFD detection interval to the millisecond level) to quickly detect transient interruptions; or optimizing the recovery strategy, configuring a quick switch to the backup link when the primary link is interrupted, and setting a longer stable waiting time (such as 30 seconds) before switching back to avoid frequent oscillations; or configuring a quality of service strategy for the critical services of the backup link to ensure the experience of core applications after the switch.
[0109] This application embodiment generates a third message by establishing a correspondence between the first bit position and the highest priority target fault recovery strategy. This enables the transmission of different target fault recovery strategies through simple link management messages. By reselecting the highest priority target fault recovery strategy from multiple unselected target fault recovery strategies, multiple third messages are generated, allowing devices in the communication link to perform fault recovery step by step, thereby improving the efficiency of fault recovery.
[0110] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0111] See Figure 11 , Figure 11 A flowchart of a fault recovery method in a practical application scenario is shown. The fault recovery method includes steps 201 to 205.
[0112] In this application embodiment, the fault recovery method is divided into a process of linking multiple fault detection protocols (hereinafter referred to as Linkage 1) and a process of linking multiple fault recovery protocols (hereinafter referred to as Linkage 2).
[0113] The embodiments of this application can be applied to a communication network fault management system. See [link to relevant documentation]. Figure 11 The fault management system includes a fault display device, a fault management device, and a link configuration recommendation device, wherein the fault management device is communicatively connected to the fault display device and the link configuration recommendation device.
[0114] In step 201, proceed to Linkage 1: detect the existing link faults and fault types.
[0115] Step 201 can be implemented by a detection module in the fault management device.
[0116] Independent detection is performed by preloading a fault detection protocol in the device in the communication link, such as an oam-efm protocol, an oam-cfm protocol, a bfd protocol, an nqa protocol, and the like, and respective detection results are obtained. A corresponding relationship (i.e., a third corresponding relationship) between each fault detection protocol and a 9:15 flags position (a first bit position) in the OAM-EFM-PDU message format is established, and a value 1 is added to the flags position corresponding to the detection protocol indicating that a fault exists, so that a message of linkage one (a first message) can be obtained.
[0117] In the embodiment of the present application, a flag value is added to the 7:8 flags position (a second bit position) to indicate that the link management message is in different stages. The flag value added to the 7:8 flags position is shown in Table 2: Table 2:
[0118] Referring to Table 2, the flag values 00, 01 (an eighth flag value), 10 (a second flag value), and 11 (a fourth flag value) are added to the 7:8 flags position of the link management message to indicate the stage to which the message belongs.
[0119] The message of linkage one obtained is: the 7:8 bit of the current flag field is 00, and the position flag in the 9:15 bit indicates a specific fault detection protocol (a fault protocol type). If a fault detection protocol detects that a link fault exists, the flag position of the fault detection protocol is added with a flag value 1. In the message of linkage one, the flag positions of multiple fault protocols are allowed to be 1, and therefore, the detection results of multiple fault protocols can be carried by the message of linkage one.
[0120] In addition, the fault management device can obtain fault information and link quality information by analyzing the message of linkage one, so that the fault information and the link quality information can be visually displayed by a fault display device as shown in Figure 11
[0121] In step 202, linkage two stage 1 is entered: determining a fault recovery means commonly supported by the link.
[0122] Step 202 can be implemented by a management module (which can be arranged in the second device or the first device in the above embodiment) and a transmission module in the fault management device.
[0123] The two devices (hereinafter referred to as the local device and the opposite device) in communication in the communication link can obtain the fault recovery protocol deployed locally from the management module, and the fault recovery protocol carries the fault recovery means (fault recovery strategy).
[0124] The packet of the linkage two-stage 1 is: the current flag field 7:8 bits are 01, and the position mark of 9:15 bits carries a specific fault recovery means (fault recovery strategy). A plurality of fault recovery means are allowed to be marked as 1, and at this time, it is indicated that a plurality of fault recovery means are supported.
[0125] After the local device and the opposite device obtain the fault recovery protocol deployed locally from the management module, the packet (the fourth packet) carrying the fault recovery protocol deployed locally can be sent to the opposite device. The opposite device supports the fault recovery technology through the analysis of the packet sent by the opposite device, and after one round of interaction, the common fault recovery means (the common fault recovery strategy) supported by both sides can be obtained, and the packet (the second packet) is generated according to the common fault recovery means and is sent to the device (for example, the second device) where the management module is located.
[0126] In step 203, the priority of the fault recovery means is determined.
[0127] Step 203 can be executed by the management module in the fault management device. After receiving the packet of the linkage one and the packet of the linkage two-stage 1, the management module can determine the quality of the current link and the type or reason of the fault according to the packet of the linkage one, so that the management module can determine the priority of each fault recovery means according to the common fault recovery means of the local device and the opposite device carried in the packet of the linkage two-stage 1.
[0128] In step 204, linkage two-stage 2 is entered: the fault recovery strategy to be executed is determined.
[0129] Step 204 can be executed by the management module in the fault management device. After determining the priority order, the management module iteratively selects the fault recovery means with the highest priority from the unselected fault recovery means multiple times, and generates the packet (the third packet) marking the fault recovery means with the highest priority.
[0130] The packet of the linkage two-stage 2 is: the current flag field 7:8 bits are 10, and the position mark of 9:15 bits carries a specific fault recovery means (fault recovery strategy). One fault recovery means is allowed to be marked as 1, and at this time, it is indicated that only one fault recovery means, i.e., the fault recovery means with the highest priority, is indicated.
[0131] In the embodiments of the present application, the priority can be determined according to the level of link failure occurrence and the severity of the link failure. In addition, the mapping between the fault detection protocol and the fault recovery strategy can be predefined, for example, the mapping between the fault detection protocol and the fault recovery strategy is predefined, and after the fault detection protocol of the fault occurrence is determined by analyzing the message of linkage one, the fault recovery strategy mapped with the fault detection protocol is set as the fault recovery strategy with the highest priority among the first N fault recovery strategies.
[0132] In step 205, linkage two stage 3 is entered, in which the negotiation details of the fault recovery strategy are determined, and the fault recovery strategy is executed according to the negotiation details. After step 205 is executed, if the fault is not recovered, step 202 is returned to, and the fault recovery strategy with the highest priority among the unselected common fault recovery strategies is reselected. If the fault is recovered, step 201 is returned to, and the link information and the fault information in the communication link are continuously detected.
[0133] Step 205 can be executed by the management module, the transmission module and the recovery module in the fault management device. After the fault recovery strategy with the highest priority is determined by the management module, the negotiation details of the fault recovery strategy are determined according to the information of the communication link, for example, the recovery means of link switching is adopted, when there are multiple backup links, which backup link is adopted is determined, the message of linkage two stage 3 only performs information transmission. For example, the restart mode is adopted, and it is determined which one of the two parties restarts, and so on. Different implementation details are negotiated for different fault recovery means, and the implementation details can be transmitted by sending the message of linkage two stage 3 to the device which needs to execute the fault recovery strategy.
[0134] The message of linkage two stage 3 is that the current flag field is 10 in the 7th and 8th bits, and the position in the 9th to 15th bits is used to mark the negotiation details (execution parameters). In the message of linkage two stage 3, if the negotiation details involve more content than the bit position of the reserved flag field, the reserved position of 8 bits in the data field of OAM-PDU can be occupied, and a marking value is added in the data field reserved position to distinguish the fault recovery strategy (message type) carried by the message. For example, referring to the link management message shown in Table 1, the data field 05-FD is occupied, a new message type is added, and different message types correspond to the negotiation of different fault recovery means. For example, 05 represents restart, and 06 represents link switching. The negotiation details can be placed in the content field of this type of content, and the specific structure of the content field can be flexibly designed, for example, the bit position is set to completely describe the negotiation details (switching device, switching time, etc.).
[0135] In the embodiments of the present application, the heterogeneous devices in the communication link are uniformly managed through the common message in the communication link, and the interaction times and bit width occupation of the fault detection protocol and the fault recovery protocol between the devices are reduced, and the efficiency of fault recovery is improved. In addition, the fault management device can send the link information detected after step 205 to the link configuration recommendation device, so that the link configuration recommendation device analyzes the link information, and then recommends the configuration mode according to the link information to reduce the occurrence of faults.
[0136] The following continues to illustrate an exemplary structure of the implementation of the fault recovery device 455 provided by the embodiments of the present application as a software module. In some embodiments, as shown in FIG. 4, the software module stored in the network fault recovery device 455 of the memory 450 can include: Figure 2 The first detection module 4551 is configured to receive a first message sent by a first device in a communication link, wherein the first message is obtained by adding a first mark value to at least one first bit position in a link management message of the first device according to a detection result of at least one fault detection protocol, and the first bit position is a reserved bit position of a flag field in the link management message, and the first bit position corresponds to the fault detection protocol one by one. The first selection module 4552 is configured to receive a second message sent by the first device, wherein the second message carries at least one common fault recovery strategy, and the at least one common fault recovery strategy is determined by the first device from a plurality of fault recovery strategies carried by a pre-set fault recovery protocol. The common fault recovery strategy is a fault recovery strategy deployed by the devices in the communication link. The recovery module 4553 is configured to determine a target fault recovery strategy from the at least one common fault recovery strategy carried by the second message according to the first message, generate a third message carrying the target fault recovery strategy, and make the devices in the communication link execute the fault recovery strategy, wherein the target fault recovery strategy is used to recover the network fault of the communication link indicated by the detection result.
[0137] The following continues to illustrate an exemplary structure of the implementation of the fault recovery device 355 provided by the embodiments of the present application as a software module. In some embodiments, as shown in FIG. 3, the software module stored in the network fault recovery device 455 of the memory 350 can include: Figure 3 The second detection module 3554 is configured to add a first mark value in at least one first bit position in a link management packet of the first device according to a detection result of at least one fault detection protocol deployed by the first device in the network communication link, to obtain a first packet; the first sending module 3555 is configured to send the first packet to a second device, the second device being a device different from the first device in the communication link, the first bit position being a reserved bit position of a flag field in the link management packet, the first bit position corresponding to the fault detection protocol one by one, and the first packet being used to instruct the second device to determine a target fault recovery strategy from common fault recovery strategies; the second selection module 3556 is configured to determine at least one common fault recovery strategy deployed by devices in the communication link, and generate a second packet based on the at least one common fault recovery strategy; and the second sending module 3557 is configured to send the second packet to the second device, wherein the second packet is used to instruct the second device to determine the target fault recovery strategy based on the first packet and generate a third packet based on the target fault recovery strategy, the target fault recovery strategy being determined from the at least one common fault recovery strategy carried in the second packet, and the third packet being used to instruct the devices in the communication link to execute the fault recovery strategy.
[0138] The computer readable storage medium stores computer executable instructions or computer programs, when the computer executable instructions or computer programs are executed by a processor, the processor executes the network fault recovery method provided by the embodiments of the present application, for example, the network fault recovery method shown in the above. Figure 4 The computer readable storage medium stores computer executable instructions or computer programs, when the computer executable instructions or computer programs are executed by a processor, the processor executes the network fault recovery method provided by the embodiments of the present application, for example, the network fault recovery method shown in the above.
[0139] In some embodiments, the computer executable instructions can be in the form of programs, software, software modules, scripts or codes, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and can be deployed in any form, including being deployed as independent programs or being deployed as modules, components, subroutines or other units suitable for use in a computing environment.
[0140] As an example, the computer executable instructions can be deployed to execute on one electronic device, or on multiple electronic devices located in one place, or on multiple electronic devices distributed in multiple places and interconnected through a communication network.
[0141] The above is only an embodiment of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement and improvement made within the spirit and scope of the present application shall be included in the protection scope of the present application.
Claims
1. A network fault recovery method characterized by, The method comprises: receiving a first packet sent by a first device in a communication link, wherein the first packet is obtained by adding a first mark value to at least one first bit position in a link management packet of the first device according to a detection result of at least one fault detection protocol, the first bit position is a reserved bit position of a flag field in the link management packet, and the first bit position corresponds to the fault detection protocol one by one; receiving a second packet sent by the first device, wherein the second packet carries at least one common fault recovery strategy, the at least one common fault recovery strategy is determined by the first device from a plurality of fault recovery strategies carried in a pre-set fault recovery protocol, and the common fault recovery strategy is the fault recovery strategy deployed by devices in the communication link; determining a target fault recovery strategy from the at least one common fault recovery strategy carried in the second packet according to the first packet, generating a third packet carrying the target fault recovery strategy, and enabling devices in the communication link to execute the fault recovery strategy, wherein the target fault recovery strategy is used to recover network failure of the communication link indicated by the detection result.
2. The method of claim 1, wherein, The method comprises: in the case that the second packet carries a plurality of common fault recovery strategies, determining a plurality of target fault recovery strategies from the plurality of common fault recovery strategies carried in the second packet according to the first packet; determining priorities of the plurality of target fault recovery strategies based on priorities of the plurality of fault detection protocols; generating the third packet carrying the target fault recovery strategy in the order from high to low of the priorities of the plurality of target fault recovery strategies.
3. The method of claim 2, wherein, The method comprises: in the case that network communication state is not recovered to normal, selecting a target fault recovery strategy with the highest priority from the target fault recovery strategies that are not currently selected in the order from high to low of the priorities of the plurality of target fault recovery strategies; adding a second mark value to a second bit position in a link management packet of a second device, wherein the second device is a device different from the first device in the communication link, and the second bit position is a reserved bit position different from the first bit position in the flag field of the link management packet. determining a first correspondence relationship between each of the failure recovery strategies and the first bit position, adding a third mark value to the first bit position of a link management packet of the second device to obtain a third packet, wherein the first bit position used for adding the third mark value has a first correspondence relationship with the target failure recovery strategy of the highest priority, and the third packet is used to make at least one of the first device and a third device execute the target failure recovery strategy carried by the third packet.
4. The method of claim 3, wherein, Each of the target failure recovery strategies of the highest priority corresponds to a plurality of execution parameters. Before the third packet is obtained, the method further includes: For each of the execution parameters corresponding to each of the target failure recovery strategies of the highest priority, determining a second correspondence relationship between each of the execution parameters and a third bit position; determining the execution parameter corresponding to the target failure recovery strategy of the highest priority carried in the link management packet based on the target failure recovery strategy of the highest priority carried in the link management packet and current link information; adding a fourth mark value to the second bit position in the link management packet with the second mark value and adding a fifth mark value to a third bit position in the link management packet with the second mark value, wherein the third bit position has the second correspondence relationship with the execution parameter corresponding to the target failure recovery strategy of the highest priority.
5. The method of claim 4, wherein, The third bit position includes the first bit position and a fourth bit position, and the fourth bit position is determined from bit positions not occupied in a content field of the link management packet. The adding of the fifth mark value to the third bit position in the link management packet with the second mark value includes: In a case where the number of the execution parameters is less than or equal to the number of the first bit positions, the fifth mark value is added to the first bit positions in the link management packet with the second mark value; In a case where the number of the execution parameters is greater than the number of the first bit positions, a fourth bit position is determined from a content field of the link management packet with the second mark value, and the fifth mark value is added to the first bit positions and the fourth bit position.
6. The method of claim 5, wherein, The determining of the execution parameter corresponding to the target failure recovery strategy of the highest priority carried in the link management packet based on the target failure recovery strategy of the highest priority carried in the link management packet and the current link information includes: In a case where the target failure recovery strategy of the highest priority carried by the third packet is link restart, the service interruption time when link restart is performed according to different candidate execution parameters is determined based on the current link information; The execution parameter is selected from the candidate execution parameters based on the service interruption time.
7. The method of claim 5, wherein, The target fault recovery strategy with the highest priority carried in the link management packet and the current link information are used to determine the execution parameter corresponding to the target fault recovery strategy with the highest priority carried in the link management packet, and the execution parameter comprises: In a case where the target fault recovery strategy with the highest priority carried in the link management packet is a switching link, the performance indicators of multiple candidate links are determined based on the current link information, and the candidate link with a performance indicator within a set indicator interval is selected as a first link; An instruction for selecting the first link to perform a switching link is set as the execution parameter.
8. A network fault recovery method characterized by, The method comprises: According to a detection result of at least one fault detection protocol deployed by a first device in a network communication link, a first mark value is added to at least one first bit position in a link management packet of the first device to obtain a first packet; The first packet is sent to a second device, wherein the second device is a device different from the first device in the communication link, the first bit position is a reserved bit position of a flag field in the link management packet, the first bit position corresponds to the fault detection protocol one by one, and the first packet is used to instruct the second device to determine a target fault recovery strategy from common fault recovery strategies; At least one common fault recovery strategy deployed by devices in the communication link is determined, and a second packet is generated based on the at least one common fault recovery strategy; The second packet is sent to the second device, wherein the second packet is used to make the second device determine a target fault recovery strategy based on the first packet and generate a third packet based on the target fault recovery strategy, the target fault recovery strategy is determined from the at least one common fault recovery strategy carried in the second packet, and the third packet is used to make the devices in the communication link execute the fault recovery strategy.
9. An electronic device, comprising: The electronic device comprises: a memory configured to store computer executable instructions or computer programs; a processor configured to execute the computer executable instructions or computer programs stored in the memory to implement the network fault recovery method in any one of claims 1 to 7 or the network fault recovery method in claim 8.
10. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, The computer executable instructions or computer programs are executed by the processor to implement the network fault recovery method in any one of claims 1 to 7 or the network fault recovery method in claim 8.