Port exception processing method and device, equipment, medium and program product

By obtaining the number of abnormal SerDes channels and negotiating the target port rate, the network service anomaly caused by the abnormality of 800G Ethernet multi-channel ports was resolved, and the continuity and stability of services were achieved.

CN121509288APending Publication Date: 2026-02-10中国移动通信集团江西有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511817497.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

In 800G Ethernet network applications, when multiple channel ports malfunction, existing technologies cannot effectively handle the situation, leading to a high probability of network service disruptions.

Method used

By obtaining the number of abnormal SerDes channels, the target port rate is determined, and the first and second terminal devices negotiate to reduce the port rate to continue operation, avoiding direct port shutdown.

Benefits of technology

This reduces the probability of network service anomalies, ensures service continuity and stability, and maximizes the utilization of unaffected SerDes channel resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121509288A_ABST
    Figure CN121509288A_ABST
Patent Text Reader

Abstract

The invention provides a port exception processing method and device, equipment, a medium and a program product, which are applied to the technical field of information security, and the method comprises the following steps: under the condition that a first message sent by second terminal equipment is received, obtaining the number of abnormal SerDes channels of the first terminal equipment; sending a second message to the second terminal device; receiving a third message sent by the second terminal device; and processing the port of the first terminal device based on the target port rate. In the method, under the condition that port SerDes channels of a first terminal device are sensed to be abnormal, the number of the abnormal SerDes channels is obtained, the target port rate can be determined according to the number of the abnormal SerDes channels, and ports of the first terminal device and a second terminal device are made to operate according to the target port rate, so that although the port rate is reduced, the port rate is not reduced, and the port rate of the first terminal device and the port rate of the second terminal device are not reduced. But business message abnormity can be reduced and uninterrupted business can be guaranteed so that probability of network business abnormity can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and in particular to a method, apparatus, device, medium and program product for handling port anomalies. Background Technology

[0002] Since the 1970s, Ethernet has flexibly met the growing demand for faster technology, demonstrating its revolutionary significance in the global interconnected landscape. The introduction of 800G Ethernet meets the mandatory requirements for effectively processing and transmitting high-performance applications. 800G Ethernet is the foundational technology for realizing 800G pluggable modules. Its superior flexibility, speed negotiation, backward compatibility, and versatility in utilizing various media make it the ideal choice for network technology. Statistics released at the 2022 OCP (Open Compute Project) Summit indicate that by 2025, 800G pluggable devices will surpass their 400G counterparts.

[0003] The implementation of 800G Ethernet relies on eight channels, each operating at a speed of 100Gb / s. This 800G architecture introduces new Media Access Control (MAC) and Physical Coding Sublayer (PCS) to ensure seamless compatibility with current physical layer specifications.

[0004] In current network applications, there are no clear requirements or standards for handling anomalies in one or more channels of multi-channel (SerDes channel) port modes, such as 400G and 800G Ethernet. Therefore, channel anomalies directly lead to the entire port malfunctioning, impacting network services and causing packet loss or handover protection actions. Consequently, existing Ethernet port channel anomalies present a high probability of network service disruptions due to the inability to handle them effectively. Summary of the Invention

[0005] This application provides a method, apparatus, device, medium, and program product for handling port anomalies, which can solve the problem that when a port channel is abnormal, the inability to process the port channel leads to a high probability of network service anomalies.

[0006] In a first aspect, embodiments of this application provide a method for handling port anomalies, the method comprising: Upon receiving a first message from the second terminal device, the number of abnormal serializer / deserializer SerDes channels of the first terminal device is obtained. The first message is used to indicate that there is an abnormality in the service message, and the service message is the message sent by the first terminal device to the second terminal device. Send a second message to the second terminal device, the second message being used to indicate the number of abnormal SerDes channels; The system receives a third message sent by the second terminal device, the third message being used to indicate the target port rate of the first terminal device and the second terminal device, the target port rate being determined based on the number of abnormal SerDes channels; Based on the target port rate, the port of the first terminal device is processed.

