A port state processing method, device and medium for avoiding link swing

By identifying and counting link oscillations at the network interfaces of the switch, the problem of unnecessary interface protection caused by slow fiber optic cable insertion was solved, ensuring network stability and normal connectivity.

CN116471208BActive Publication Date: 2026-06-26INSPUR NETWORK TECH (SHANDONG) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR NETWORK TECH (SHANDONG) CO LTD
Filing Date
2023-05-17
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies, when detecting link swing suppression (Errdisable), may cause unnecessary interface protection when configuring interfaces during slow fiber insertion, making it difficult to achieve the expected interface state and affecting normal network connectivity.

Method used

By identifying the line transmission status of the network interface of the switch, identifying link oscillation status, and continuously detecting and counting port events, the Errdisable module distinguishes between necessary and unnecessary network faults, enhances its judgment capability, and avoids unnecessary port dead states.

Benefits of technology

It effectively avoids unnecessary port dead states, saves effort in troubleshooting error states, maintains the stability and robustness of network communication, and ensures normal network connectivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116471208B_ABST
    Figure CN116471208B_ABST
Patent Text Reader

Abstract

The application discloses a port state processing method and device for avoiding link swing, and a medium, belongs to the technical field of switch port state, and is used for solving the technical problem that the configuration interface is easy to cause unnecessary interface protection and difficult to achieve the expected interface state when the fiber is slowly inserted, and is not conducive to protecting the normal connection of the network. The method comprises the following steps: identifying the line transmission state of the network interface of the switch to obtain a link oscillation state based on the network interface; continuously detecting the port event corresponding to the link oscillation state to obtain network link determination result information; if the network link determination result information is abnormal link oscillation, performing timing judgment on the port event related to the counting mechanism to obtain timing result information; and performing module judgment on the false death state of the port event to obtain network fault information, so as to determine whether the network of the switch is connected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of switch port status, and in particular to a port status processing method, device and medium for avoiding link sway. Background Technology

[0002] Based on Errdisable (false dead state) link oscillation detection technology, the industry primarily uses Errdisable to protect systems by disabling abnormal interfaces. Normally, if a switch is operating normally, its port entry will show as enabled. However, if the switch software detects errors on a port, the port will be randomly shut down. In other words, when the switch's operating system detects an error event on a port, the switch will automatically shut it down. When a port is in the Errdisable state, no traffic will be forwarded from that port, and no inbound traffic will be received. This can be seen using commands like `show interfaces`. The two functions of Errdisable are: 1. Informing the administrator of port status errors. 2. Preventing irreversible damage to the entire system due to a single port's error.

[0003] With the existing Errdisable module for detecting link sway, for example, if an interface is configured to detect 5 link sway events within 10 seconds, the Errdisable module will set the interface to the Errdisable state to prevent frequent up / down events and protect the network. However, if a fiber is slowly inserted under this configuration, the interface will also receive a large number of up / down events in a short period of time, causing the port to be set to the Errdisable state, resulting in unnecessary interface protection and making it difficult to achieve the expected interface state. Summary of the Invention

[0004] This application provides a port status processing method, device, and medium for avoiding link sway, which solves the following technical problem: In the case of existing link sway detection and Errdisable, configuring the interface when slowly inserting optical fiber can easily cause unnecessary interface protection, making it difficult to achieve the expected interface status and hindering the normal connectivity of the network.

[0005] The embodiments of this application adopt the following technical solutions:

[0006] On one hand, embodiments of this application provide a port state processing method for avoiding link oscillation, including: identifying the line transmission state of the network interface of a switch to obtain a link oscillation state based on the network interface; continuously detecting port events corresponding to the link oscillation state to obtain network link determination result information; wherein the network link determination result information includes: normal transmission link oscillation and abnormal transmission link oscillation; if the network link determination result information is abnormal link oscillation, then performing a timing judgment on the port events based on a counting mechanism to obtain timing result information; based on the timing result information, performing a module judgment on the port events for a "fake dead" state to obtain network fault information, so as to determine whether the switch is connected; wherein the network fault information includes: necessary network faults and unnecessary network faults.

