Ring network link switching method, device and system, computer equipment and storage medium

By using the collaborative mechanism of clear message and request message in the ring network topology, the rapid handover between the main link and the backup link is achieved, which solves the problem of unstable link switching in the existing technology and improves the availability and user experience of the network.

CN119766595APending Publication Date: 2025-04-04KYLAND TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411917240.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, link switching of ring network topology will lead to network instability, affect user experience, and the switching process will not be efficient enough.

Method used

When the main link fails, the clear message and request message are sent to the maintenance domain, and the device is instructed to clear the main link configuration information and learn the backup link configuration information, thereby achieving rapid switching between the main link to the backup link.

Benefits of technology

It realizes efficient and stable link switching, ensures high availability, stability and reliability of the network, reduces communication recovery time, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766595A_ABST
    Figure CN119766595A_ABST
Patent Text Reader

Abstract

The invention discloses a ring network link switching method and device, computer equipment and a storage medium, and belongs to the technical field of communication. The method is applied to a monitoring device, the monitoring device is provided with a main link and a standby link between the monitoring device and a detection device in a ring network, and the method comprises the following steps: under the condition that the main link is monitored to be invalid, sending a table cleaning message to a maintenance domain where the main link is located so as to indicate devices in the maintenance domain to clear configuration information of the main link; and sending a request message to the maintenance domain to indicate the equipment in the maintenance domain to learn the configuration information of the standby link, so that the communication connection between the equipment and the detection equipment is switched from the main link to the standby link. According to the method and the device, rapid switching from the main link to the standby link can be realized, high availability, stability and reliability of the network are ensured, and the method and the device are suitable for link protection and fault recovery scenes under various ring network topology structures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and in particular, relates to a ring network link switching method, device, system, computer equipment and storage medium. Background Art

[0002] With the development of communication technology, ring network topology is widely used in network architecture to provide high reliability and redundancy protection. However, in related technologies, when the main link switches to the backup link, it often causes network instability for a certain period of time, thereby affecting the user experience.

[0003] Therefore, a method is urgently needed to achieve efficient and stable link switching. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the related art. To this end, the present application proposes a ring network link switching method, device, system, computer equipment and storage medium to achieve efficient and stable primary and standby link switching.

[0005] In a first aspect, the present application provides a ring network link switching method, which is applied to a monitoring device, wherein the monitoring device is provided with a main link and a backup link between the monitoring device and the detection device in the ring network; the method comprises:

[0006] When a failure of the main link is detected, a clearing message is sent to the maintenance domain to instruct the devices in the maintenance domain to clear the configuration information of the main link;

[0007] A request message is sent to the maintenance domain to instruct the devices in the maintenance domain to learn the configuration information of the backup link, so that the communication connection with the detection device is switched from the main link to the backup link.

[0008] In the above technical scheme, when the failure of the main link is detected, a clearing message is sent to the maintenance domain where it is located, instructing the devices in the maintenance domain to clear the configuration information of the main link, and to re-learn the correct path and configuration information of the target backup link, so as to avoid path errors or forwarding table confusion; and then a request message is used to instruct the devices in the maintenance domain to re-learn the configuration information of the backup link. Thus, through the collaborative mechanism of the clearing message and the request message, a rapid switching from the main link to the backup link is achieved, thereby ensuring the high availability, stability and reliability of the network, and being suitable for link protection and fault recovery scenarios under various ring network topologies.

[0009] According to one embodiment of the present application, the method further includes:

[0010] When it is detected that the main link has returned to normal, a clearing message is sent again to the maintenance domain to instruct the devices in the maintenance domain to clear the configuration information of the standby link;

[0011] A request message is sent to the maintenance domain to instruct the devices in the maintenance domain to learn the configuration information of the main link, so that the communication connection with the detection device is switched from the backup link to the main link again.

[0012] In the above embodiment, when it is monitored that the main link has returned to normal, a clearing message is sent to the maintenance domain where it is located to indicate the configuration information of the backup link of the equipment in the maintenance domain, and the correct path and configuration information of the target backup link can be re-learned to avoid path errors or forwarding table confusion; then a request message is used to instruct the equipment in the maintenance domain to re-learn the configuration information of the main link. Thus, the synchronization of the configuration information of the main and backup links is achieved through the clearing message and the request message, which realizes the rapid switching of the communication link back to the main link and ensures that the link switching process is fast, reliable and seamless, greatly reducing the communication recovery time and ensuring the quality of network communication.

[0013] In a second aspect, the present application provides a ring network link switching device, which is applied to a monitoring device, wherein the monitoring device is provided with a main link and a backup link between the monitoring device and the detection device in the ring network; the device comprises:

[0014] A table clearing message module is used to send a table clearing message to the maintenance domain in which the device is located to clear the configuration information of the main link when the failure of the main link is detected;

[0015] The request message module is used to send a request message to the maintenance domain to instruct the devices in the maintenance domain to learn the configuration information of the backup link so that the communication connection with the detection device is switched from the main link to the backup link.

[0016] In the above technical scheme, when the failure of the main link is detected, a clearing message is sent to the maintenance domain where it is located, instructing the devices in the maintenance domain to clear the configuration information of the main link, and to re-learn the correct path and configuration information of the target backup link, so as to avoid path errors or forwarding table confusion; and then a request message is used to instruct the devices in the maintenance domain to re-learn the configuration information of the backup link. Thus, through the collaborative mechanism of the clearing message and the request message, a rapid switching from the main link to the backup link is achieved, thereby ensuring the high availability, stability and reliability of the network, and being suitable for link protection and fault recovery scenarios under various ring network topologies.

[0017] In a third aspect, the present application provides a ring network system, which includes at least one maintenance domain, each maintenance domain is configured with a monitoring device, and the monitoring device is used to execute and implement the ring network link switching method described in the first aspect.

