Method and device for processing network traffic, electronic equipment and storage medium

By distinguishing between link quality messages that are disconnected and those that are connected in the source switching node, and prioritizing the processing of disconnection message queues, the problem of network traffic packet loss caused by untimely processing of link quality messages in global load balancing technology is solved, and more efficient network traffic transmission is achieved.

CN121603445APending Publication Date: 2026-03-03BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511903063.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing global load balancing technologies struggle to process link quality messages in a timely manner when network traffic increases, leading to packet loss and failing to ensure fast and efficient transmission.

Method used

In the source switching node, link quality messages representing link disconnection and link connection are stored in two different message queues, and the disconnection message queue is assigned a high priority for processing. The link transmission quality is updated in a timely manner, and the link with the best transmission quality is selected for network traffic transmission.

Benefits of technology

By promptly detecting and updating link disconnection status, network traffic packet loss can be reduced, load balancing in the switching network can be improved, and normal network traffic transmission can be ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121603445A_ABST
    Figure CN121603445A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a method and a device for processing network traffic, electronic equipment and a storage medium. The method for processing the network traffic comprises the following steps: receiving link quality messages respectively sent by a plurality of second switching nodes; respectively storing the link quality messages in a first message queue and a second message queue; in response to the fact that the first message queue is not empty, updating the link transmission quality between the second switching node and the destination switching node according to the link quality message in the first message queue; in response to the situation that the first message queue is empty, updating the link transmission quality between the second switching node and the destination switching node according to the link quality message in the second message queue; and according to the link transmission quality between the source switching node and each second switching node and the link transmission quality between each second switching node and the destination switching node, determining a transmission link for transmitting the network flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this disclosure relate to a method for processing network traffic, an apparatus for processing network traffic, an electronic device, and a computer-readable storage medium. Background Technology

[0002] In switched networks, such as those based on a multi-datacenter network architecture, load balancing technology is typically used to dynamically distribute network traffic.

[0003] Load balancing technologies can include global load balancing (GLB). In GLB, network traffic is dynamically distributed based on the link quality between the current switching node and other switching nodes, as well as the link quality of other switching nodes in subsequent links.

[0004] However, with the gradual increase in network traffic, GLB technology has difficulty ensuring the fast and efficient transmission of network traffic. Summary of the Invention

[0005] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0006] At least one embodiment of this disclosure provides a method for processing network traffic, applied to a source switching node in a first switching network. The first switching network includes a plurality of first switching nodes of a first type and a plurality of second switching nodes of a second type. The network traffic is forwarded from the source switching node to any of the second switching nodes and then forwarded to a destination switching node. The source switching node and the destination switching node are the first switching nodes. The method includes: receiving link quality messages sent by the plurality of second switching nodes respectively, wherein the link quality messages characterize the link transmission quality between the second switching node and the destination switching node; and storing the link quality messages characterizing the disconnection of the link between the second switching node and the destination switching node in a first message. The system stores a first message queue and a link quality message representing the link connection between the second switching node and the destination switching node in a second message queue; in response to the first message queue being non-empty, it updates the link transmission quality between the second switching node and the destination switching node based on the link quality message in the first message queue; in response to the first message queue being empty, it updates the link transmission quality between the second switching node and the destination switching node based on the link quality message in the second message queue; and determines the transmission links for transmitting the network traffic based on the link transmission quality between the source switching node and each of the second switching nodes, and the link transmission quality between each of the second switching nodes and the destination switching node.

[0007] At least another embodiment of this disclosure provides an apparatus for processing network traffic, deployed as a source switching node in a first switching network. The first switching network includes a plurality of first switching nodes of a first type and a plurality of second switching nodes of a second type. The network traffic is forwarded from the source switching node to any of the second switching nodes and then forwarded to a destination switching node. The source switching node and the destination switching node are both first switching nodes. The apparatus includes: a receiving module configured to receive link quality messages sent by the plurality of second switching nodes respectively, wherein the link quality messages characterize the link transmission quality between the second switching node and the destination switching node; and a storage module configured to store the link quality messages characterizing the disconnection of the link between the second switching node and the destination switching node in a first message queue. The link quality message characterizing the link connection between the second switching node and the destination switching node is stored in a second message queue; the update module is configured to: update the link transmission quality between the second switching node and the destination switching node according to the link quality message in the first message queue if the first message queue is not empty; the update module is further configured to: update the link transmission quality between the second switching node and the destination switching node according to the link quality message in the second message queue if the first message queue is empty; the determination module is configured to: determine the transmission link used to transmit the network traffic according to the link transmission quality between the source switching node and each of the second switching nodes, and the link transmission quality between each of the second switching nodes and the destination switching node.

[0008] At least one further embodiment of this disclosure provides an electronic device, including: a processing device; and a storage device including one or more computer program instructions; wherein the one or more computer program instructions are executed by the processing device to perform the method for processing network traffic provided in at least one embodiment of this disclosure.

[0009] At least one further embodiment of this disclosure provides a computer-readable storage medium for non-transitory storage of computer-readable instructions, wherein the computer-readable instructions, when executed by a processor, implement the method for processing network traffic provided in at least one embodiment of this disclosure.

[0010] At least one embodiment of this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the method for processing network traffic provided in at least one embodiment of this disclosure. Attached Figure Description

[0011] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0012] Figure 1 The illustration schematically shows an architecture diagram of a switching network provided in at least one embodiment of the present disclosure;

[0013] Figure 2 The illustration shows a flowchart of a method for processing network traffic provided in at least one embodiment of the present disclosure;

[0014] Figure 3 The illustration shows a schematic diagram of a message queue provided in at least one embodiment of the present disclosure;

[0015] Figure 4 The illustration shows a flowchart of another method for processing network traffic provided by at least one embodiment of the present disclosure;

[0016] Figure 5 The illustration shows a schematic diagram of network traffic transmission in a switched network according to at least one embodiment of the present disclosure;

[0017] Figure 6 This illustration schematically shows a level variation of a link transmission indicator value provided in at least one embodiment of the present disclosure;

[0018] Figure 7 This illustration schematically depicts a link transmission quality variation over time according to at least one embodiment of the present disclosure;

[0019] Figure 8 The schematic diagram illustrates the structure of an apparatus for processing network traffic according to at least one embodiment of the present disclosure; and

[0020] Figure 9 A schematic diagram of the structure of an electronic device suitable for implementing one or more embodiments of the present disclosure is shown. Detailed Implementation

[0021] One or more embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0022] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0023] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0024] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0025] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0026] The names of the messages or information exchanged between the various devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of these messages or information.

[0027] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0028] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, relevant users should be informed of the type, scope of use, and usage scenarios of the information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and authorization from relevant users should be obtained. Among them, relevant users may include any type of rights holder, such as individuals, enterprises, and groups.

[0029] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly indicate that the operation requested by the user will require obtaining and using the user's information. This allows the relevant user to choose whether to provide information to the software or hardware such as the electronic device, application, server, or storage medium that performs the operation of any embodiment of the present disclosure based on the prompt message.

[0030] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, such as a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide information to the electronic device.