[0007] This application embodiment classifies and identifies Errdisable (false dead state) link oscillations on the network interfaces of the switch, effectively handling the state of ports in error states. This ensures that when a large number of port up / down events are triggered during the slow insertion of optical fibers, the configured interface will no longer be set to the Errdisable state, thus saving users the effort to resolve error states. Furthermore, before the Errdisable module processes port events, a functional module for judging abnormal port event states is added. When unnecessary link oscillation information is received, the normal network communication ports are guaranteed, maintaining the stability and robustness of the network topology, eliminating unnecessary interface protection, and more efficiently protecting the normal network connectivity.

[0008] In one feasible implementation, the network interface of the switch is subjected to line transmission status identification to obtain the link oscillation status based on the network interface. Specifically, this includes: using the switch's link-flap detection technology to perform continuous transmission detection on the line transmission status of the data flow in the network interface to obtain continuous data transmission information; wherein, the continuous data transmission information includes: irregular intermittent transmission information, regular intermittent transmission information, and continuous transmission information; based on the continuous data transmission information, the link oscillation status of the network interface is determined.

[0009] In one feasible implementation, before continuously detecting the port events corresponding to the link oscillation state to obtain network link determination result information, the method further includes: identifying and extracting irregular intermittent transmission information and regular intermittent transmission information in the link oscillation state; performing event reporting processing on the port events corresponding to the irregular intermittent transmission information and the port events corresponding to the regular intermittent transmission information to obtain reported port events; wherein, the port events are port up / down events.

[0010] In one feasible implementation, continuous detection of port events corresponding to the link oscillation state is performed to obtain network link determination result information. Specifically, this includes: based on the triggered reported port events, identifying the relevant settings of the link oscillation in the port events corresponding to the link oscillation state, and determining the port up / down events that can be restored; based on the repeated continuity of the determined port up / down events, detecting and judging the existence of link oscillation fault in the reported port events, and obtaining the network link determination result information.

[0011] In one feasible implementation, if the network link determination result information is abnormal link oscillation, then the port events are subject to a timing judgment based on a counting mechanism to obtain timing result information. Specifically, this includes: judging the continuity of time points and event response counts for the port events corresponding to the abnormal link oscillation according to a preset timer and a counting mechanism; if the time point is greater than a first preset time point and each time point has a corresponding event response, then the port events corresponding to the abnormal link oscillation are determined as timing passed information; if the time point is less than or equal to the first preset time point or each time point has a non-one-to-one event response, then the port events corresponding to the abnormal link oscillation are determined as timing failed information; wherein, the timing result information consists of the timing passed information and the timing failed information.

[0012] In one feasible implementation, after determining the port event corresponding to the abnormal link oscillation as timing failure information, the specific steps include: if the port event corresponding to the abnormal link oscillation is determined to be timing failure information, then determining whether there is a corresponding event response at each time point; if there is a one-to-one corresponding time response at each time point, then the time point is incremented, and the continuity of the time point and the number of event responses is determined for the port event after the time point is incremented, and this process is repeated until the time point is greater than a first preset time point and each time point has a one-to-one corresponding event response, thus obtaining the timing success information.

[0013] In one feasible implementation, based on the timing result information, a module for determining the "dead state" of the port event is used to obtain network fault information, thereby determining whether the network is connected to the switch. Specifically, this includes: based on the timing pass information in the timing result information and according to the Errdisable module, a module triggering determination for the "dead state" of the port event is performed; wherein, the "dead state" is a mechanism for closing abnormal network interfaces based on the Errdisable module; if the port event has triggered the port setting corresponding to the "dead state," then the network port of the port event is determined to be in an Errdisable "dead state," thereby denying the corresponding network connection in the switch; if the port event has not triggered the port setting corresponding to the "dead state," then the network port of the port event is not subject to Errdisable "dead state" control, thereby allowing the corresponding network connection in the switch to be maintained.

[0014] In one feasible implementation, the port event has triggered the port setting corresponding to the dead state, specifically including: if the port event based on the timed information triggers a corresponding number of port up / down events within a preset time period, then the port event is processed to set the port.

[0015] Secondly, embodiments of this application also provide a port state processing device for avoiding link sway, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to execute a port state processing method for avoiding link sway as described in any of the above embodiments.

[0016] Thirdly, embodiments of this application also provide a non-volatile computer storage medium, characterized in that the storage medium is a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores at least one program, each program including instructions, and when the instructions are executed by a terminal, the terminal executes a port state processing method for avoiding link sway as described in any of the above embodiments.