[0007] Optionally, the target port rate is determined in the following manner: Obtain the total number of port SerDes channels, the calibrated operating rate of port SerDes channels, and the preset port rate set of the second terminal device; Based on the total number of SerDes channels on the port and the number of abnormal SerDes channels, determine the number of remaining available SerDes channels; Based on the number of remaining available SerDes channels and the calibrated operating rate, the target port rate is selected from the preset port rate set, wherein the target port rate is the maximum port rate that the second terminal device can match in the preset port rate set under the conditions of the number of remaining available SerDes channels and the calibrated operating rate.

[0008] Optionally, processing the port of the first terminal device based on the target port rate includes: Based on the target port rate, determine whether the SerDes channel of the first terminal device supports the target port rate, and obtain the determination result. If the determination result indicates that the port SerDes channel of the first terminal device supports the operation of the target port rate, the port SerDes channel of the first terminal device is controlled to operate at the target port rate. If the determination result indicates that the port SerDes channel of the first terminal device does not support the operation of the target port rate, the port of the first terminal device shall be shut down.

[0009] Optionally, the method further includes: Monitor the duration of the first terminal device from the first moment to the second moment, and if the duration exceeds the preset channel shutdown duration, shut down the port of the first terminal device; Wherein, the first moment is the moment when the first terminal device receives the first message, and the second moment is the moment when the judgment result is obtained.

[0010] Secondly, embodiments of this application also provide a method for handling port anomalies, applied to a second terminal device, the method comprising: In the event that a service message sent by the first terminal device is abnormal, a first message is sent to the first terminal device, the first message being used to indicate that a service message sent by the first terminal device to the second terminal device is abnormal. Receive a second message sent by the first terminal device, the second message being used to indicate the number of abnormal SerDes channels; A third message is sent to the first terminal device, the third message being used to indicate the target port rate of the first terminal device and the second terminal device, the target port rate being determined based on the number of abnormal SerDes channels; The port of the second terminal device is processed based on the target port rate.

[0011] Optionally, after receiving the second message sent by the first terminal device, the method further includes: Obtain the total number of port SerDes channels, the calibrated operating rate of port SerDes channels, and the preset port rate set of the second terminal device; Based on the total number of SerDes channels on the port and the number of abnormal SerDes channels, determine the number of remaining available SerDes channels; Based on the number of remaining available SerDes channels and the calibrated operating rate, the target port rate is selected from the preset port rate set, wherein the target port rate is the maximum port rate that the second terminal device can match in the preset port rate set under the conditions of the number of remaining available SerDes channels and the calibrated operating rate.

[0012] Thirdly, embodiments of this application also provide a port anomaly handling apparatus, the apparatus comprising: The first acquisition module is used to acquire the number of abnormal channels of the first terminal device when it receives a first message sent by the second terminal device. The first message is used to indicate that the service message sent by the first terminal device to the second terminal device is abnormal. The first sending module is used to send a second message to the second terminal device, the second message being used to indicate the number of abnormal channels; A first receiving module is configured to receive a third message sent by the second terminal device, the third message being used to indicate the target port rate of the first terminal device and the second terminal device, the target port rate being determined based on the number of abnormal channels; The first processing module is used to process the port of the first terminal device based on the target port rate.

[0013] Fourthly, embodiments of this application also provide a port anomaly handling apparatus, the apparatus comprising: The second sending module is used to send a first message to the first terminal device when the received service message sent by the first terminal device is abnormal. The first message is used to indicate that the service message sent by the first terminal device to the second terminal device is abnormal. The second receiving module is used to receive a second message sent by the first terminal device, the second message being used to indicate the number of abnormal channels; The third sending module is used to send a third message to the first terminal device. The third message is used to indicate the target port rate of the first terminal device and the second terminal device. The target port rate is determined based on the number of abnormal channels. The second processing module is used to process the port of the second terminal device based on the target port rate.

[0014] Fifthly, embodiments of this application also provide an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the port exception handling method as described in the first or second aspect.

[0015] Sixthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the port exception handling method as described in the first or second aspect.

[0016] A seventh aspect provides a computer program product including computer instructions that, when executed by a processor, implement the steps of a port exception handling method as described in the first or second aspect.