[0018] In a fourth aspect, the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the ring network link switching method as described in the first aspect above is implemented.

[0019] In a fifth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the ring network link switching method as described in the first aspect above is implemented.

[0020] In a sixth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the ring network link switching method as described in the first aspect above.

[0021] In a seventh aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the ring network link switching method as described in the first aspect above.

[0022] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0024] Figure 1 is a schematic diagram of an application scenario of a ring network link switching method provided in some embodiments of the present application;

[0025] Figure 2 is a flowchart of a ring network link switching method provided in some embodiments of the present application;

[0026] Figure 3 is a topological diagram of a ring network system provided in some embodiments of the present application;

[0027] Figure 4 is a flowchart of a ring network link switching method provided in some other embodiments of the present application;

[0028] Figure 5 is a schematic diagram of the structure of a ring network link switching device provided by the present application in other embodiments;

[0029] Figure 6 It is a schematic diagram of the structure of a computer device provided in some embodiments of the present application. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0031] Unless otherwise defined, all technical and scientific terms used in this application have the same meanings as those commonly understood by technicians in the technical field of this application; the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned drawings and any variations thereof are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order or a primary and secondary relationship.

[0032] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0033] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", and "attached" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0034] The term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0035] The term "multiple" as used in this application refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple sheets" refers to more than two sheets (including two sheets).

[0036] In a ring network, fast link switching is crucial because a failure in the main link will cause network communication interruption, affecting the stability and timeliness of data transmission. In order to ensure high network availability, a switching mechanism between the main link and the backup link is usually designed. When the user actively switches the link or the main link fails, it is particularly important to quickly switch the link and ensure that the network equipment quickly establishes a new link communication path. However, in related technologies, link switching often causes link oscillation, data loss, or unstable switching, affecting user experience.

[0037] In view of this, an embodiment of the present application provides a ring network link switching method, which ensures the rapid update of link configuration information by sending clearing messages and request messages, realizes efficient switching from the main link to the target backup link, and ensures the stability of network communication.

[0038] For ease of understanding, the terms involved in this application are explained below.

[0039] Probe message: Continuity Check Message (CCM).

[0040] Maintenance Domain (MD): refers to a management scope or fault detection area in the network. It defines the management boundary between network devices so that fault detection and maintenance operations are limited to the domain and do not affect other maintenance domains.

[0041] Maintenance Association (MA): In the same maintenance domain, the maintenance association is used to associate a group of maintenance endpoints (MEPs) so that detection devices and monitoring devices can detect faults and communicate with each other.

[0042] Level indicates the hierarchical level of the maintenance domain, usually a value between 0 and 7. Higher levels cover lower-level maintenance domains and are used to implement multi-level network management and fault detection to avoid management conflicts.

[0043] The purpose of the above configuration is to ensure that the detection device and the detection device can normally identify and process each other's detection messages within the same management scope. In addition, through the same maintenance domain and maintenance association, the link fault detection between devices can be managed and monitored uniformly; by setting the level, the configuration confusion between different maintenance domains or levels can be avoided, ensuring the effectiveness and accuracy of fault detection.

[0044] The sending interval (Continuity Check Message, CCM Interval) is the time period for sending the detection message, for example, 1 second, 3.3 milliseconds, etc.

[0045] Detection port: The port used by the specified detection device to send detection messages.

[0046] Maintenance endpoint identifier (MEP ID): Each monitoring device is assigned a unique identifier to distinguish different endpoint devices within a maintenance association (MA). The MEP ID enables the monitoring device to accurately receive and identify CCM messages from the detection device.

[0047] Primary link port (hereinafter referred to as primary port): the primary data port of the monitoring device, used to receive CCM messages from the detection device.

[0048] Backup link port (hereinafter referred to as backup port): a backup data port of the monitoring device. When the primary link fails, the port will be used to receive data traffic after the failover.

[0049] The following is a detailed description of the ring network link switching method and the like provided in the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0050] The ring network link switching method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the monitoring device 10 and the detection device 20 are located in the same maintenance domain of the ring network. The main link and the backup link are independent physical lines. Even if their starting points and end points are the same, they can be connected through different fiber pairs, cables, switch ports or other transmission media. For example, the main link is transmitted through optical fiber 1, connected from the main port of the monitoring device 10 to port 1 of the detection device 20, and the backup link is transmitted through optical fiber 2, connected from the backup port of the monitoring device 10 to port 2 of the detection device 20. For another example, the bandwidth of the main link and the backup link is different. After the network is initialized, one link will be selected as the main link, and all traffic will be forwarded through this link; the other link will be set to a blocking state (BLOCK) and will only be activated when the main link fails, thereby improving network reliability and redundancy.

[0051] The user's mobile phone, computer and other terminal devices are connected to the monitoring device 10 through a local area network. Exemplarily, the main link and the backup link can be connected to different operator networks respectively. For example, the main link is provided by operator A, such as the optical fiber dedicated line of operator A, and the path is: monitoring device 10→operator A network→detection device 20. The backup link is provided by operator B, such as the dedicated line of operator B, and the path is: monitoring device 10→operator B network→detection device 20. Of course, one or more intermediate network devices can be set between the monitoring device 10 and the detection device 20 on the main link and the backup link.

[0052] In actual usage scenarios, users may have the need to actively switch the network of operator A to the network of operator B, or the main link may fail, in which case the main link needs to be switched to a backup link to ensure smooth communication. In order to ensure the continuity of network services, the monitoring device 10 switches the data traffic from the main link to the backup link, and sends a table clearing message to the intermediate network device on the backup link to clear the old link information (such as ARP and MAC table entries) to avoid forwarding on the wrong path. Then, the monitoring device 10 sends a request message to the intermediate network device on the backup link, instructing them to store the configuration information of the backup link. After the main link is restored, the network can automatically switch back and clear the old configuration information of the backup link to avoid link oscillation. In terms of user experience, the switching process is performed automatically in the background, and users are almost unaware of the network interruption. What they perceive is still a stable network connection, such as normal access to the server and uninterrupted video conferencing.