[0017] This application provides a port status processing method, device, and medium for avoiding link oscillations. By classifying and identifying Errdisable (false dead state) link oscillations on the network interfaces of the switch, it can effectively process the status of ports in error states. This ensures that when a configuration interface is slowly inserted into the fiber optic cable, triggering a large number of port up / down events, it will no longer be set to the Errdisable state, thus saving users the effort to resolve error states. Furthermore, before the Errdisable module processes port events, a functional module for judging abnormal port event states is added. When unnecessary link oscillation information is received, it ensures normal network communication ports, maintains the stability and robustness of the network topology, eliminates unnecessary interface protection, and more efficiently protects the normal network connectivity. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0019] Figure 1 A flowchart of a port state processing method for avoiding link sway provided in an embodiment of this application;

[0020] Figure 2 A schematic diagram illustrating the workflow of a port status-based judgment module provided in this application embodiment;

[0021] Figure 3 This is a schematic diagram of a port status processing device for avoiding link sway provided in an embodiment of this application. Detailed Implementation

[0022] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0023] This application provides a port state handling method to avoid link sway, such as... Figure 1 As shown, the port state handling method to avoid link sway specifically includes steps S101-S104:

[0024] It's important to note that, under normal circumstances, the existing link-flap detection in the switch is sufficient to handle ports in error states. This involves changing the state of previously up ports to Errdisable to prevent a large number of up / down events from affecting other functional modules and causing system failures. However, when fiber optic modules are slowly inserted into the interface, glitches may be generated, resulting in intermittent up / down signals. Without intervention, these signals cannot recover automatically, causing the port to repeatedly receive a large number of up / down events. This puts the desired port into an Errdisable state, creating a false dead state. In this case, we need to manually handle the Errdisable state, leading to unnecessary state changes and increased workload.

[0025] S101. Identify the line transmission status of the network interface of the switch to obtain the link oscillation status based on the network interface.

[0026] Specifically, the link-flap detection technology of the switch is used to detect the continuous transmission status of data flow in the network interface, obtaining continuous data transmission information. This continuous data transmission information includes: irregular intermittent transmission information, regularly intermittent transmission information, and continuous transmission information. Then, based on this continuous data transmission information, the link oscillation state of the relevant network interface is determined.

[0027] In one embodiment, Figure 2 This application provides a schematic diagram of the workflow of a port status-based judgment module, as shown in the embodiments below. Figure 2 As shown, before the port up / down event is reported, the network interface in the switch used for network data transmission is tested for whether the data is transmitted continuously, and the irregular intermittent transmission information, the regular intermittent transmission information, and the continuous transmission information are determined.

[0028] S102. Continuously detect the port events corresponding to the link oscillation state to obtain network link determination result information. This network link determination result information includes: normal transmission link oscillation and abnormal transmission link oscillation.

[0029] Specifically, the system identifies and extracts both irregular and regular intermittent transmission information from the link oscillation state. The port events corresponding to the irregular and regular intermittent transmission information are then processed for event reporting to obtain reported port events. These port events are port up / down events.

[0030] Furthermore, based on the triggered reported port events, the port events corresponding to the link oscillation state are identified to determine the port up / down events that can be restored.

[0031] Furthermore, based on the determined recurrence of port up / down events, the existence of link oscillation faults is detected and judged for the reported port events, and network link determination results are obtained.

[0032] As a possible implementation method, such as Figure 2 As shown, by identifying and extracting irregular and regular intermittent transmission information in the link oscillation state, port events corresponding to the link oscillation state that may have necessary or unnecessary faults are reported, which is beneficial for subsequent network fault determination related to the Errdisable state.

[0033] S103. If the network link determination result is abnormal link oscillation, then the port event is judged at regular intervals by the relevant counting mechanism to obtain the timing result information.

[0034] Specifically, based on a preset timer and a counting mechanism, the continuity of the port events corresponding to abnormal link oscillations is determined by the relevant time points and the number of event responses.

[0035] Furthermore, if the time point is greater than the first preset time point and there is a one-to-one corresponding event response for each time point, then the port event corresponding to the abnormal link oscillation is determined as timing pass information. If the time point is less than or equal to the first preset time point or there is a non-one-to-one corresponding event response for each time point, then the port event corresponding to the abnormal link oscillation is determined as timing fail information. The timing result information consists of timing pass information and timing fail information.