[0017] In this embodiment, upon receiving a first message from a second terminal device, the system acquires the number of abnormal serializer / deserializer SerDes channels of the first terminal device. The first message indicates that the service packets sent by the first terminal device to the second terminal device are abnormal. A second message is then sent to the second terminal device, indicating the number of abnormal SerDes channels. A third message is received from the second terminal device, indicating the target port rate for both the first and second terminal devices. The target port rate is determined based on the number of abnormal SerDes channels. Based on the target port rate, the port of the first terminal device is processed. Specifically, when the first terminal device receives the first message from the second terminal device and detects an abnormality in its port's SerDes channels, it does not immediately close the port. Instead, it sends the acquired information about the number of abnormal SerDes channels to the second terminal device. The target port rate can be determined based on the number of abnormal SerDes channels, causing both the first and second terminal devices to operate at the target port rate. While this reduces the port rate, it minimizes service packet abnormalities and ensures uninterrupted service. Therefore, the method in this embodiment can process the port channel when an anomaly occurs, thereby reducing the probability of network service anomalies. Attached Figure Description

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

[0019] Figure 1 This is one of the flowcharts of the port exception handling method provided in the embodiments of this application; Figure 2 This is a schematic diagram of the 800G optical module provided in an embodiment of this application; Figure 3 This is the second flowchart of the port anomaly handling method provided in the embodiments of this application; Figure 4 This is the third flowchart of the port anomaly handling method provided in the embodiments of this application; Figure 5 This application Figure 1 A structural diagram of the port anomaly handling device corresponding to the method of the illustrated embodiment; Figure 6 This application Figure 3 A structural diagram of the port anomaly handling device corresponding to the method of the illustrated embodiment; Figure 7 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] The technical solutions of 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, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] This application provides a method for handling port anomalies.

[0022] See Figure 1 , Figure 1 This is a flowchart illustrating the port anomaly handling method provided in this application embodiment, as shown below. Figure 1 As shown, it includes the following steps: Step 101: Upon receiving a first message from the second terminal device, obtain the number of abnormal serializer / deserializer (SerDes) channels of the first terminal device. The first message is used to indicate that there is an anomaly in the service message, and the service message is the message sent by the first terminal device to the second terminal device.

[0023] In this application, the method is described using an example where both the first and second terminal devices are 800G optical modules. Figure 2 As shown in the schematic diagram of the 800G optical module, the 800G optical module generally uses 8 serializer / deserializer (SerDes) channels to connect with the forwarding chip, and can be connected to the optical path externally through a clock and data recovery (CDR) chip.

[0024] Understandably, if any one of the eight SerDes channels (8×100G) of the first terminal device malfunctions, the service messages sent from the first terminal device to the second terminal device will be abnormal. The second terminal device will then send a local fault message, which it can use to send a first message (e.g., a remote fault message) to the first terminal device. In related technologies, if any SerDes channel malfunctions, regardless of whether other SerDes channels are available, that port will be shut down.

[0025] When the first terminal device receives the first message, the first terminal device can query the signal detection status of its own port and obtain the ID information of the channel (line) where the SerDes of the local device is abnormal through the signal detection mechanism of its own port, thereby obtaining the number of SerDes that are abnormal at this time.

[0026] Step 102: Send a second message to the second terminal device, the second message being used to indicate the number of abnormal SerDes channels.

[0027] After obtaining the number of abnormal SerDes channels, the first terminal device sends a second message to the second terminal device to indicate the number of abnormal SerDes channels.

[0028] Step 103: Receive a third message sent by the second terminal device. The third message is used to indicate the target port rate of the first terminal device and the second terminal device. The target port rate is determined based on the number of abnormal SerDes channels.

[0029] After receiving the second message, the second terminal device can determine the target port rate based on the number of abnormal SerDes channels. For example, the target port rate can be obtained by subtracting the rate corresponding to the number of abnormal SerDes channels from the rate of the total SerDes channels. It can be understood that the determined target port rate is the expected value of port speed reduction for the first terminal device and the second terminal device, but whether the two devices can achieve the target port rate still needs to be analyzed further.

[0030] After determining the target port rate, the second terminal device sends a third message to the first terminal device to indicate the target port rate.

[0031] Step 104: Process the port of the first terminal device based on the target port rate.

[0032] The first and second terminal devices can negotiate the target terminal rate. If the negotiation is successful, they will operate according to the new reduced port rate. In other words, in the event of a partial SerDes channel failure, the first and second terminal devices can negotiate to enable a backup operating mode of "low channel count, low rate," allowing the link to continue operating in a stable manner with lower bandwidth, thereby maximizing the utilization of remaining channel resources and ensuring uninterrupted service with minimal loss.