[0053] Exemplarily, the monitoring device 10 and the detection device 20 may be switches, routers, and the like.

[0054] Exemplarily, terminal devices include but are not limited to various desktop computers, laptops, smart phones, tablet computers, vehicle terminals, Internet of Things devices, or portable wearable devices. The Internet of Things devices may be one or more of smart speakers, smart TVs, smart air conditioners, or smart vehicle devices. Portable wearable devices may be one or more of smart watches, smart bracelets, or head-mounted devices. The server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms.

[0055] The ring network link switching method may be applied to a switch or a router, and may be specifically executed by hardware or software in the switch or the router.

[0056] The ring network link switching method provided by the embodiment of the present application, the execution subject of the ring network link switching method can be a switch or a router, or a functional module or functional entity in the switch or the router that can implement the ring network link switching method. The ring network link switching method provided by the embodiment of the present application is described below by taking the monitoring device as the execution subject as an example. Among them, there is a main link and at least one backup link between the monitoring device and the detection device in the ring network. The monitoring device and the detection device are configured to be in the same maintenance domain.

[0057] like Figure 2 As shown, the ring network link switching method includes: steps 210 to 220.

[0058] Step 210: When the failure of the main link is detected, a clear message is sent to the maintenance domain to instruct the devices in the maintenance domain to clear the configuration information of the main link.

[0059] The detection device periodically sends a detection message to the monitoring device according to the sending interval. For example, the detection message is sent unidirectionally, and it does not matter whether the other end replies.

[0060] When the primary port of the monitoring device receives a detection message, it sets the backup port to a blocking state to prevent the message from being forwarded from the backup port. When the primary port of the monitoring device does not receive a detection message for a period of time, it indicates that there is a fault in the primary link, etc., and the monitoring device changes the state of the backup port from a blocking state to a forwarding state.

[0061] In some embodiments, the monitoring device can send a table clearing message to all devices in the current maintenance domain to make these devices clear the link configuration information matching the main link and relearn this information. In this way, all devices in the ring network can understand the current network topology changes, ensuring that all devices can clear outdated table entries at the same time, avoiding data packet loss or forwarding errors caused by outdated cache information.

[0062] The clear message is used to instruct the devices in the maintenance domain to clear the current configuration information, that is, the configuration information of the primary link, and relearn new configuration information, that is, the configuration information of the backup link. The configuration information includes but is not limited to ARP table entries and MAC address table entries.

[0063] When the main link fails and switches to the backup link, the devices in the network may still retain the old link information (such as the MAC table or ARP table of the main link). This old information will cause data traffic to continue to flow toward the failed main link, resulting in data loss or forwarding errors. Therefore, by sending clear table messages, the monitoring device can help network devices to promptly discover new data forwarding paths, thereby ensuring that data traffic can be transmitted through the new backup link. In addition, by sending clear table messages, link oscillation or data forwarding delays caused by devices in the network retaining old configuration information can be avoided.

[0064] Step 220: Send a request message to the maintenance domain to instruct the devices in the maintenance domain to learn the configuration information of the backup link, so that the communication connection with the detection device is switched from the main link to the backup link.

[0065] After sending the clear message to instruct the devices in the maintenance domain to clear the configuration information matching the primary link, the monitoring device sends a request message to the devices in the maintenance domain to instruct the devices in the maintenance domain to store the configuration information of the backup link.

[0066] The sending of the request message also triggers the device in the maintenance domain to return a response message. When the device in the maintenance domain returns the response message, it indicates that the backup link has been configured. This response mechanism ensures that the entire link switching process is reliable and controllable, avoiding configuration asynchrony or data forwarding abnormalities. Exemplarily, the request message can be a conventional control message, such as an ARP message.

[0067] Exemplarily, the request message may include but is not limited to the following key fields or information: one or more of a source device identifier, a target device identifier, an operation type, a timestamp or a sequence number, a request status flag, and the like.

[0068] The source device identifier is used to indicate the device that sends the request, that is, the monitoring device. The target device identifier is used to indicate the recipient of the request message, such as the device in the maintenance domain. The operation type is used to indicate the specific operation that the device needs to perform, such as storing the configuration information of the backup link. The timestamp or sequence number is used to ensure the uniqueness of the request and avoid repeated execution. The request status flag is used to indicate the purpose of the current request message, such as activating the target backup link or performing configuration synchronization.

[0069] The request message can be implemented through different network management or maintenance protocols, such as Ethernet OAM (CFM) protocol, LACP (Link Aggregation Control Protocol), or custom messages.

[0070] For example, under the Ethernet OAM (CFM) protocol, the request message can be based on the maintenance message mechanism in the CFM protocol, and the message format of the request message can be defined to notify the activation of the standby link, store the configuration information of the standby link, etc. In private networks or specific scenarios, network equipment manufacturers can also define custom control messages to transmit information similar to request messages.

[0071] The ring network link switching method provided in the embodiment of the present application, when detecting the failure of the main link, sends a clearing message to the maintenance domain where it is located, instructing the devices in the maintenance domain to clear the configuration information of the main link, and can re-learn the correct path and configuration information of the target backup link to avoid path errors or forwarding table confusion; and then instructs the devices in the maintenance domain to re-learn the configuration information of the backup link through a request message. Therefore, through the collaborative mechanism of the clearing message and the request message, a fast switching from the main link to the backup link is achieved, thereby ensuring the high availability, stability and reliability of the network, and being suitable for link protection and fault recovery scenarios under various ring network topologies.