[0031] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0032] A switching network, such as a network based on a multi-datacenter network architecture, can be understood as a network composed of several switching nodes (such as switches, routers, etc.) arranged according to a certain topology and control method. For example, a switching network can be a Clos-Switching Network, which can be applied in scenarios such as cloud data centers and large-scale networks.

[0033] Clos switching networks are multi-layered, low-blocking hierarchical switching network architectures. A two-layer Clos switching network can include two different types of switching nodes: leaf switching nodes and spine switching nodes. Leaf switching nodes directly connect to input and / or output devices; for example, leaf switching nodes directly connect to servers or storage devices. Spine switching nodes act as an intermediate layer, connecting to leaf switching nodes.

[0034] Figure 1 The illustration shows a schematic diagram of the architecture of a switching network provided in at least one embodiment of the present disclosure.

[0035] like Figure 1 As shown, the switching network includes first switching nodes 1.1 to 1.4 and second switching nodes 2.1 to 2.4. The first switching nodes 1.1 to 1.4 are connected to input devices or output devices, respectively. That is, the first switching nodes 1.1 to 1.4 can be leaf switching nodes, and the second switching nodes 2.1 to 2.4 can be spine switching nodes.

[0036] Figure 1 The network traffic transmission process in the switching network shown can be as follows: The input device generates network traffic that needs to be transmitted to an output device. The network traffic is first transmitted to a first switching node connected to the input device. The first switching node forwards the network traffic to a second switching node. The second switching node then forwards the network traffic to the first switching node connected to the output device. Finally, the first switching node connected to the output device transmits the network traffic to the output device.

[0037] For example, an input device connected to a first switching node 1.1 generates network traffic that needs to be transmitted to an output device connected to a first switching node 1.4. In this case, the network traffic is first transmitted from the input device connected to the first switching node 1.1 to the first switching node 1.1. Then, the first switching node 1.1 forwards the network traffic to any second switching node, such as the second switching node 2.3. The second switching node 2.3 then transmits the network traffic to the first switching node 1.4, and the first switching node 1.4 transmits the network traffic to the output device connected to the first switching node 1.4.

[0038] In the process of network traffic transmission in a switched network, it involves selecting a link for transmission among different switching nodes. For example, the first switching node can transmit network traffic to any second network node. To achieve a more balanced distribution of network traffic, load balancing technology is typically used for dynamic allocation of network traffic.

[0039] Load balancing techniques can include dynamic load balancing (DLB). In DLB, network traffic is dynamically allocated based on the link quality (also known as local port quality) between the current switching node and other switching nodes. For example, continuing the previous example, in a Clos switching network, the first switching node 1.1 needs to select a second switching node (2.1 to 2.4) to forward network traffic. With DLB, the first switching node 1.1 can determine the link with the best quality based on the link quality between it and the second switching node 2.1, the second switching node 2.2, the second switching node 2.3, and the second switching node 2.4. It then selects the link with the best quality to transmit network traffic to the corresponding second switching node. This solves the hash polarization problem that can occur with traditional static hashing, resulting in a more balanced distribution of network traffic among multiple exit points and links.

[0040] Load balancing techniques can also include global load balancing (GLB), which is an enhancement of DLB. In GLB, network traffic is dynamically allocated based on the link quality between the current switching node and other switching nodes (also known as local port quality) and the link quality of other switching nodes in subsequent links (also known as remote port quality). For example, continuing the previous example, in a Clos switching network, the first switching node 1.1 needs to select a second switching node from 2.1 to 2.4 to forward network traffic. In GLB, the first switching node 1.1 considers not only the link quality between itself and the second switching node 2.1, but also the link quality between itself and the second switching node 2.2, and the link quality between itself and the second switching node 2.4. In addition to considering the link quality between the first switching node 1.1 and the second switching node 2.3, and the link quality between the first switching node 1.1 and the second switching node 2.4, the link quality between the second switching node 2.1 and the first switching node 1.4, the link quality between the second switching node 2.2 and the first switching node 1.4, the link quality between the second switching node 2.3 and the first switching node 1.4, and the link quality between the second switching node 2.4 and the first switching node 1.4 are also considered. That is, by combining the local port quality and the remote port quality, the link with the best overall link quality is determined, and then the link with the best overall link quality is selected to transmit network traffic to the corresponding second switching node. Thus, GLB technology not only considers the local port quality but also senses the congestion of subsequent links, comprehensively evaluates and selects the link for network traffic transmission, achieving global network traffic balancing in the switching network (e.g., a data center network), improving the bandwidth utilization of the switching network, and reducing packet loss caused by faults.

[0041] In GLB technology, the current switching node needs to obtain the remote port quality of other switching nodes. For example, other switching nodes can transmit the remote port quality by sending a link quality message (GLB message). Continuing with the previous example, in a Clos-based switching network, second switching node 2.1 sends a link quality message to first switching node 1.1 regarding the link transmission quality between second switching node 2.1 and first switching node 1.4. Second switching node 2.2 sends a link quality message to first switching node 1.1 regarding the link transmission quality between second switching node 2.2 and first switching node 1.4. Second switching node 2.3 sends a link quality message to first switching node 1.1 regarding the link transmission quality between second switching node 2.3 and first switching node 1.4. Second switching node 2.4 sends a link quality message to first switching node 1.1 regarding the link transmission quality between second switching node 2.4 and first switching node 1.4. Based on the link quality messages sent by second switching nodes 2.1 to 2.4, first switching node 1.1 determines the remote port quality of second switching nodes 2.1 to 2.4 and then proceeds with network traffic transmission.

[0042] However, with the gradual increase in network traffic and port bandwidth, the link transmission quality is adjusted more frequently, and the number of link quality messages also increases. In GLB technology, the inability to process link quality messages in a timely manner may lead to network traffic packet loss and other issues, making it difficult to ensure fast and efficient transmission of network traffic.

[0043] To address at least some of the aforementioned technical problems, at least one embodiment of this disclosure provides a method for processing network traffic. This method is applied to a source switching node in a first switching network, which includes a plurality of first switching nodes of a first type and a plurality of second switching nodes of a second type. Network traffic is forwarded from the source switching node to any of the second switching nodes and then forwarded to a destination switching node. The source and destination switching nodes are both first switching nodes. The method includes: receiving link quality messages respectively sent by the plurality of second switching nodes, the link quality messages characterizing the link transmission quality between the second switching node and the destination switching node; and forwarding links indicating a disconnection between the second switching node and the destination switching node. Quality messages are stored in a first message queue, and link quality messages characterizing the link connection between the second switching node and the destination switching node are stored in a second message queue. In response to the first message queue being non-empty, the link transmission quality between the second switching node and the destination switching node is updated based on the link quality messages in the first message queue. In response to the first message queue being empty, the link transmission quality between the second switching node and the destination switching node is updated based on the link quality messages in the second message queue. Based on the link transmission quality between the source switching node and each of the second switching nodes, and the link transmission quality between each of the second switching nodes and the destination switching node, the transmission links used for transmitting network traffic are determined.

[0044] Based on the method for processing network traffic provided in at least one embodiment of this disclosure, at least one embodiment of this disclosure also provides an apparatus, electronic device, computer-readable storage medium, and computer program product for processing network traffic.