[0033] In the port anomaly handling method provided in this application embodiment, when a first terminal device receives a first message sent by a second terminal device to detect an anomaly in the SerDes channel of the first terminal device, it does not immediately close the port. Instead, it sends information about the number of abnormal SerDes channels to the second terminal device. Based on the number of abnormal SerDes channels, a target port rate can be determined, causing both the ports of the first and second terminal devices to operate at the target port rate. Although this reduces the port rate, it reduces service packet anomalies and ensures uninterrupted service. Therefore, the method of this embodiment can process port channels when anomalies occur to reduce the probability of network service anomalies.

[0034] Optionally, the target port rate is determined in the following manner: Obtain the total number of port SerDes channels, the calibrated operating rate of port SerDes channels, and the preset port rate set of the second terminal device; Based on the total number of SerDes channels on the port and the number of abnormal SerDes channels, determine the number of remaining available SerDes channels; Based on the number of remaining available SerDes channels and the calibrated operating rate, the target port rate is selected from the preset port rate set, wherein the target port rate is the maximum port rate that the second terminal device can match in the preset port rate set under the conditions of the number of remaining available SerDes channels and the calibrated operating rate.

[0035] In this embodiment, after obtaining the total number of port SerDes channels of the second terminal device, the remaining available SerDes channels of the second terminal device can be determined based on the number of abnormal SerDes channels, which is the same as the remaining available SerDes channels of the first terminal device.

[0036] The preset port rate set consists of multiple port rates pre-configured based on the device's physical performance and service requirements, such as 800G, 400G, and 100G. Assuming the rated operating rate is 100G, the method for selecting the target port rate from the preset port rate set based on the remaining available SerDes channels and the rated operating rate can be: When the number of abnormal channels is less than 4 but greater than 1, the speed is reduced to 400G; when the number of abnormal channels is greater than 4 but less than 6, the speed is reduced to 200G; when the number of abnormal channels is greater than 6 but less than 8, the speed is reduced to 100G; understandably, the speed is reduced to the maximum standard port rate that can be matched by the number of remaining available SerDes channels.

[0037] In this embodiment, the operating mode that the second terminal device can execute with the remaining available SerDes channels is selected from the preset port rate set based on the number of remaining available SerDes channels. In the subsequent negotiation process with the first terminal device, it is only necessary to determine whether the first terminal device can execute the operating mode of the target port rate, which can reduce the process of determining whether the second terminal device can execute the operating mode of the target port rate and improve the execution efficiency of the method.

[0038] Optionally, processing the port of the first terminal device based on the target port rate includes: Based on the target port rate, determine whether the SerDes channel of the first terminal device supports the target port rate, and obtain the determination result. If the determination result indicates that the port SerDes channel of the first terminal device supports the operation of the target port rate, the port SerDes channel of the first terminal device is controlled to operate at the target port rate. If the determination result indicates that the port SerDes channel of the first terminal device does not support the operation of the target port rate, the port of the first terminal device shall be shut down.

[0039] In this embodiment, based on the target port rate, it is determined whether the SerDes channel of the first terminal device supports the target port rate, and a determination result is obtained; this determination process may involve determining the following: Does the first terminal device have a pre-set working mode corresponding to the target port rate? For example, if the target port rate is 400G and the first terminal device can only support 800G full-channel mode, then the first terminal device and the second terminal device cannot work in the same mode. This can be understood as the two failing to negotiate and unable to establish a stable link. In this case, the port of the first terminal device is closed.

[0040] It should be noted that even if the first terminal device supports the working mode corresponding to the target port rate, in actual operation, situations may occur such as physical layer / Link Training failure or protocol incompatibility, which may cause the link to fail to be established. In these cases, the operation of closing the port of the first terminal device will be performed.

[0041] In this embodiment, when the first terminal device is able to execute the working mode corresponding to the target port rate, the SerDes channel of the first terminal device is controlled to operate at the target port rate, thereby reducing the port speed of the first and second terminal devices. Although the port rate is reduced, the stability of service operation can be improved. When the first terminal device cannot execute the working mode corresponding to the target port rate, the port of the first terminal device is closed. It should be noted that in the case of port channel abnormality, compared with the possibility of data misprocessing and overall network performance degradation caused by continuing to transmit service packets, directly closing the port avoids the degree of performance degradation.