[0036] Specifically, after identifying the port event corresponding to abnormal link oscillation as a timing failure message, the process includes: if the port event corresponding to abnormal link oscillation is identified as a timing failure message, then it is determined whether there is a corresponding event response at each time point. If there is a one-to-one corresponding time response at each time point, the time point is incremented, and the continuity of the time point and the number of event responses is judged for the port event after the incremented time point. This process is repeated until the time point is greater than a first preset time point and each time point has a one-to-one corresponding event response, thus obtaining a timing success message.

[0037] In one embodiment, such as Figure 2As shown, a three-second timer and a counting mechanism are used to check for up / down events on the port every second within those three seconds. If up / down events occur for three consecutive seconds, we can consider that the network line has failed and allow it to proceed to the normal Errdisable module for processing, setting the corresponding port to the Errdisable state. For up / down events where the count is less than or equal to 3 seconds, the count is incremented for each matching up / down event, and this process is repeated until the time interval exceeds 3 seconds and each time interval has a corresponding event response, thus obtaining the timing pass information.

[0038] S104. Based on the timing results, the module judges the port event in a "fake dead" state to obtain network fault information, thereby determining whether the switch is connected. The network fault information includes both necessary and unnecessary network faults.

[0039] Specifically, based on the timing pass information in the timing result information, and according to the Errdisable module, the module triggers a judgment on the port event in a "fake dead" state. The "fake dead" state is a mechanism for closing abnormal network interfaces based on the Errdisable module.

[0040] Furthermore, if a port event has triggered the port setting corresponding to the suspended state—that is, if a port event based on timed information triggers the corresponding number of port up / down events within a preset time period—then the port event will be set, and the network port of the port event will be determined to be in an Errdisable suspended state, so that the network in the switch will be denied the corresponding connection. If a port event has not triggered the port setting corresponding to the suspended state, then the network port of the port event will not be controlled to be in an Errdisable suspended state, so that the network in the switch will be allowed to connect accordingly.

[0041] In one embodiment, such as Figure 2 As shown, if a port event has triggered the port setting corresponding to the dead state, that is, if an up / down event occurs within 1 to 2 seconds based on the port event under the timed pass information, it will be considered an unnecessary network failure, and thus the Errdisable module will not be triggered to set the port to the Errdisable dead state, thereby ensuring normal network connectivity. Otherwise, the network port of the port event will be determined to be in the Errdisable dead state, so as to refuse the corresponding network connectivity processing in the switch.

[0042] In addition, embodiments of this application also provide a port state processing device to avoid link sway, such as... Figure 3 As shown, the port status processing device 300 for avoiding link sway specifically includes:

[0043] At least one processor 301. And a memory 302 communicatively connected to the at least one processor 301; wherein the memory 302 stores instructions executable by the at least one processor 301, enabling the at least one processor 301 to execute:

[0044] The network interface of the switch is used to identify the line transmission status, and the link oscillation status based on the network interface is obtained.

[0045] The port events corresponding to the link oscillation state are continuously detected to obtain network link determination results; the network link determination results include: normal transmission link oscillation and abnormal transmission link oscillation.

[0046] If the network link determination result is abnormal link oscillation, then the port event is timed and judged according to the relevant counting mechanism to obtain the timing result information;

[0047] Based on the timing results, the module judges the port event in a dead state to obtain network fault information, so as to determine whether the network is connected to the switch; the network fault information includes necessary network faults and unnecessary network faults.

[0048] This application provides a port status handling method, device, and medium to avoid link oscillations. By classifying and identifying Errdisable (false dead state) link oscillations on the network interfaces of the switch, it can effectively handle the status of ports in error states. This ensures that when a configuration interface is slowly inserted into the fiber optic cable, triggering a large number of port up / down events, it will no longer be placed in the Errdisable state, thus saving users the effort to resolve error states. Furthermore, before the Errdisable module processes port events, a functional module for judging abnormal port event states is added. When unnecessary link oscillation information is received, it ensures normal network communication ports, maintains the stability and robustness of the network topology, eliminates unnecessary interface protection, and more efficiently protects the normal network connectivity.

[0049] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for devices and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0050] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0051] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0052] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0053] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0054] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0055] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0056] The above description is merely an embodiment of this application and is not intended to limit this application. For those skilled in the art, various modifications and variations can be made to the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the embodiments of this application should be included within the scope of the claims of this application.

Claims