[0072] In network communications, especially in complex network topologies (such as ring networks or multi-link backup structures), status synchronization and link switching between monitoring devices and detection devices are important guarantees for stable network operation. When the main link fails, the system quickly switches to the backup link to ensure uninterrupted service. When the main link returns to normal, in order to switch back to the main link and synchronize the status of network devices, it is necessary to send request messages to devices in the maintenance domain and adopt appropriate broadcast or unicast strategies according to the different situations of the network where the devices are located to complete the re-establishment of communication connections. This method not only achieves the synchronization of configuration information, but also ensures that adjacent devices in the network can communicate with each other and ensures the smooth transmission of data streams.

[0073] To this end, in some embodiments, a request message is sent to devices within the maintenance domain, including: when the monitoring device and the detection device are in the same network, broadcasting the request message to the devices within the maintenance domain; when the monitoring device and the detection device are in different networks, unicasting the request message to adjacent devices; wherein the request message is passed from the adjacent device to the next device in sequence until all devices within the maintenance domain receive the request message.

[0074] In some scenarios, the monitoring device and the detection device are in the same broadcast domain and can communicate directly through broadcast. In other scenarios, the monitoring device and the detection device are in different network domains (such as different VLANs or different subnets), and communication needs to be achieved through unicast between adjacent devices.

[0075] Therefore, when the monitoring device and the detection device are in the same network, the monitoring device broadcasts the request message to all devices in the maintenance domain. The broadcast request message can cover the entire network domain, ensuring that all devices in the maintenance domain receive the request and perform corresponding operations.

[0076] When the monitoring device and the detection device are in different networks, the monitoring device sends a unicast request message to the adjacent device. Figure 3 As shown, Figure 3 A ring network topology is shown. In the ring network, the main link is ACB and the backup link is ADEB. Among them, device A is a detection device and device B is a detection device. In the case of failure of the main link, the monitoring device can notify each device by broadcasting. Alternatively, the monitoring device can also unicast the request message to the adjacent device, that is, device E. Device E then communicates with device D to instruct device D to store new configuration information, that is, the configuration information of the backup link being ADEB, such as ARP table entries and MAC address table entries. Until all devices receive the request message, each device can store the new configuration information based on the request message, thereby realizing the switching from the main link to the target backup link.

[0077] In the above embodiments, by distinguishing between scenarios of the same network and different networks, and adopting broadcast and unicast strategies, the flexibility and adaptability of the link switching mechanism are improved; by sending request messages, it is possible to ensure that each device can update the configuration information of the backup link in a timely manner to avoid incorrect path selection or data loss, and through the coordination of request messages and response messages, rapid switching between the main link and the backup link is achieved, reducing network interruption time.

[0078] Based on the above embodiments, when the main link fails, the backup link can quickly take over the traffic to avoid communication interruption. However, in order to ensure switching back to the main link when the main link is restored while maintaining the blocking state of the backup link, detection messages need to be exchanged regularly between the detection device and the monitoring device. Through the sending and receiving of detection messages, the network device can understand the health status of the main link in real time, respond quickly to changes in link status, and realize automatic link switching and recovery. Therefore, the detection device sends the detection message to the monitoring device according to a preset period. The preset period is determined, for example, according to the sending interval time (CCMinterval). The detection messages corresponding to different maintenance domains are distinguished by the maintenance domain information carried.

[0079] Therefore, the method also includes: when any detection message is received, extracting the maintenance domain information carried in the received detection message; matching the extracted maintenance domain information with the maintenance domain information configured by itself, and when the match is consistent, determining the status of the main link based on the received detection message.

[0080] The monitoring device has pre-configured maintenance domain information maintained by itself in its memory, and compares the maintenance domain information in the detection message with the locally configured maintenance domain information. If the two completely match, it means that the detection message is within its own jurisdiction. Exemplarily, the detection message includes at least a maintenance endpoint identifier, a maintenance domain identifier, a maintenance association identifier, a maintenance domain level, a sending interval time, and a sending port. If the detection message is a detection message from another maintenance domain, the monitoring device may not process it, or discard the message, etc. If the monitoring device determines that the detection message is a detection message within the current maintenance domain, it processes it, that is, determines the status of the main link based on the detection message.

[0081] In the above embodiment, by matching the maintenance domain identifier and the maintenance association identifier, it is ensured that the device only processes the detection messages related to it, thereby avoiding misprocessing and waste of resources, and improving the accuracy and efficiency of link status detection.

[0082] The maintenance domain information includes but is not limited to the maintenance domain identifier and the maintenance association identifier. Devices belonging to the same maintenance domain are configured with the same maintenance domain identifier and maintenance association identifier. Therefore, the above method also includes: when the extracted maintenance domain identifier matches the self-configured maintenance domain identifier, and the extracted maintenance association identifier matches the self-configured maintenance association identifier, determining that the match is consistent.

[0083] When the monitoring device receives a detection message, it first extracts the maintenance domain identifier and maintenance association identifier therein, and matches them with the maintenance domain identifier and maintenance domain information configured by itself to determine whether the detection message is a detection message within the same maintenance domain. That is, the monitoring device matches the maintenance domain identifier in the detection message with the maintenance domain identifier configured by itself, and matches the maintenance association identifier in the detection message with the maintenance association identifier configured by itself, and when both are the same, it is determined that the match is consistent.

[0084] In the above embodiment, by first extracting the maintenance domain identifier and the maintenance association identifier in the detection message and matching them with the local configuration, it is possible to quickly determine whether the message needs to be processed. If the match is inconsistent, no further processing is performed or the message is directly discarded, thereby avoiding the waste of system resources and effectively improving resource utilization efficiency; and by double matching the maintenance domain identifier and the maintenance association identifier, it is ensured that the device only processes the detection messages belonging to its maintenance domain, further improving the accuracy and reliability of link status detection.