[0042] Optionally, the method further includes: Monitor the duration of the first terminal device from the first moment to the second moment, and if the duration exceeds the preset channel shutdown duration, shut down the port of the first terminal device; Wherein, the first moment is the moment when the first terminal device receives the first message, and the second moment is the moment when the judgment result is obtained.

[0043] In this embodiment, upon receiving the first message sent by the second terminal device, time monitoring begins. Before obtaining the judgment result, if the duration exceeds the preset channel closure duration, the port of the first terminal device is directly closed. This can control the amount of data in the service packets transmitted by the first terminal device after a service anomaly occurs, so that network performance remains at a low level of degradation.

[0044] like Figure 3 As shown in the embodiment of this application, a method for handling port anomalies is also provided, applied to a second terminal device, including the following steps: Step 301: If the received service message sent by the first terminal device is abnormal, send a first message to the first terminal device. The first message is used to indicate that the service message is abnormal. The service message is the message sent by the first terminal device to the second terminal device. Step 302: Receive a second message sent by the first terminal device, the second message being used to indicate the number of abnormal SerDes channels; Step 303: Send a third message to the first terminal device. The third message is used to indicate the target port rate of the first terminal device and the second terminal device. The target port rate is determined based on the number of abnormal SerDes channels. Step 304: Process the port of the second terminal device based on the target port rate.

[0045] In this embodiment, when the second terminal device receives an abnormal service message from the first terminal device, it sends a first message to the first terminal device, causing the first terminal device to detect the abnormality of its port channel. The first terminal device obtains the number of abnormal SerDes channels, and the second terminal device receives a second message from the first terminal device indicating the number of abnormal SerDes channels. Based on the number of abnormal SerDes channels, the second terminal device can determine the target port rate and send a third message to the first terminal device indicating the target port rate. Depending on whether the first terminal device can execute the working mode of the target port rate, the port channel of the second terminal device can be slowed down according to the target port rate, or the port of the second terminal device can be closed.

[0046] Reducing the port rate can decrease service packet anomalies while ensuring uninterrupted service. Closing the port of the second terminal device prevents data from being mishandled and causing a continuous deterioration in overall network performance, which could result from continued transmission of service packets. Therefore, the method in this embodiment can process port channels when anomalies occur to reduce the probability of network service anomalies.

[0047] Optionally, after receiving the second message sent by the first terminal device, the method further includes: Obtain the total number of port SerDes channels, the calibrated operating rate of port SerDes channels, and the preset port rate set of the second terminal device; Based on the total number of SerDes channels on the port and the number of abnormal SerDes channels, determine the number of remaining available SerDes channels; Based on the number of remaining available SerDes channels and the calibrated operating rate, the target port rate is selected from the preset port rate set, wherein the target port rate is the maximum port rate that the second terminal device can match in the preset port rate set under the conditions of the number of remaining available SerDes channels and the calibrated operating rate.

[0048] The port anomaly handling method in this embodiment is similar to... Figure 1 The difference between the port exception handling methods in the illustrated embodiments lies in the different executing entities; the method steps executed correspond to each other, therefore the method in this embodiment can achieve... Figure 1 The full benefits of the method shown will not be elaborated here.

[0049] like Figure 4 As shown, for Figure 1 , Figure 3 The method for handling port anomalies in the embodiments is described in detail below: If an anomaly occurs in the channel of the first terminal device (local device), the service packets sent to the second terminal device (peer device) will also be anomaly. Upon detecting the signal anomaly, the second terminal device reports a local fault and sends a first message to the first terminal device, causing the first terminal device to generate a remote fault, thus making it aware of the channel anomaly. Subsequently, the first terminal device obtains the number of SerDes channel anomalies and sends a second message to the second terminal device indicating this number. Both the first and second terminal devices can determine the target port rate (negotiated rate after speed reduction) based on the number of SerDes channel anomalies, negotiating whether to reduce the speed based on whether the two target port rates are the same; alternatively, either the first or second terminal device can determine the target port rate based on the number of SerDes channel anomalies and then send the target port rate to the other for negotiation on whether to reduce the speed. If the negotiation is successful, both the first and second terminal devices operate at the target port rate; if the negotiation fails, the port channels of both the first and second terminal devices are closed. It should be noted that when the second terminal device detects an abnormal message, a preset channel closure duration can be set to delay closing the port; when the first terminal device receives the first message, a preset channel closure duration can be set to delay closing the port.