1. A port state processing method for avoiding link sway, characterized in that, The method includes: The network interface of the switch is used to identify the line transmission status, and the link oscillation status based on the network interface is obtained. Identify and extract irregular intermittent transmission information and regular intermittent transmission information in the link oscillation state; The port events corresponding to the irregular intermittent transmission information and the port events corresponding to the regular intermittent transmission information are processed for event reporting to obtain reported port events; wherein, the port events are port up / down events; Continuous detection of port events corresponding to the link oscillation state yields network link determination results; wherein, the network link determination results include: normal transmission link oscillation and abnormal transmission link oscillation, specifically including: Based on the triggered reported port event, the port events corresponding to the link oscillation state are identified by setting the relevant bit for the link oscillation, and the port up / down events that can be restored by setting the bit are determined. Based on the determined repetitive continuity of the port up / down events, the existence of link oscillation faults is detected and judged for the reported port events, and the network link judgment result information is obtained; If the network link determination result is abnormal link oscillation, then the port event is subject to a timing judgment based on the relevant counting mechanism to obtain timing result information; Based on the timing results, the module judges the port event in a dead state to obtain network fault information, so as to determine whether the network is connected to the switch; wherein, the network fault information includes necessary network faults and unnecessary network faults.

2. The port state processing method for avoiding link sway as described in claim 1, characterized in that, The network interface of the switch is used to identify the line transmission status, and the link oscillation status based on the network interface is obtained, specifically including: By using the link-flap detection technology of the switch, the continuous transmission status of the data flow in the network interface is detected to obtain continuous data transmission information; wherein, the continuous data transmission information includes: irregular intermittent transmission information, regular intermittent transmission information, and continuous transmission information. Based on the continuously transmitted data, the link oscillation state of the network interface is determined.

3. The port state processing method for avoiding link sway as described in claim 1, characterized in that, If the network link determination result is abnormal link oscillation, then the port event is subject to a timing judgment based on a relevant counting mechanism to obtain timing result information, specifically including: Based on a preset timer and counting mechanism, the continuity of the port events corresponding to the abnormal link oscillations is determined by the relevant time points and the number of event responses. If the time point is greater than the first preset time point and each time point has a corresponding event response, then the port event corresponding to the abnormal link oscillation is determined as the timing pass information; If the time point is less than or equal to the first preset time point or there are event responses that do not correspond one-to-one for each time point, then the port event corresponding to the abnormal link oscillation is determined as timing failure information; The timing result information consists of timing pass information and timing fail information.

4. A port state processing method for avoiding link swaying according to claim 3, characterized in that, After determining the port event corresponding to the abnormal link oscillation as a timing failure message, the specific details include: If the port event corresponding to the abnormal link oscillation is determined to be a timing failure message, then it is determined whether there is a corresponding event response at each time point; If each time point has a corresponding time response, the time point is incremented, and the continuity of the time point and the number of event responses is judged for the port events after the time point is incremented. This process is repeated until the time point is greater than the first preset time point and each time point has a corresponding event response, thus obtaining the timing information.

5. A port state processing method for avoiding link swaying according to claim 1, characterized in that, Based on the timing results, the module performs a dead state judgment on the port event to obtain network fault information, thereby determining whether the switch is connected to the network. Specifically, this includes: Based on the timing pass information in the timing result information, and according to the Errdisable module, the module trigger judgment of the port event in a dead state is performed; wherein, the dead state is the abnormal network interface shutdown mechanism based on the Errdisable module; If the port event has triggered the port setting corresponding to the dead state, then the network port of the port event is determined to be in the Errdisable dead state, so as to refuse the corresponding connection to the network in the switch. If the port event does not trigger the port setting corresponding to the dead state, then the network port of the port event will not be subject to Errdisable dead state control, so as to perform corresponding connectivity processing on the network in the switch.

6. A port state processing method for avoiding link swaying according to claim 5, characterized in that, The port event has triggered the setting of the port corresponding to the apparent dead state, specifically including: If a port up / down event is triggered a certain number of times within a preset time period based on the port event under the timed information, then the port event will be set.

7. A port state processing device for avoiding link sway, characterized in that, The device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform a port state processing method for avoiding link sway as described in any one of claims 1-6.

8. A non-volatile computer storage medium, characterized in that, The storage medium is a non-volatile computer-readable storage medium that stores at least one program, each program including instructions that, when executed by a terminal, cause the terminal to perform a port state processing method for avoiding link sway as described in any one of claims 1-6.