[0045] The method for processing network traffic provided in at least one embodiment of this disclosure transmits network traffic sent from a source switching node to a destination switching node in a switching network. For link quality messages (i.e., GLB messages) sent by multiple second switching nodes, link quality messages indicating link connection and link disconnection are stored in two different message queues. When processing link quality messages, the message queue storing link quality messages indicating link disconnection is processed first. In this way, the link disconnection situation is detected in a timely manner, avoiding the situation where network traffic is transmitted from the actually disconnected link due to the large number of link quality messages and the failure to update the link transmission quality in a timely manner. This reduces network traffic packet loss and improves the load balancing effect of GLB technology in the switching network.

[0046] The present disclosure and some examples thereof will now be described in detail with reference to the accompanying drawings.

[0047] Figure 2 The illustration shows a flowchart of a method for processing network traffic provided in at least one embodiment of the present disclosure.

[0048] like Figure 2 As shown, the method for processing network traffic in this embodiment includes steps S201 to S205. This method for processing network traffic can be applied to a source switching node in a first switching network, for example, to a cooperating component deployed in the source switching node for processing link quality messages. This cooperating component can be a coprocessor, an embedded core, or a host-CPU software system, etc., and one or more embodiments of this disclosure do not limit this.

[0049] In one or more embodiments of this disclosure, the first switching network may include a plurality of first switching nodes of a first type and a plurality of second switching nodes of a second type. For example, the first switching network may be a Clos switching network, the plurality of first switching nodes of the first type may be leaf switching nodes, and the plurality of second switching nodes of the second type may be spine switching nodes.

[0050] In one or more embodiments of this disclosure, network traffic can be forwarded from a source switching node to any second switching node, and then forwarded to a destination switching node, where both the source and destination switching nodes are first switching nodes. That is, the network traffic can be network traffic that needs to be forwarded from a source switching node through a second switching node before reaching the destination switching node. Since there are multiple second switching nodes, i.e., multiple transmission links exist for the network traffic, the method for processing network traffic provided in this disclosure can be used to select transmission links between the source and destination switching nodes.

[0051] Step S201: The source switching node receives link quality messages sent by multiple second switching nodes respectively.

[0052] In one or more embodiments of this disclosure, the link quality message, also known as the GLB message, can be used to characterize the link transmission quality between the second switching node and the destination switching node. That is, the link quality message can be a message characterizing the quality of the remote port. For example, the link quality message can characterize the transmission link being disconnected, the transmission link being congested, or the transmission link not being congested.

[0053] The second type involves multiple second-level switching nodes each sending their own link quality messages to the source switching node. Figure 1Taking the switching network shown as an example, the source switching node can be the first switching node 1.1, and the destination switching node can be the first switching node 1.4. In this case, the second switching node 2.1 sends a link quality message to the first switching node 1.1, which is used to characterize the link transmission quality between the second switching node 2.1 and the first switching node 1.4. Similarly, the second switching node 2.2 sends a link quality message to the first switching node 1.1, which is used to characterize the link transmission quality between the second switching node 2.2 and the first switching node 1.4; the second switching node 2.3 sends a link quality message to the first switching node 1.1, which is used to characterize the link transmission quality between the second switching node 2.3 and the first switching node 1.4; and the second switching node 2.4 sends a link quality message to the first switching node 1.1, which is used to characterize the link transmission quality between the second switching node 2.4 and the first switching node 1.4.

[0054] In one or more embodiments of this disclosure, the link quality message may include port connection status and / or link transmission metric values. Port connection status can characterize the connection status of the link between the second switching node and the destination switching node, such as link up or link down. Link transmission metric values ​​can quantify the transmission quality of the link between the second switching node and the destination switching node; for example, link transmission metric values ​​may be port load, queue depth, etc.

[0055] In other words, port connectivity status can be used to describe whether a link is connected, and link transmission metrics can be used to describe the transmission quality of network traffic transmitted through the link. For example, when port connectivity status indicates that the link between the second switching node and the destination switching node is broken, the link transmission metric values ​​can all be 0.

[0056] Step S202: The source switching node stores the link quality message indicating that the link between the second switching node and the destination switching node is disconnected in the first message queue, and the source switching node stores the link quality message indicating that the link between the second switching node and the destination switching node is connected in the second message queue.

[0057] Since link quality messages are control plane messages, a message queue is configured in the source switching node to store them. The source switching node can store received link quality messages in the message queue for subsequent updates to link transmission quality.

[0058] Figure 3 The illustration shows a schematic diagram of a message queue provided in at least one embodiment of the present disclosure.

[0059] In some source switching nodes, a message queue is configured to store the received link quality messages. However, when there are a large number of link quality messages, the following situation may occur: a transmission link changes from connected to disconnected, but because there are many link quality messages stored in the message queue, they are not processed in time, resulting in network traffic still being transmitted through that transmission link, causing network traffic packet loss.

[0060] by Figure 1 Taking the switching network shown as an example, the source switching node can be the first switching node 1.1, and the destination switching node can be the first switching node 1.4. The link between the second switching node 2.1 and the first switching node 1.4 changes from connected to disconnected. The first switching node 1.4 sends a link quality message indicating that the link is disconnected to the first switching node 1.1. However, the first switching node 1.1 does not process the link quality message in time, causing the first switching node 1.1 to believe that the link between the second switching node 2.1 and the first switching node 1.4 is still connected, and selects the second switching node 2.1 for forwarding network traffic. In this case, since the link between the second switching node 2.1 and the first switching node 1.4 is actually disconnected, the network traffic will not be able to be transmitted normally.

[0061] Therefore, in one or more embodiments of this disclosure, the source switching node uses two different message queues (i.e., a first message queue and a second message queue) to store link quality messages respectively. The first message queue is used to store link quality messages indicating a broken link, and the second message queue is used to store link quality messages indicating a connected link. In this way, when the source switching node stores link quality messages, the two message queues are used to distinguish the link quality messages.

[0062] In some possible implementations, the link quality message may include port connection status. In this case, the source switch node stores the link quality message with the port connection status as disconnected in the first message queue, and the source switch node stores the link quality message with the port connection status as connected in the second message queue.

[0063] In other words, since the link quality message itself can carry the port connection status, after the source switching node receives the link quality messages sent by each second switching node, it can determine whether the transmission link between each second switching node and the destination switching node is connected or disconnected based on the port connection status, and then store the link quality message in the first message queue or the second message queue respectively.

[0064] by Figure 1Taking the switching network shown as an example, the source switching node can be the first switching node 1.1, and the destination switching node can be the first switching node 1.4. In this case, the second switching node 2.1 sends a link quality message to the first switching node 1.1. The port connection status in this link quality message indicates the link connection between the second switching node 2.1 and the first switching node 1.4. The first switching node 1.1 can store this link quality message in the second message queue. The second switching node 2.2 sends a link quality message to the first switching node 1.1. The port connection status in this link quality message indicates that the link between the second switching node 2.1 and the first switching node 1.4 is disconnected. The first switching node 1.1 can store this link quality message in the first message queue.

[0065] Step S203: In response to the first message queue being non-empty, the source switching node updates the link transmission quality between the second switching node and the destination switching node based on the link quality message in the first message queue.