[0050] The port anomaly handling method of this application embodiment can perform corresponding speed reduction processing according to the number of anomalies when a port channel is abnormal. This allows SerDes channels that are not abnormal to continue to be used without consuming excessive device resources. It achieves automatic speed reduction and allows other SerDes channels that are not abnormal to continue to be used at reduced speed, thereby maximizing the utilization of port resources.

[0051] See Figure 5 , Figure 5 This is a structural diagram of a port anomaly handling device provided in an embodiment of this application. Figure 5 As shown, the device 500 includes: The first acquisition module 501 is used to acquire the number of abnormal channels of the first terminal device when it receives a first message sent by the second terminal device. The first message is used to indicate that the service message sent by the first terminal device to the second terminal device is abnormal. The first sending module 502 is used to send a second message to the second terminal device, the second message being used to indicate the number of abnormal channels; The first receiving module 503 is configured to receive a third message sent by the second terminal device, the third message being used to indicate the target port rate of the first terminal device and the second terminal device, the target port rate being determined based on the number of abnormal channels; The first processing module 504 is used to process the port of the first terminal device based on the target port rate.

[0052] Optionally, the target port rate is determined in the following manner: Obtain the total number of port SerDes channels, the calibrated operating rate of port SerDes channels, and the preset port rate set of the second terminal device; Based on the total number of SerDes channels on the port and the number of abnormal SerDes channels, determine the number of remaining available SerDes channels; Based on the number of remaining available SerDes channels and the calibrated operating rate, the target port rate is selected from the preset port rate set, wherein the target port rate is the maximum port rate that the second terminal device can match in the preset port rate set under the conditions of the number of remaining available SerDes channels and the calibrated operating rate.

[0053] Optionally, the first processing module 504 includes: The judgment unit is used to determine whether the SerDes channel of the first terminal device supports the target port rate based on the target port rate, and to obtain a judgment result; A first control unit is configured to control the SerDes channel of the first terminal device to operate at the target port rate when the determination result indicates that the SerDes channel of the first terminal device supports the operation at the target port rate. The second control unit is configured to shut down the port of the first terminal device when the determination result indicates that the port SerDes channel of the first terminal device does not support the operation of the target port rate.

[0054] Optionally, the device 500 also includes: The monitoring module is used to monitor the duration of the first terminal device from the first moment to the second moment, and close the port of the first terminal device if the duration exceeds the preset channel closing duration. Wherein, the first moment is the moment when the first terminal device receives the first message, and the second moment is the moment when the judgment result is obtained.

[0055] The port anomaly handling device 500 provided in this application embodiment can achieve... Figure 1The steps of all embodiments of the port anomaly handling method shown, and the corresponding technical effects achieved, will not be repeated here.

[0056] like Figure 6 As shown in the figure, this application embodiment also provides a port anomaly processing device 600, the device 600 comprising: The second sending module 601 is used to send a first message to the first terminal device when the received service message sent by the first terminal device is abnormal. The first message is used to indicate that the service message sent by the first terminal device to the second terminal device is abnormal. The second receiving module 602 is used to receive a second message sent by the first terminal device, the second message being used to indicate the number of abnormal channels; The third sending module 603 is used to send a third message to the first terminal device, the third message being used to indicate the target port rate of the first terminal device and the second terminal device, the target port rate being determined based on the number of abnormal channels; The second processing module 604 is used to process the port of the second terminal device based on the target port rate.

[0057] Optionally, the device 600 further includes: The acquisition unit is used to acquire the total number of port SerDes channels of the second terminal device, the calibrated operating rate of the port SerDes channels, and the preset port rate set. The determining unit is used to determine the number of remaining available SerDes channels based on the total number of SerDes channels on the port and the number of abnormal SerDes channels; The selection unit is configured to select the target port rate from the preset port rate set based on the number of remaining available SerDes channels and the calibrated operating rate, wherein the target port rate is the maximum port rate that the second terminal device can match in the preset port rate set under the conditions of the number of remaining available SerDes channels and the calibrated operating rate.