[0085] In addition, the monitoring device is configured with at least one service, and the monitoring device and the detection device may also be configured with a maintenance domain level. When the maintenance domain identifier and the maintenance association identifier match, the detection message also carries the maintenance domain level, and different maintenance domain levels indicate different service scenarios.

[0086] To this end, in some embodiments, the method further includes: determining the service scenario indicated by the maintenance domain level when a match is determined; and switching between the primary link and the backup link under the indicated service scenario.

[0087] After confirming that the maintenance domain identifier and the maintenance association identifier match, the monitoring device will further extract the maintenance domain level information in the message. This level information indicates the business scenario involved. For example, different businesses may have different requirements for links. Based on the business scenario indicated by the maintenance domain level, the monitoring device can determine whether a link switching operation is required; or, based on the business scenario indicated by the maintenance domain level, the monitoring device performs link switching operations for different business scenarios.

[0088] Therefore, by introducing maintenance domain-level information, the monitoring device can flexibly adjust the link usage strategy according to different business scenarios. By automatically identifying business scenarios and switching links according to maintenance domain-level instructions, the device can respond to link failures in a timely manner and reduce the impact of failures on the business.

[0089] When the main link returns to normal, how to reset the backup link to a blocked state and ensure that the configuration of the devices in the network is updated in time to achieve seamless communication switching. By sending clear messages and request messages, the devices in the network can update the configuration information and ensure that the data flow is restored to the main link without generating redundant or erroneous traffic. Such a mechanism can improve the self-healing ability of the network and ensure stable and efficient communication.

[0090] For this reason, Figure 4 As shown, in some embodiments, the above method further includes steps 410 to 420:

[0091] Step 410: When it is detected that the main link has returned to normal, a clear message is sent to the maintenance domain again to instruct the devices in the maintenance domain to clear the configuration information of the standby link.

[0092] When the monitoring device detects that the main link has returned to normal, it starts to return to the forwarding state of the main link and resets the port state of the backup link to the blocking state, thereby ensuring that the main link takes precedence over the backup link in data forwarding and preventing data flow from continuing to be transmitted through the backup link.

[0093] The monitoring device detects that the main link has returned to normal, for example, the monitoring device receives a detection message; that is, when the monitoring device receives the detection message again, it can be determined that the main link has returned to normal. Alternatively, the monitoring device can also confirm whether the main link has returned to normal through a link status protocol or link status feedback from a network device.

[0094] If the monitoring device detects that the primary link has returned to normal, the monitoring device will send a clear message to other devices in the maintenance domain to instruct these devices to clear the configuration information of the backup link and relearn the configuration information of the primary link.

[0095] Step 420: Send a request message to the maintenance domain to instruct the devices in the maintenance domain to learn the configuration information of the primary link so that the communication connection with the detection device is switched from the backup link to the primary link.

[0096] After the clearing message is sent, the monitoring device sends a request message to the maintenance domain. The purpose of the request message is to notify the devices in the maintenance domain to store the configuration information that matches the main link. The monitoring device can send a clearing message to all devices in the current network to make these devices clear the configuration information that matches the backup link and relearn the configuration information of the main link. In this way, all devices in the ring network can understand the current network topology changes, ensuring that all devices can clear outdated entries at the same time, avoiding data packet loss or forwarding errors caused by outdated cache information.

[0097] The monitoring device can also confirm that the configuration information matching the main link has been successfully updated by receiving a response message from the device in the maintenance domain. The data flow is then restored to be transmitted through the main link, thereby realizing the re-switching of the communication connection between the detection device and the monitoring device from the backup link to the main link.

[0098] In the above embodiment, by cooperating with the clearing message and the request message, the link configuration update when the main link is restored is automatically completed, manual intervention is avoided, and automatic link switching is realized; and, by timely clearing the configuration information of the backup link, the device is prevented from still forwarding based on the wrong configuration, reducing possible loops or redundant forwarding, and improving the reliability and stability of the network; in addition, by using the mechanism of request messages and response messages, it is ensured that the configuration information can be quickly synchronized, shortening the time to switch from the backup link back to the main link, reducing the service interruption time, and thus ensuring the user's network experience.

[0099] In order to realize link switching, the monitoring device is configured with a main link port and a backup link port. Accordingly, the above method also includes: when the main link is monitored to be normal, the backup link port is set to a blocking state; when the main link is monitored to be failed, the backup link port is converted from a blocking state to a forwarding state; when the main link is monitored to be restored to normal, the backup link port is reset to a blocking state.

[0100] Specifically, when the monitoring device receives the detection message sent by the detection device, it indicates that the main link is normal. At this time, the monitoring device will set the backup link port to a blocked state, that is, stop forwarding data from the backup link port. This ensures that data traffic is transmitted through the main link, that is, forwarded through the main link port, improving communication efficiency.

[0101] If the monitoring device does not receive the detection message from the detection device within a preset time period (for example, 1 second, 2 seconds, 5 seconds, etc.), it is considered that the main link has failed or failed. Alternatively, when the monitoring device receives the detection message, it determines that the time interval from the last time the detection message was received to the time the detection message was received exceeds the sending interval based on the sending interval carried therein. At this time, the monitoring device will determine that the main link has failed, and switch the port state of the backup link to the forwarding state, allowing the backup link to start forwarding data traffic to ensure that the service is not interrupted. After the main link returns to normal, when the monitoring device re-detects that the main link is available, it will reset the backup link to the blocking state and restore the data transmission path of the main link.