[0066] Step S204: In response to the first message queue being empty, the source switching node updates the link transmission quality between the second switching node and the destination switching node based on the link quality message in the second message queue.

[0067] In one or more embodiments of this disclosure, two different message queues have different processing priorities, with the first message queue having a high priority and the second message queue having a low priority.

[0068] In other words, when the first message queue is not empty, the link quality messages in the first message queue are processed first, and the link transmission quality between the second switching node and the destination switching node is updated according to the link quality messages in the first message queue.

[0069] Since the link quality message stored in the first message queue indicates that the link is broken, the source switching node can update the link transmission quality between the second switching node and the destination switching node to be untransmittable based on the link quality message in the first message queue.

[0070] by Figure 1Taking the switching network shown as an example, the source switching node can be the first switching node 1.1, and the destination switching node can be the first switching node 1.4. The first message queue stores the link quality messages sent by the second switching node 2.2 to the first switching node 1.1 and the link quality messages sent by the second switching node 2.3 to the first switching node 1.1. Since the first message queue is not empty at this time, the first switching node 1.1 can prioritize processing the link quality messages in the first message queue, updating the link transmission quality between the second switching node 2.2 and the first switching node 1.4 to be untransmittable, and updating the link transmission quality between the second switching node 2.3 and the first switching node 1.4 to be untransmittable.

[0071] After all the link quality messages in the first message queue have been processed and the first message queue is empty, the link quality messages stored in the second message queue are then processed. That is, based on the link quality messages in the second message queue, the link transmission quality between the second switching node and the destination switching node is updated, for example, the link transmission quality between the second switching node and the destination switching node is updated to good transmission quality or poor transmission quality.

[0072] In this way, by assigning different processing priorities to the two message queues, the situation of "transmission link changing from connected to disconnected" is handled first, so as to detect the link that has actually been disconnected in a timely manner and avoid service packet loss caused by forwarding network traffic through the disconnected link.

[0073] Step S205: The source switching node determines the transmission link used to transmit network traffic based on the link transmission quality between the source switching node and each second switching node, and the link transmission quality between each second switching node and the destination switching node.

[0074] When transmitting network traffic at the source switching node, GLB technology can be used to dynamically allocate network traffic among multiple secondary switching nodes. In other words, the source switching node can simultaneously refer to the link transmission quality between the source switching node and each secondary switching node (i.e., local port quality) and the link transmission quality between each secondary switching node and the destination switching node (i.e., remote port quality), and select the link with the best transmission quality to transmit network traffic, thus realizing the process of transmitting network traffic from the source switching node to the destination switching node.

[0075] In the method for processing network traffic provided in this disclosure, link quality messages indicating link disconnection and link connection are stored in two different message queues respectively. Furthermore, the message queue indicating link disconnection is processed first, so that the source switching node updates the disconnected links in a timely manner, ensuring the normal transmission of network traffic.

[0076] For the scenario of transmitting network traffic in the first switching network as described above, this disclosure also provides other embodiments for optimizing GLB technology. It should be noted that the various embodiments provided in this disclosure can be implemented individually or in combination.

[0077] Figure 4 The illustration shows a schematic flowchart of another method for processing network traffic provided by at least one embodiment of the present disclosure.

[0078] In at least one embodiment of this disclosure, the method for processing network traffic provided by this disclosure may further include steps S401 and S402.

[0079] Step S401: The source switching node determines the number of second switching nodes that meet the link transmission conditions based on the link transmission quality between each second switching node and the destination switching node.

[0080] In this embodiment, considering that the source switching node may have transmission links with multiple second switching nodes, but among the multiple transmission links between the source switching node and multiple second switching nodes, only a small number of transmission links may have good transmission quality, when using GLB technology to adjust network traffic, network traffic will be concentrated and allocated to the second switching nodes corresponding to at least some transmission links with good transmission quality, causing congestion of the transmission links.

[0081] Figure 5 The illustration schematically depicts a network traffic transmission in a switched network according to at least one embodiment of the present disclosure.