[0058] The port anomaly handling device 600 provided in this application embodiment can achieve... Figure 3 The steps of all embodiments of the port anomaly handling method shown, and the corresponding technical effects achieved, will not be repeated here.

[0059] This application also provides an electronic device. Since the principle by which the electronic device solves the problem is similar to the port anomaly handling method in this application, the implementation of this electronic device can refer to the implementation of the aforementioned port anomaly handling method; repeated details will not be elaborated further. Figure 7As shown, the electronic device according to an embodiment of this application includes: a processor 700, configured to read a program from a memory 720 and execute the following processes: Upon receiving a first message from the second terminal device, the number of abnormal serializer / deserializer SerDes channels of the first terminal device is obtained. The first message is used to indicate that there is an abnormality in the service message, and the service message is the message sent by the first terminal device to the second terminal device. Send a second message to the second terminal device, the second message being used to indicate the number of abnormal SerDes channels; The system receives a third message sent by the second terminal device, the third message being used to indicate the target port rate of the first terminal device and the second terminal device, the target port rate being determined based on the number of abnormal SerDes channels; Based on the target port rate, the port of the first terminal device is processed.

[0060] Among them, Figure 7 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 700) and memory (memory 720). The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides the interface. Processor 700 is responsible for managing the bus architecture and general processing, and memory 720 can store data used by processor 700 during operation.

[0061] Optionally, the processor 700 is configured to read the program from the memory 720 and execute the following processes: Obtain the total number of port SerDes channels, the calibrated operating rate of port SerDes channels, and the preset port rate set of the second terminal device; Based on the total number of SerDes channels on the port and the number of abnormal SerDes channels, determine the number of remaining available SerDes channels; Based on the number of remaining available SerDes channels and the calibrated operating rate, the target port rate is selected from the preset port rate set, wherein the target port rate is the maximum port rate that the second terminal device can match in the preset port rate set under the conditions of the number of remaining available SerDes channels and the calibrated operating rate.

[0062] Optionally, the processor 700 is configured to read the program from the memory 720 and execute the following processes: Based on the target port rate, determine whether the SerDes channel of the first terminal device supports the target port rate, and obtain the determination result. If the determination result indicates that the port SerDes channel of the first terminal device supports the operation of the target port rate, the port SerDes channel of the first terminal device is controlled to operate at the target port rate. If the determination result indicates that the port SerDes channel of the first terminal device does not support the operation of the target port rate, the port of the first terminal device shall be shut down.

[0063] Optionally, the processor 700 is configured to read the program from the memory 720 and execute the following processes: Monitor the duration of the first terminal device from the first moment to the second moment, and if the duration exceeds the preset channel shutdown duration, shut down the port of the first terminal device; Wherein, the first moment is the moment when the first terminal device receives the first message, and the second moment is the moment when the judgment result is obtained.

[0064] Optionally, the processor 700 is configured to read the program from the memory 720 and execute the following processes: In the event that a service message sent by the first terminal device is abnormal, a first message is sent to the first terminal device, the first message being used to indicate that a service message sent by the first terminal device to the second terminal device is abnormal. Receive a second message sent by the first terminal device, the second message being used to indicate the number of abnormal SerDes channels; A third message is sent to the first terminal device, the third message being used to indicate the target port rate of the first terminal device and the second terminal device, the target port rate being determined based on the number of abnormal SerDes channels; The port of the second terminal device is processed based on the target port rate.

[0065] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, this computer program implements the various processes of the above-described port exception handling method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0066] This application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above-described... Figure 1 or Figure 3 The various processes of the port anomaly handling method embodiment shown are all able to achieve the same technical effect, and will not be described again here to avoid repetition.

[0067] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

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

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

Claims

1. A method for handling port anomalies, applied to a first terminal device, characterized in that, The method includes: Upon receiving a first message from the second terminal device, the number of abnormal serializer / deserializer SerDes channels of the first terminal device is obtained. The first message is used to indicate that there is an abnormality in the service message, and the service message is the message sent by the first terminal device to the second terminal device. Send a second message to the second terminal device, the second message being used to indicate the number of abnormal SerDes channels; The system receives a third message sent by the second terminal device, the third message being used to indicate the target port rate of the first terminal device and the second terminal device, the target port rate being determined based on the number of abnormal SerDes channels; Based on the target port rate, the port of the first terminal device is processed.