[0102] In the above embodiment, through periodic detection messages, the monitoring device can obtain the status of the main link in real time, thereby quickly responding to changes in the link status and ensuring the high availability of the network; when the main link is normal, by setting the backup link to a blocking state, network bandwidth and computing resources can be saved, and unnecessary data forwarding can be avoided; and in the event of failure of the main link, by switching the port state of the backup link to a forwarding state, the network can be prevented from being interrupted for a long time, thereby affecting the user experience.

[0103] In order to prevent frequent switching and network oscillation caused by link recovery, it is usually necessary to introduce a delay when resetting the backup link to a blocked state. By setting a delay mechanism, instability caused by link state fluctuations in a short period of time after the main link is restored can be avoided. To this end, in some embodiments, resetting the backup link to a blocked state includes: resetting the backup link port to a blocked state after a preset delay period; wherein the delay period is dynamically configured based on network requirements.

[0104] The delay time can be dynamically configured according to actual network needs to meet the stability requirements in different network environments. For example, during high traffic periods or when network conditions are complex, a longer delay time can be set to ensure smoother recovery operations; while when network conditions are simple, a shorter delay time can be set to speed up recovery.

[0105] The delay time can be manually set by a network administrator. Alternatively, for example, the monitoring device can dynamically determine the delay time based on factors such as the stability of network traffic, the performance of network devices, and the duration of the main link recovery.

[0106] After the delay ends, the monitoring device will set the backup port corresponding to the backup link to a blocked state. At this time, the backup link no longer forwards data traffic, and data traffic is forwarded through the main link, avoiding repeated forwarding or redundant traffic between the backup link and the main link.

[0107] In the above embodiment, by introducing a delay mechanism, the delay duration is dynamically configured according to network requirements to ensure a smooth transition of link switching, avoid premature or too frequent link state switching, and effectively improve network stability.

[0108] In a ring network or link backup scenario, when the main link fails, it is necessary to quickly switch to the backup link to ensure communication continuity. During the switching process, how to select the appropriate backup link becomes a key issue. Usually, there are multiple links to choose from among the backup links, so it is necessary to determine the priority according to certain rules, or rely on the ring network protocol to preset the priority and selection strategy of the backup link. Through this method, the ring network system can intelligently and quickly switch to the most suitable backup link when the main link fails to optimize network performance and stability.

[0109] To this end, when multiple backup links are set between the monitoring device and the detection device, after monitoring the failure of the main link, the above method also includes: determining the backup link to be learned by the equipment in the maintenance domain from the multiple backup links according to the priority corresponding to each of the multiple backup links; or, using the backup link determined by the ring network protocol when the network is initialized as the backup link to be learned.

[0110] Assume that there are multiple backup links in the network. These backup links form a ring network topology together with the main link to provide redundancy and backup support. The monitoring device in the network is responsible for detecting the status of the main link and selecting a suitable backup link when the main link fails. The backup link can be selected according to a certain priority to ensure that the most efficient and stable communication path is maintained in the network.

[0111] One way is that each backup link can be marked according to its priority. For example, a backup link with a high priority usually provides higher bandwidth, lower latency or other better network performance indicators. In this case, the monitoring device evaluates the most suitable backup link as the target backup link in real time according to the priority of each current backup link. Exemplarily, the priority of the backup link can be determined based on one or more of the path length, link bandwidth or latency. In some embodiments, when a higher priority backup link fails, the monitoring device can automatically select a backup link with the next priority.

[0112] Another way is to predetermine fixed backup links through a ring network protocol (such as STP or RSTP). In this case, the monitoring device will use the backup link selected by the ring network protocol as the backup link to be learned, without the need to evaluate the priority of the backup link in real time, simplifying the backup link selection process. The ring network protocol will calculate the activation order of the backup links based on one or more of the path cost and bridge priority. For example, a link with a high bandwidth has a smaller path cost and will be activated first. The monitoring device can determine the backup link to be learned according to the activation order.

[0113] In the above embodiment, by selecting the backup link to be learned according to the priority of the backup link, the monitoring device can automatically select the most suitable backup link, realize intelligent switching, reduce unnecessary message propagation, thereby reducing network load, and accurately control which devices need to update configuration information to optimize network performance; by defining the priority of the backup link in advance or relying on the ring network protocol to automatically determine the backup link, the decision time for link selection is reduced, the switching efficiency of the backup link is improved, and the service interruption time is reduced.

[0114] Based on the same inventive concept, an embodiment of the present application also provides a ring network system, which includes at least one maintenance domain, and each maintenance domain is distinguished by different maintenance domain identifiers and maintenance association identifiers. Each maintenance domain is configured with a monitoring device in any of the above embodiments. Each maintenance domain is also configured with a detection device; wherein different maintenance domains are respectively configured with their own detection devices; or, different maintenance domains share the same detection device. Among them, the detection device sends a detection message to the network device in the ring network according to a preset period. When the monitoring device receives the detection message, it determines that the main link is normal and the data traffic is forwarded through the main link. When the monitoring device does not receive the detection message within the preset time period, it determines that the main link has failed. When the monitoring device detects that the main link has failed, the monitoring device sends a clearing message to the device in the maintenance domain to notify the device in the maintenance domain to clear the configuration information of the main link stored in itself. Afterwards, the monitoring device sends a request message to the device in the maintenance domain, and the request message is used to instruct the device in the maintenance domain to store the configuration information of the backup link to relearn the configuration information of the backup link, and return a response message to switch the communication connection between the monitoring device and the detection device from the main link to the backup link.

[0115] When the monitoring device detects that the main link has returned to normal, the monitoring device resets the backup link to a blocked state to prevent data traffic from being forwarded from the backup link. In addition, the monitoring device sends a clear table message to the devices in the maintenance domain again to notify the devices in the maintenance domain to clear the configuration information of the backup link stored in themselves.