[0082] like Figure 5 As shown in the upper part, the first switching node 1.1 is the source switching node, and the first switching node 1.1 is connected to input devices 1 to 4. The second switching nodes 2.1 to 2.4 are connected to the destination switching node ( Figure 5 In the transmission link between (not shown), only the transmission link between the second switching node 2.1 and the destination switching node has good transmission quality. In this case, the network traffic generated by input devices 1 to 4 will all be transmitted through the transmission link "first switching node 1.1 - second switching node 2.2 - destination switching node", causing the second switching node 2.2 to receive the network traffic generated by four input devices, resulting in congestion.

[0083] Therefore, in this embodiment, network traffic transmission is optimized for the scenario described above where "only a small number of transmission links have good transmission quality." When determining whether the first switching network exhibits the above scenario, the transmission quality of the links between each second switching node and the destination switching node is used to determine whether the transmission link between the second switching node and the destination switching node is a transmission link with good transmission quality. That is, satisfying the link transmission condition can be understood as satisfying the condition that the link can be selected by the source switching node as a transmission link for transmitting network traffic.

[0084] In some possible implementations, the link quality message may include port connection status and link transmission metric value. For each link quality message, in response to the port connection status being connected and the link transmission metric value meeting the metric value condition, it is determined that the second switching node that sent the link quality message meets the link transmission condition.

[0085] In other words, in this embodiment, it can be determined whether the second switching node meets the link transmission conditions based on the link quality message. For example, a transmission link that can be selected by the source switching node as a transmission link for transmitting network traffic indicates that the transmission link is connected rather than disconnected. Therefore, in the link quality message sent by the second switching node that meets the link transmission conditions, the port connection status needs to be connected. As another example, a transmission link that can be selected by the source switching node as a transmission link for transmitting network traffic indicates that the transmission quality of the transmission link is good. Therefore, in the link quality message sent by the second switching node that meets the link transmission conditions, the link transmission metric value needs to meet a metric value condition, for example, the metric value condition could be greater than a metric value threshold.

[0086] By setting index value conditions and performing qualitative judgments on each second switching node based on link quality messages, the second switching nodes that meet the link transmission conditions are identified, and the number of second switching nodes that meet the link transmission conditions is determined.

[0087] Step S402: In response to the fact that the number of second switching nodes that meet the link transmission conditions is less than a set proportion, the source switching node updates the link transmission quality between each second switching node and the destination switching node to the same value.

[0088] When the number of second switching nodes that meet the link transmission conditions is less than a set proportion, such as less than 50% of the total number of second switching nodes, it is determined that the first switching network has a scenario where "only a small number of transmission links have good transmission quality". In this case, in order to avoid congestion caused by a large amount of network traffic being transmitted from a small number of transmission links, in this embodiment, the source switching node updates the link transmission quality between each second switching node and the destination switching node to the same value.

[0089] In other words, the source switching node sets the quality of the remote ports to be consistent, thus temporarily disabling the GLB technology. In this way, when transmitting network traffic, the source switching node can consider only the quality of its own port; that is, the source switching node determines the transmission link for transmitting network traffic based on the link transmission quality between the source switching node and each of the second switching nodes.

[0090] Continue as Figure 5 As shown, in Figure 5 In the lower part, after optimizing the network traffic transmission process using the method in this embodiment, the transmission links between the first switching node 1.1 and the second switching nodes 2.1 to 2.4 are all selectable links. The first switching node 1.1 can select network traffic from the four transmission paths for forwarding. Thus, in scenarios where "only a few transmission links have good transmission quality," the DLB technology is used to dynamically adjust network traffic, solving the problem of increased congestion or even packet loss caused by the quality of remote ports in the GLB technology.

[0091] In at least one embodiment of this disclosure, considering that the second switching node may frequently send link quality messages to the source switching node, causing a backlog of link quality messages, which in turn leads to uneven network traffic or even packet loss, the link quality message includes port connection status and link transmission index value. In response to changes in the port connection status between the target second switching node and the destination switching node and / or changes in the link transmission index value between the target second switching node and the destination switching node between a first level and a second level, the link quality message sent by the target second switching node is received. The target second switching node is any switching node among a plurality of second switching nodes.

[0092] In other words, by restricting the conditions under which the second switching node triggers the sending of link quality messages, the number of link quality messages is reduced. In this embodiment, the target second switching node will send link quality messages to the source switching node in the following two situations:

[0093] The first scenario involves a change in the port connection status between the target second switching node and the destination switching node. In other words, when the port connection status between the target second switching node and the destination switching node changes from disconnected to connected, or vice versa, since the transmission link connection is involved, the target second switching node needs to send a link quality message to the source switching node to inform it of the current remote port quality.

[0094] The second scenario: The link transmission index value between the target second switching node and the destination switching node varies between the first and second levels.

[0095] Figure 6The illustration shows a schematic diagram of the level variation of a link transmission indicator value provided in at least one embodiment of the present disclosure.

[0096] like Figure 6 As shown in the left half, some target switching nodes are configured with eight quality levels. When the link transmission index value between the target second switching node and the destination switching node changes between any two of these levels, a link quality message will be sent. For example, if the link transmission index value between the target second switching node and the destination switching node changes from the third level to the fourth level, or changes from the fourth level to the fifth level, the target second switching node will send a link quality message to the source switching node, causing a backlog of link transmission messages.

[0097] like Figure 6 As shown in the right half, in this embodiment, only two quality levels are set, such as a first level representing congestion and a second level representing non-congestion. The transmission of a link quality message is only triggered when the link transmission index value between the target second switching node and the destination switching node changes between the first and second levels.

[0098] In this way, without affecting the ability to inform the source switching node whether the link is connected or congested, the number of link quality messages can be greatly reduced by setting a small number of quality levels, thus avoiding the backlog of link quality messages.

[0099] In at least one embodiment of this disclosure, the efficiency of the source switching node in processing link quality messages can be improved by adjusting the size of the buffer in the message queue. For example, link quality messages indicating a disconnection between the second switching node and the destination switching node are stored in a first buffer of the first message queue, and link quality messages indicating a connection between the second switching node and the destination switching node are stored in a second buffer of the second message queue, wherein the size of the first buffer and the second buffer is less than a storage threshold.

[0100] In other words, cache areas are set up in the first and second message queues to store link quality messages. If the cache size in the first and second message queues is too large, it may result in a large number of link quality messages being stored in the message queues. When the source switching node processes link quality messages, it will be processing historical link quality messages from a certain period of time, resulting in a certain lag and difficulty in quickly processing recently received link quality messages, leading to poor load balancing performance.

[0101] For example, the first buffer in the first message queue can be used to store 1000 link quality messages. The source switching node takes 1µs to process each link quality message, that is, it takes 1ms to process all 1000 link quality messages. When the source switching node processes the last link quality message, the actual quality of the remote port may have changed (for example, the quality of the remote port changes from congested to non-congested after 1ms). At this time, updating the link transmission quality according to the link quality messages in the first message queue may have a large error.

[0102] Therefore, in this embodiment, the sizes of the first and second caches are set to be less than the storage threshold, that is, smaller cache areas are set in the first and second message queues. Thus, in response to the first cache being full, historical link quality messages stored in the first cache are discarded, and link quality messages indicating a disconnection between the second switching node and the destination switching node are stored in the first cache of the first message queue; or, in response to the second cache being full, historical link quality messages stored in the second cache are discarded, and link quality messages indicating a connection between the second switching node and the destination switching node are stored in the second cache of the second message queue.

[0103] In other words, since the first and second caches are relatively small, when either the first or second cache is full, historical link quality messages in the first or second cache will be discarded, and newly received link quality messages will be stored. This ensures that the link quality messages stored in the first and second message queues are real-time link quality messages, guaranteeing the timeliness of link quality messages.

[0104] In at least one embodiment of this disclosure, considering that if the source switching node does not receive a link quality message sent by a certain second switching node for a long time, it may cause the source switching node to mistakenly believe that the transmission quality of the transmission link is good for a long time, resulting in the selection of the transmission link to transmit network traffic, thereby causing packet loss, therefore, in response to not receiving a link quality message sent by the target second switching node for more than a set time threshold, the source switching node updates the link transmission quality between the target second switching node and the destination switching node to the point that the link between the target second switching node and the destination switching node is disconnected, where the target second switching node is any switching node among a plurality of second switching nodes.

[0105] In other words, if a link quality message is not received from a second exchange node (i.e., the target second exchange node) for an extended period of time (exceeding a set time threshold), such as when the target second exchange node malfunctions and is unable to send a link quality message, or when the link quality message sent by the target second exchange node is discarded due to a small buffer size in the message queue, the source exchange node can pessimistically assume that the link between the target second exchange node and the destination exchange node is broken using a timeout mechanism.

[0106] Figure 7 The illustration schematically depicts a link transmission quality variation over time according to at least one embodiment of the present disclosure.

[0107] exist Figure 7 In the diagram, solid black circles represent link quality messages indicating congestion, while hollow black circles represent link quality messages indicating non-congestion. For example... Figure 7 As shown in the upper part, when the optimization method provided in this embodiment is not used, after the target second switching node sends a link quality message indicating that it is not congested, the source switching node does not receive a new link quality message sent by the target second switching node for a long time. In this case, the source switching node will continue to believe that the transmission link between the target second switching node and the destination switching node is not congested, but in fact the target second switching node may be congested or have an anomaly.

[0108] like Figure 7 As shown in the lower part, when using the optimization method provided in this embodiment, after the target second switching node sends a link quality message indicating that there is no congestion, the source switching node does not receive a new link quality message sent by the target second switching node for a long time (exceeding a set time threshold). In this case, the source switching node considers that the transmission link between the target second switching node and the destination switching node is disconnected, thus avoiding service packet loss due to the long period of no update of link transmission quality.

[0109] In at least one embodiment of this disclosure, considering that the instability of the port of the second switching node may cause port flapping, such as frequent changes from link disconnection to link connection and then back to link disconnection, resulting in network traffic packet loss, a link quality message sent by the target second switching node is received in response to the port connection state between the target second switching node and the destination switching node changing from disconnection to connection, and the duration of the port connection state between the target second switching node and the destination switching node being connected being greater than a stable time threshold. The target second switching node can be any switching node among a plurality of second switching nodes.

[0110] In other words, by setting a stable time threshold, the target second switching node will only send a link quality message representing the link connection to the source switching node after the port connection status between the target second switching node and the destination switching node changes from disconnected to connected and remains stable for a period of time.

[0111] This avoids network traffic packet loss caused by frequent transmission of link quality messages due to intermittent interruptions of the second switching node, which occurs when the transmission of network traffic changes frequently between link disconnection and link connection.

[0112] Based on the method for processing network traffic provided in at least one embodiment of this disclosure, at least one embodiment of this disclosure also provides an apparatus for processing network traffic. The following will be combined with... Figure 8 The device for processing network traffic is described in detail.

[0113] Figure 8 The illustration shows a schematic diagram of the structure of an apparatus for processing network traffic provided in at least one embodiment of the present disclosure.

[0114] like Figure 8 As shown, the network traffic processing device 800 of this embodiment can be deployed at a source switching node in a first switching network. The first switching network includes a plurality of first switching nodes of a first type and a plurality of second switching nodes of a second type. The network traffic is forwarded from the source switching node to any of the second switching nodes, and then forwarded to the destination switching node. The source switching node and the destination switching node are the first switching nodes. The network traffic processing device 800 includes a receiving module 801, a storage module 802, an updating module 803, and a determining module 804. For example, these units or modules can be implemented by hardware (e.g., circuit) modules or software modules, etc. The following embodiments are the same and will not be described again. For example, it can be implemented by a central processing unit (CPU), general purpose... Graphics processing These units or modules are implemented using a GPGPU, GPU, TPU, FPGA, or other form of processing unit with data processing and / or instruction execution capabilities, along with corresponding computer instructions.

[0115] The receiving module 801 is configured to receive link quality messages sent by the plurality of second switching nodes, wherein the link quality messages characterize the link transmission quality between the second switching node and the destination switching node. For example, the receiving module 801 can be configured to execute step S201 described above; its specific implementation principle can be found in the relevant description of step S201, and will not be repeated here.

[0116] The storage module 802 is configured to store the link quality message indicating a disconnection between the second switching node and the destination switching node in a first message queue, and to store the link quality message indicating a connection between the second switching node and the destination switching node in a second message queue. For example, the storage module 802 can be configured to execute step S202 described above; its specific implementation principle can be found in the relevant description of step S202, and will not be repeated here.

[0117] The update module 803 is configured to: in response to the first message queue being non-empty, update the link transmission quality between the second switching node and the destination switching node based on the link quality message in the first message queue; and in response to the first message queue being empty, update the link transmission quality between the second switching node and the destination switching node based on the link quality message in the second message queue. For example, the update module 803 can be configured to execute steps S203 and S204 described above. The specific implementation principles can be found in the relevant descriptions of steps S203 and S204, and will not be repeated here.

[0118] The determining module 804 is configured to: determine the transmission links used to transmit the network traffic based on the link transmission quality between the source switching node and each of the second switching nodes, and the link transmission quality between each of the second switching nodes and the destination switching node. For example, the determining module 804 can be configured to execute step S205 described above; its specific implementation principle can be found in the relevant description of step S205, and will not be repeated here.

[0119] In at least one embodiment of this disclosure, the link quality message includes port connection status, and the storage module 802 is further configured to: store the link quality message with the port connection status being disconnected in a first message queue, and store the link quality message with the port connection status being connected in a second message queue.

[0120] In at least one embodiment of this disclosure, the update module 803 is further configured to: determine the number of second switching nodes that meet the link transmission conditions based on the link transmission quality between each second switching node and the destination switching node; and update the link transmission quality between each second switching node and the destination switching node to the same value in response to the number of second switching nodes that meet the link transmission conditions being less than a set proportion.

[0121] In at least one embodiment of this disclosure, the link quality message includes a port connection status and a link transmission index value. The update module 803 is further configured to: for each link quality message, in response to the port connection status being connected and the link transmission index value meeting the index value condition, determine that the second switching node that sent the link quality message meets the link transmission condition.

[0122] In at least one embodiment of this disclosure, the link quality message includes port connection status and link transmission index value. The receiving module 801 is further configured to: receive the link quality message sent by the target second switching node in response to a change in the port connection status between the target second switching node and the destination switching node and / or a change in the link transmission index value between the target second switching node and the destination switching node between a first level and a second level, wherein the target second switching node is any switching node among the plurality of second switching nodes.

[0123] In at least one embodiment of this disclosure, the storage module 802 is further configured to: store the link quality message indicating a disconnection between the second switching node and the destination switching node in a first cache of a first message queue, and store the link quality message indicating a connection between the second switching node and the destination switching node in a second cache of a second message queue; wherein the size of the first cache and the second cache is less than a storage threshold.

[0124] Storage module 802 is further configured to: in response to the first cache being full, discard historical link quality messages stored in the first cache and store the link quality messages indicating a disconnection between the second switching node and the destination switching node in the first cache of the first message queue; or in response to the second cache being full, discard historical link quality messages stored in the second cache and store the link quality messages indicating a connection between the second switching node and the destination switching node in the second cache of the second message queue.

[0125] In at least one embodiment of this disclosure, the update module 803 is further configured to: in response to not receiving a link quality message sent by the target second switching node for a set time threshold, update the link transmission quality between the target second switching node and the destination switching node to the point where the link between the target second switching node and the destination switching node is disconnected, wherein the target second switching node is any switching node among the plurality of second switching nodes.

[0126] In at least one embodiment of this disclosure, the link quality message includes a port connection status, and the receiving module 801 is further configured to: receive a link quality message sent by the target second switching node in response to the port connection status between the target second switching node and the destination switching node changing from disconnected to connected, and the duration of the port connection status between the target second switching node and the destination switching node being connected being greater than a stable time threshold, wherein the target second switching node is any switching node among the plurality of second switching nodes.

[0127] It should be noted that, for clarity and brevity, one or more embodiments of this disclosure do not show all the constituent units of the network traffic processing device 800. To achieve the necessary functions of the network traffic processing device 800, those skilled in the art can provide and configure other constituent units (not shown) according to specific needs, and one or more embodiments of this disclosure do not impose any limitations on this.

[0128] At least one embodiment of this disclosure also provides an electronic device, including a processing device and a storage device, the storage device including one or more computer program modules; wherein the one or more computer program modules are stored in the storage device and configured to be executed by the processing device, the one or more computer program modules being used to implement the method for processing network traffic provided in any embodiment of this disclosure.

[0129] For example, the processing device may be a processor, such as a central processing unit (CPU), digital signal processor (DSP), image processor (GPU), general-purpose graphics processor (GPGPU), or other form of processing unit with data processing capabilities and / or instruction execution capabilities. It may be a general-purpose processor or a dedicated processor and may control other components in the electronic device to perform the desired functions.

[0130] For example, the storage device may be a memory, which may include one or more computer program products. These computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and a processing device may execute these program instructions to implement the functions (implemented by the processing device) in one or more embodiments of this disclosure and / or other desired functions. Various application programs and various data may also be stored in the computer-readable storage medium, which is not limited by one or more embodiments of this disclosure.

[0131] The following is for reference. Figure 9 This document illustrates a structural schematic of an electronic device (e.g., a terminal device or server) 900 suitable for implementing one or more embodiments of the present disclosure. The terminal device in one or more embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of one or more embodiments of this disclosure.

[0132] like Figure 9 As shown, electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 901, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 902 or a program loaded from storage device 908 into random access memory (RAM) 903. RAM 903 also stores various programs and data required for the operation of electronic device 900. Processing device 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.

[0133] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 9 An electronic device 900 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0134] In particular, according to one or more embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, one or more embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by a processing device 901, it performs the functions defined in the methods of one or more embodiments of this disclosure.