2. The method according to claim 1, characterized in that, The target port rate is determined in the following way: Obtain the total number of port SerDes channels, the calibrated operating rate of port SerDes channels, and the preset port rate set of the second terminal device; Based on the total number of SerDes channels on the port and the number of abnormal SerDes channels, determine the number of remaining available SerDes channels; Based on the number of remaining available SerDes channels and the calibrated operating rate, the target port rate is selected from the preset port rate set, wherein the target port rate is the maximum port rate that the second terminal device can match in the preset port rate set under the conditions of the number of remaining available SerDes channels and the calibrated operating rate.

3. The method according to claim 1, characterized in that, The process of processing the port of the first terminal device based on the target port rate includes: Based on the target port rate, determine whether the SerDes channel of the first terminal device supports the target port rate, and obtain the determination result. If the determination result indicates that the port SerDes channel of the first terminal device supports the operation of the target port rate, the port SerDes channel of the first terminal device is controlled to operate at the target port rate. If the determination result indicates that the port SerDes channel of the first terminal device does not support the operation of the target port rate, the port of the first terminal device shall be shut down.

4. The method according to claim 3, characterized in that, The method further includes: Monitor the duration of the first terminal device from the first moment to the second moment, and if the duration exceeds the preset channel shutdown duration, shut down the port of the first terminal device; Wherein, the first moment is the moment when the first terminal device receives the first message, and the second moment is the moment when the judgment result is obtained.

5. A method for handling port anomalies, applied to a second terminal device, characterized in that, The method includes: In the event that a service message sent by the first terminal device is abnormal, a first message is sent to the first terminal device, the first message being used to indicate that a service message sent by the first terminal device to the second terminal device is abnormal. Receive a second message sent by the first terminal device, the second message being used to indicate the number of abnormal SerDes channels; A third message is sent to the first terminal device, the third message being used to indicate the target port rate of the first terminal device and the second terminal device, the target port rate being determined based on the number of abnormal SerDes channels; The port of the second terminal device is processed based on the target port rate.

6. The method as described in claim 5, characterized in that, After receiving the second message sent by the first terminal device, the method further includes: Obtain the total number of port SerDes channels, the calibrated operating rate of port SerDes channels, and the preset port rate set of the second terminal device; Based on the total number of SerDes channels on the port and the number of abnormal SerDes channels, determine the number of remaining available SerDes channels; Based on the number of remaining available SerDes channels and the calibrated operating rate, the target port rate is selected from the preset port rate set, wherein the target port rate is the maximum port rate that the second terminal device can match in the preset port rate set under the conditions of the number of remaining available SerDes channels and the calibrated operating rate.

7. A port anomaly handling device, applied to a first terminal device, characterized in that, The device includes: The first acquisition module is used to acquire the number of abnormal channels of the first terminal device when it receives a first message sent by the second terminal device. The first message is used to indicate that the service message sent by the first terminal device to the second terminal device is abnormal. The first sending module is used to send a second message to the second terminal device, the second message being used to indicate the number of abnormal channels; A first receiving module is configured to receive a third message sent by the second terminal device, the third message being used to indicate the target port rate of the first terminal device and the second terminal device, the target port rate being determined based on the number of abnormal channels; The first processing module is used to process the port of the first terminal device based on the target port rate.

8. A port anomaly handling device, applied to a second terminal device, characterized in that, The device includes: The second sending module is used to send a first message to the first terminal device when the received service message sent by the first terminal device is abnormal. The first message is used to indicate that the service message sent by the first terminal device to the second terminal device is abnormal. The second receiving module is used to receive a second message sent by the first terminal device, the second message being used to indicate the number of abnormal channels; The third sending module is used to send a third message to the first terminal device. The third message is used to indicate the target port rate of the first terminal device and the second terminal device. The target port rate is determined based on the number of abnormal channels. The second processing module is used to process the port of the second terminal device based on the target port rate.

9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method for handling port anomalies as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the port anomaly handling method as described in any one of claims 1 to 6.

11. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the port anomaly handling method as described in any one of claims 1 to 6.