[0116] Afterwards, the monitoring device sends a request message to the device in the maintenance domain again. The request message is used to instruct the device in the maintenance domain to store the configuration information of the main link to relearn the configuration information of the main link, and return a response message to switch the communication connection between the monitoring device and the detection device from the backup link to the main link.

[0117] In a specific example, when the network is initialized, the same maintenance domain, maintenance association and level are configured for the detection device and the detection device. The detection device is configured with a sending interval time and a detection port, and the monitoring device is configured with a maintenance endpoint identifier, a main port and a backup port. After the network initialization is completed, the detection device periodically sends a detection message according to the set detection time, regardless of whether the other end has a reply, and only sends but does not receive. After the main port of the monitoring device receives the detection message, it sets the backup link to a blocking state to prevent the message from being forwarded from the backup link. When the main port of the monitoring device does not receive the detection message, the monitoring device switches the backup port from a blocking state to a forwarding state, and sends a clearing message to clear the configuration information such as ARP and MAC table entries of all devices in the current network and relearn, thereby realizing a fast switch between the main link and the backup link. When the monitoring device detects that the main link resumes communication, the monitoring device sets the backup link to a blocking state again, and sends a clearing message again to clear the configuration information such as ARP and MAC table entries of all devices in the current network and relearn. In some embodiments, a delay mechanism can also be introduced, that is, the backup link is switched to a blocking state after a certain delay, effectively avoiding link switching oscillations and preventing the main link and backup link from switching too frequently, causing unnecessary network fluctuations, thereby improving network stability.

[0118] The ring network link switching method provided in the embodiment of the present application can be executed by a ring network link switching device. In the embodiment of the present application, the ring network link switching device executing the ring network link switching method is taken as an example to illustrate the ring network link switching device provided in the embodiment of the present application.

[0119] The present application also provides a ring network link switching device, which is applied to a switching device. Figure 5 As shown, the ring network link switching device includes a table clearing message module 501 and a request message module 502. Among them:

[0120] The table clearing message module 501 is used to send a table clearing message to the maintenance domain in which it is located when detecting that the main link fails, so as to instruct the devices in the maintenance domain to clear the configuration information of the main link.

[0121] The request message module 502 is used to send a request message to the maintenance domain to instruct the devices in the maintenance domain to learn the configuration information of the backup link so that the communication connection with the detection device is switched from the main link to the backup link.

[0122] According to the ring network link switching device provided in the embodiment of the present application, when the failure of the main link is detected, a clearing message is sent to the maintenance domain where it is located, thereby instructing the devices in the maintenance domain to clear the configuration information of the main link, and to re-learn the correct path and configuration information of the target backup link, thereby avoiding path errors or forwarding table confusion; and then instructing the devices in the maintenance domain to re-learn the configuration information of the backup link through a request message. Therefore, through the collaborative mechanism of the clearing message and the request message, rapid switching from the main link to the backup link is achieved, thereby ensuring high availability, stability and reliability of the network, and being suitable for link protection and fault recovery scenarios under various ring network topologies.

[0123] In some embodiments, the request message module is also used to broadcast the request message to the maintenance domain when the monitoring device and the detection device are in the same network; when the monitoring device and the detection device are in different networks, unicast the request message to the adjacent device; wherein the request message is passed from the adjacent device to the next device in sequence until all devices in the maintenance domain receive the request message.

[0124] In some embodiments, the detection device sends detection messages to one or more maintenance domains according to a preset period, and the detection messages corresponding to different maintenance domains are distinguished by the maintenance domain information carried; the above-mentioned device also includes a monitoring module, which is used to extract the maintenance domain information carried in the received detection message when any detection message is received; match the extracted maintenance domain information with the maintenance domain information configured by itself, and when the match is consistent, determine the status of the main link based on the received detection message.

[0125] In some embodiments, the maintenance domain information includes at least a maintenance domain identifier and a maintenance association identifier; the monitoring module is also used to determine a match when the extracted maintenance domain identifier matches the maintenance domain identifier configured by itself, and the extracted maintenance association identifier matches the maintenance association identifier configured by itself.

[0126] In some embodiments, the monitoring device is configured with at least one service; the maintenance domain information also includes a maintenance domain level, and different maintenance domain levels indicate different business scenarios; the above-mentioned device also includes a business module, which is used to determine the business scenario indicated by the maintenance domain level when a match is determined to be consistent; and switch between the main link and the backup link under the indicated business scenario.

[0127] In some embodiments, the clearing message module is also used to send a clearing message to the maintenance domain again when it monitors that the main link has returned to normal, so as to instruct the devices in the maintenance domain to clear the configuration information of the backup link; the request message is also used to send a request message to the maintenance domain to instruct the devices in the maintenance domain to learn the configuration information of the main link, so that the communication connection with the detection device is switched back from the backup link to the main link.

[0128] In some embodiments, the monitoring device is configured with a main link port and a backup link port; the above-mentioned device also includes a port module, which is used to set the backup link port to a blocking state when the main link is monitored to be normal; when the main link is monitored to fail, the backup link port is converted from a blocking state to a forwarding state; when the main link is monitored to return to normal, the backup link port is reset to a blocking state.

[0129] In some embodiments, the port module is further used to reset the standby link to a blocked state after a preset delay period; wherein the delay period is dynamically configured based on network demand.

[0130] In some embodiments, multiple backup links are set between the monitoring device and the detection device; the above-mentioned device also includes a link determination module, which is used to determine the backup link to be learned by the equipment in the maintenance domain from the multiple backup links according to the priority corresponding to each backup link in the multiple backup links; or, the backup link determined by the ring network protocol when the network is initialized is used as the backup link to be learned.