[0135] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0136] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0137] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0138] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: receive link quality messages sent by the plurality of second switching nodes respectively; store the link quality messages indicating a disconnection between the second switching node and the destination switching node in a first message queue, and store the link quality messages indicating a connection between the second switching node and the destination switching node in a second message queue; update the link transmission quality between the second switching node and the destination switching node based on the link quality messages in the first message queue if the first message queue is not empty; update the link transmission quality between the second switching node and the destination switching node based on the link quality messages in the second message queue if the first message queue is empty; and determine the transmission links for transmitting the network traffic based on the link transmission quality between the source switching node and each of the second switching nodes, and the link transmission quality between each of the second switching nodes and the destination switching node.

[0139] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0140] One or more embodiments of this disclosure also provide a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in any embodiment of this disclosure are generated.

[0141] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0142] When the computer program product is executed by a computer, the computer performs any of the aforementioned methods. The computer program product can be a software installation package; when any of the aforementioned methods is required, the computer program product can be downloaded and executed on the computer.

[0143] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0144] The units or modules described in one or more embodiments of this disclosure may be implemented in software or hardware. The names of the units or modules do not, in some cases, constitute a limitation on the unit or module itself.

[0145] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

[0146] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0147] According to one or more embodiments of this disclosure, Example 1 provides a method for processing network traffic, applied to a source switching node in a first switching network, the first switching network including a plurality of first switching nodes of a first type and a plurality of second switching nodes of a second type, wherein the network traffic is forwarded from the source switching node to any of the second switching nodes and then forwarded to a destination switching node, the source switching node and the destination switching node being the first switching node, the method comprising:

[0148] The system receives link quality messages sent by the plurality of second switching nodes, wherein the link quality messages characterize the link transmission quality between the second switching node and the destination switching node.

[0149] The link quality message indicating that the link between the second switching node and the destination switching node is disconnected is stored in the first message queue, and the link quality message indicating that the link between the second switching node and the destination switching node is connected is stored in the second message queue.

[0150] In response to the first message queue being non-empty, the link transmission quality between the second switching node and the destination switching node is updated according to the link quality message in the first message queue;

[0151] In response to the first message queue being empty, the link transmission quality between the second switching node and the destination switching node is updated according to the link quality message in the second message queue;

[0152] Based on the link transmission quality between the source switching node and each of the second switching nodes, and the link transmission quality between each of the second switching nodes and the destination switching node, a transmission link for transmitting the network traffic is determined.

[0153] According to one or more embodiments of this disclosure, the link quality message includes port connection status. Example 2 provides the link quality message in Example 1 indicating a disconnection of the link between the second switching node and the destination switching node, stored in a first message queue, and the link quality message indicating a connection of the link between the second switching node and the destination switching node, stored in a second message queue, including:

[0154] The link quality message indicating that the port connection status is disconnected is stored in the first message queue, and the link quality message indicating that the port connection status is connected is stored in the second message queue.

[0155] According to one or more embodiments of this disclosure, Example 3 provides the method of Example 2, further comprising:

[0156] The number of second switching nodes that meet the link transmission conditions is determined based on the link transmission quality between each second switching node and the destination switching node.

[0157] In response to the fact that the number of second switching nodes that meet the link transmission conditions is less than a set proportion, the link transmission quality between each second switching node and the destination switching node is updated to the same value.

[0158] According to one or more embodiments of this disclosure, the link quality message includes port connection status and link transmission metric values. Example 4 provides the method in Example 1 for determining the number of second switching nodes that meet the link transmission conditions based on the link transmission quality between each second switching node and the destination switching node, including:

[0159] For each of the link quality messages, in response to the port connection status being connected and the link transmission metric value meeting the metric value condition, it is determined that the second switching node that sent the link quality message meets the link transmission condition.

[0160] According to one or more embodiments of this disclosure, the link quality message includes port connection status and link transmission metric values. Example 5 provides the receipt of link quality messages sent by the plurality of second switching nodes respectively, as in Example 1, including:

[0161] In response to a change in the port connection status between the target second switching node and the destination switching node and / or a change in the link transmission index value between the target second switching node and the destination switching node between a first level and a second level, a link quality message sent by the target second switching node is received, wherein the target second switching node is any switching node among the plurality of second switching nodes.

[0162] According to one or more embodiments of this disclosure, Example Six provides a link quality message, as in Example One, indicating a disconnection of the link between the second switching node and the destination switching node, stored in a first message queue, and a link quality message indicating a connection of the link between the second switching node and the destination switching node, stored in a second message queue, including:

[0163] The link quality message indicating that the link between the second switching node and the destination switching node is disconnected is stored in the first buffer of the first message queue, and the link quality message indicating that the link between the second switching node and the destination switching node is connected is stored in the second buffer of the second message queue.

[0164] Wherein, the sizes of the first cache and the second cache are less than the storage threshold;

[0165] The method also includes:

[0166] In response to the first cache being full, historical link quality messages stored in the first cache are discarded, and the link quality message indicating a disconnection between the second switching node and the destination switching node is stored in the first cache of the first message queue; or

[0167] In response to the second cache being full, the historical link quality messages stored in the second cache are discarded, and the link quality messages representing the link connection between the second switching node and the destination switching node are stored in the second cache of the second message queue.

[0168] According to one or more embodiments of this disclosure, Example 7 provides the method of Example 1, further comprising:

[0169] In response to not receiving a link quality message from the target second switching node for more than a set time threshold, the link transmission quality between the target second switching node and the destination switching node is updated to indicate that the link between the target second switching node and the destination switching node is disconnected, wherein the target second switching node is any switching node among the plurality of second switching nodes.

[0170] According to one or more embodiments of this disclosure, the link quality message includes port connection status. Example 8 provides the receipt of link quality messages sent by the plurality of second switching nodes respectively, as in Example 1, including:

[0171] In response to the port connection status between the target second switching node and the destination switching node changing from disconnected to connected, and the duration of the connection status between the target second switching node and the destination switching node being connected being greater than a stable time threshold, a link quality message sent by the target second switching node is received, wherein the target second switching node is any switching node among the plurality of second switching nodes.

[0172] According to one or more embodiments of this disclosure, Example 9 provides an apparatus for processing network traffic, a source switching node deployed in a first switching network, the first switching network including a plurality of first switching nodes of a first type and a plurality of second switching nodes of a second type, wherein the network traffic is forwarded from the source switching node to any of the second switching nodes and then forwarded to a destination switching node, the source switching node and the destination switching node being the first switching node, the apparatus comprising:

[0173] The receiving module is configured to receive link quality messages sent by the plurality of second switching nodes respectively, wherein the link quality messages characterize the link transmission quality between the second switching node and the destination switching node;

[0174] The storage module is configured to: store the link quality message indicating that the link between the second switching node and the destination switching node is disconnected in a first message queue, and store the link quality message indicating that the link between the second switching node and the destination switching node is connected in a second message queue;

[0175] The update module is configured to: in response to the first message queue being non-empty, update the link transmission quality between the second switching node and the destination switching node based on the link quality message in the first message queue;

[0176] The update module is further configured to: in response to the first message queue being empty, update the link transmission quality between the second switching node and the destination switching node according to the link quality message in the second message queue;

[0177] The determination module is configured to: determine the transmission link for transmitting the network traffic based on the link transmission quality between the source switching node and each of the second switching nodes, and the link transmission quality between each of the second switching nodes and the destination switching node.

[0178] According to one or more embodiments of this disclosure, Example 10 provides an electronic device, including:

[0179] Processing device; and

[0180] Storage device, including one or more computer program instructions;

[0181] The one or more computer program instructions are executed by a processing device to perform the method for processing network traffic provided in at least one embodiment of the present disclosure.

[0182] According to one or more embodiments of the present disclosure, Example 11 provides a computer-readable storage medium that non-transitory stores computer-readable instructions, wherein the computer-readable instructions, when executed by a processor, implement the method for processing network traffic provided in at least one embodiment of the present disclosure.

[0183] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0184] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0185] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A method for processing network traffic, applied to a source switching node in a first switching network, the first switching network including a plurality of first switching nodes of a first type and a plurality of second switching nodes of a second type, wherein the network traffic is forwarded from the source switching node to any of the second switching nodes and then forwarded to a destination switching node, the plurality of first switching nodes including the source switching node and the destination switching node; the method includes: The system receives link quality messages sent by the plurality of second switching nodes, wherein the link quality messages characterize the link transmission quality between the second switching node and the destination switching node. The link quality message indicating that the link between the second switching node and the destination switching node is disconnected is stored in the first message queue, and the link quality message indicating that the link between the second switching node and the destination switching node is connected is stored in the second message queue. In response to the first message queue being non-empty, the link transmission quality between the second switching node and the destination switching node is updated according to the link quality message in the first message queue; In response to the first message queue being empty, the link transmission quality between the second switching node and the destination switching node is updated according to the link quality message in the second message queue; Based on the link transmission quality between the source switching node and each of the second switching nodes, and the link transmission quality between each of the second switching nodes and the destination switching node, a transmission link for transmitting the network traffic is determined.

2. The method according to claim 1, wherein, The link quality message includes the port connection status. The method of storing the link quality message indicating a disconnection between the second switching node and the destination switching node in a first message queue, and storing the link quality message indicating a connection between the second switching node and the destination switching node in a second message queue, includes: The link quality message indicating that the port connection status is disconnected is stored in the first message queue, and the link quality message indicating that the port connection status is connected is stored in the second message queue.

3. The method according to claim 1, further comprising: The number of second switching nodes that meet the link transmission conditions is determined based on the link transmission quality between each second switching node and the destination switching node. In response to the fact that the number of second switching nodes that meet the link transmission conditions is less than a set proportion, the link transmission quality between each second switching node and the destination switching node is updated to the same value.

4. The method according to claim 4, wherein, The link quality message includes port connection status and link transmission metric values. The step of determining the number of second switching nodes that meet the link transmission conditions based on the link transmission quality between each second switching node and the destination switching node includes: For each of the link quality messages, in response to the port connection status being connected and the link transmission metric value meeting the metric value condition, it is determined that the second switching node that sent the link quality message meets the link transmission condition.

5. The method according to claim 1, wherein, The link quality message includes port connection status and link transmission metric values. Receiving the link quality messages sent by the plurality of second switching nodes respectively includes: In response to a change in the port connection status between the target second switching node and the destination switching node and / or a change in the link transmission index value between the target second switching node and the destination switching node between a first level and a second level, a link quality message sent by the target second switching node is received, wherein the target second switching node is any switching node among the plurality of second switching nodes.

6. The method according to claim 1, wherein, The method of storing the link quality message indicating a disconnection between the second switching node and the destination switching node in a first message queue, and storing the link quality message indicating a connection between the second switching node and the destination switching node in a second message queue, includes: The link quality message indicating that the link between the second switching node and the destination switching node is disconnected is stored in the first cache of the first message queue, and the link quality message indicating that the link between the second switching node and the destination switching node is connected is stored in the second cache of the second message queue; wherein the size of the first cache and the second cache is less than the storage threshold. The method further includes: In response to the first cache being full, historical link quality messages stored in the first cache are discarded, and the link quality message indicating a disconnection between the second switching node and the destination switching node is stored in the first cache of the first message queue; or In response to the second cache being full, the historical link quality messages stored in the second cache are discarded, and the link quality messages representing the link connection between the second switching node and the destination switching node are stored in the second cache of the second message queue.

7. The method according to any one of claims 1 to 6, further comprising: In response to not receiving a link quality message from the target second switching node for more than a set time threshold, the link transmission quality between the target second switching node and the destination switching node is updated to indicate that the link between the target second switching node and the destination switching node is disconnected, wherein the target second switching node is any switching node among the plurality of second switching nodes.

8. The method according to any one of claims 1 to 6, wherein, The link quality message includes port connection status, and receiving the link quality messages sent by the plurality of second switching nodes respectively includes: In response to the port connection status between the target second switching node and the destination switching node changing from disconnected to connected, and the duration of the connection status between the target second switching node and the destination switching node being connected being greater than a stable time threshold, a link quality message sent by the target second switching node is received, wherein the target second switching node is any switching node among the plurality of second switching nodes.

9. An apparatus for processing network traffic, deployed at a source switching node in a first switching network, the first switching network including a plurality of first switching nodes of a first type and a plurality of second switching nodes of a second type, wherein the network traffic is forwarded from the source switching node to any of the second switching nodes and then forwarded to a destination switching node, the source switching node and the destination switching node being the first switching nodes; the apparatus comprising: The receiving module is configured to receive link quality messages sent by the plurality of second switching nodes respectively, wherein the link quality messages characterize the link transmission quality between the second switching node and the destination switching node; The storage module is configured to: store the link quality message indicating that the link between the second switching node and the destination switching node is disconnected in a first message queue, and store the link quality message indicating that the link between the second switching node and the destination switching node is connected in a second message queue. The update module is configured to: in response to the first message queue being non-empty, update the link transmission quality between the second switching node and the destination switching node based on the link quality message in the first message queue; The update module is further configured to: in response to the first message queue being empty, update the link transmission quality between the second switching node and the destination switching node according to the link quality message in the second message queue; The determination module is configured to: determine the transmission link for transmitting the network traffic based on the link transmission quality between the source switching node and each of the second switching nodes, and the link transmission quality between each of the second switching nodes and the destination switching node.

10. An electronic device, comprising: Processing device; as well as Storage device, including one or more computer program instructions; The one or more computer program instructions are executed by the processing device to follow the method according to any one of claims 1 to 8.

11. A computer-readable storage medium for non-transitory storage of computer-readable instructions, wherein, The method of any one of claims 1 to 8 is implemented when the computer-readable instructions are executed by a processor.