[0131] The ring network link switching device in the embodiment of the present application can be a computer device, or a component in the computer device, such as an integrated circuit or a chip. The computer device can be a switch or a router. Exemplarily, the computer device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted computer device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR) / virtual reality (Virtual Reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (Ultra-mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television (Television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0132] The ring network link switching device in the embodiment of the present application may be a device having an operating system. The operating system may be a Microsoft (Windows) operating system, an Android (Android) operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0133] The ring network link switching device provided in the embodiment of the present application can achieve Figure 2 or Figure 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0134] In some embodiments, Figure 6 As shown, the embodiment of the present application also provides a computer device 600, including a processor 601, a memory 602, and a computer program stored in the memory 602 and executable on the processor 601. When the program is executed by the processor 601, each process of the above-mentioned method embodiments is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0135] It should be noted that the computer device in the embodiment of the present application includes the mobile computer device and the non-mobile computer device mentioned above.

[0136] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned ring network link switching method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0137] The processor is the processor in the computer device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0138] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned ring network link switching method when executed by a processor.

[0139] The processor is the processor in the computer device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0140] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned ring network link switching method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0141] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0142] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0144] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0145] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0146] Unless otherwise specified, all embodiments and optional embodiments of the present application can be combined with each other to form a new technical solution.

[0147] Unless otherwise specified, all technical features and optional technical features of this application can be combined with each other to form a new technical solution.

[0148] If there is no special explanation, all steps of the present application can be performed sequentially or randomly, preferably sequentially. For example, the method includes steps (a) and (b), which means that the method may include steps (a) and (b) performed sequentially, or may include steps (b) and (a) performed sequentially. For example, it is mentioned that the method may also include step (c), which means that step (c) can be added to the method in any order. For example, the method may include steps (a), (b) and (c), or may include steps (a), (c) and (b), or may include steps (c), (a) and (b), etc.

[0149] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A ring network link switching method, characterized in that: Applied to a monitoring device, the monitoring device is provided with a main link and a backup link between the monitoring device and the detection device in a ring network; the method comprises: When a failure of the main link is detected, a clearing message is sent to the maintenance domain to instruct the devices in the maintenance domain to clear the configuration information of the main link; A request message is sent to the maintenance domain to instruct the devices in the maintenance domain to learn the configuration information of the backup link, so that the communication connection with the detection device is switched from the main link to the backup link.

2. The method according to claim 1, characterized in that The sending of the request message to the maintenance domain includes: When the monitoring device and the detection device are in the same network, broadcasting the request message to the maintenance domain in which they are located; When the monitoring device and the detection device are in different networks, a request message is unicasted to an adjacent device; wherein the request message is sequentially transmitted from the adjacent device to the next device until all devices in the maintenance domain receive the request message.

3. The method according to claim 1, characterized in that The detection device sends a detection message to one or more maintenance domains according to a preset period, and the detection messages corresponding to different maintenance domains are distinguished by the maintenance domain information carried; the method also includes: When any detection message is received, the maintenance domain information carried in the received detection message is extracted; The extracted maintenance domain information is matched with the maintenance domain information configured by itself, and when the two are matched, the state of the primary link is determined based on the received detection message.

4. The method according to claim 3, characterized in that The maintenance domain information at least includes a maintenance domain identifier and a maintenance association identifier; the method further includes: When the extracted maintenance domain identifier matches the self-configured maintenance domain identifier, and the extracted maintenance association identifier matches the self-configured maintenance association identifier, it is determined that the match is consistent.

5. The method according to claim 3 or 4, characterized in that: The monitoring device is configured with at least one service; the maintenance domain information further includes a maintenance domain level, and different maintenance domain levels respectively indicate different service scenarios; the method further includes: If a match is determined, determining the business scenario indicated by the maintenance domain level; And switching between the main link and the backup link is performed under the indicated service scenario.

6. The method according to claim 1, characterized in that The method further comprises: When it is detected that the main link has returned to normal, a clearing message is sent again to the maintenance domain to instruct the devices in the maintenance domain to clear the configuration information of the standby link; A request message is sent to the maintenance domain to instruct the devices in the maintenance domain to learn the configuration information of the main link, so that the communication connection with the detection device is switched from the backup link to the main link again.

7. The method according to any one of claims 1 to 5, characterized in that The monitoring device is configured with a main link port and a backup link port; the method further comprises: When the primary link is detected to be normal, the backup link port is set to a blocked state; In the case of detecting that the primary link fails, converting the backup link port from the blocking state to the forwarding state; When it is detected that the main link is restored to normal, the backup link port is reset to a blocking state.

8. The method according to claim 7, characterized in that The resetting the standby link port to a blocking state comprises: After a preset delay time, the standby link port is reset to a blocked state; wherein the delay time is dynamically configured based on network demand.

9. The method according to claim 1 or 5, characterized in that: A plurality of backup links are provided between the monitoring device and the detection device; the method further comprises: determining, from the plurality of backup links, a backup link to be learned by the device in the maintenance domain according to the priorities respectively corresponding to the backup links in the plurality of backup links; or The backup link determined by the ring network protocol during network initialization is used as the backup link to be learned.

10. A ring network system, characterized in that: The ring network system includes at least one maintenance domain, each maintenance domain is configured with a monitoring device, and the monitoring device is used to execute and implement the ring network link switching method according to any one of claims 1-9.

11. The system according to claim 10, characterized in that The maintenance domain is also configured with a detection device; wherein different maintenance domains are respectively configured with their own detection devices; or different maintenance domains share the same detection device.

12. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the ring network link switching method according to any one of claims 1 to 9 is implemented.

13. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the ring network link switching method according to any one of claims 1 to 9 is implemented.

Citation Information

Cited By

  • Link aggregation control method and system for switch SFP (Small Form-factor Pluggable) optical module

    CN122093308A

  • A method and system for link aggregation control of a switch SFP optical module

    CN122093308B