Traffic processing system and method, data processing method, device, medium and product

By reversing the source port number at the data sending end, the problem of link utilization imbalance caused by hash collisions is solved, load balancing is achieved, network bandwidth utilization is improved, and costs and complexity are reduced. It is suitable for small-scale high-density intelligent computing scenarios.

CN121357103BActive Publication Date: 2026-05-15ALIBABA CLOUD FEITIAN (HANGZHOU) CLOUD COMPUTING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIBABA CLOUD FEITIAN (HANGZHOU) CLOUD COMPUTING TECH CO LTD
Filing Date
2025-12-18
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing link aggregation technologies, hash collisions cause some member links to become congested, while other links are underutilized, resulting in an imbalance in link utilization. Furthermore, the dual-plane network architecture is costly, complex, and has low cost-effectiveness.

Method used

The data sending end knows the switch's hash scheduling rules in advance, and by constructing the source port number in reverse, it ensures that the hash result hits a specific link, thereby achieving load balancing, mitigating hash collisions, and achieving a dual-forwarding-plane-like effect in a single forwarding plane.

Benefits of technology

It effectively alleviates hash collisions, improves network bandwidth utilization, reduces switch costs and network connection complexity, and is suitable for small-scale, high-density intelligent computing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121357103B_ABST
    Figure CN121357103B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a flow processing system and method, a data processing method, equipment, a medium and a product. In the embodiments, a data sending end knows a hash scheduling rule adopted by a switch and an input field (i.e., a source port), and according to an identifier of a physical link from which target data is sent, a source port number satisfying the hash scheduling rule of the switch is reversely constructed, and it is ensured that a hash result of the source port number hits a specific link connected to the switch by a destination end. By actively modulating the source port number to introduce sufficient entropy, hash conflicts can be effectively alleviated. The data sending end implements an effective load balancing strategy on an uplink, and the sending end reversely constructs the source port number to ensure that different data streams are forwarded by specific downlinks, so that the flow distribution of the downlinks corresponds to the uplink, and the flow in the downlink direction is also balanced, which can effectively alleviate the imbalance of the utilization rate of the physical link.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a traffic processing system and method, data processing method, device, medium and product. Background Technology

[0002] With the continuous development of Artificial Intelligence (AI) technology, the demand for intelligent computing (AI) inference tasks in scenarios such as edge computing, terminal-side inference, and lightweight model deployment continues to grow. To improve network bandwidth utilization and enhance link reliability, intelligent computing clusters commonly adopt link aggregation technology, which bundles multiple physical links into a logical link to form an aggregated link (Bond), thereby achieving bandwidth aggregation and redundancy fault tolerance.

[0003] The actual performance of link aggregation is highly dependent on the load balancing mechanism of traffic among member links. Current mainstream implementations use a traffic distribution strategy based on hash algorithms to determine the outgoing physical interface of packets. Due to the inherent distribution characteristics of hash functions and the non-uniformity of actual traffic patterns, hash collisions are prone to occur. That is, multiple high-traffic data streams are mapped to the same hash bucket and are thus scheduled to the same physical link, resulting in congestion on some member links while other links are underutilized. Summary of the Invention

[0004] This application provides a traffic processing system and method, a data processing method, an apparatus, a medium, and a product to mitigate hash collisions in a single forwarding plane.

[0005] This application also provides a traffic processing system, including: multiple service nodes and switches; the service nodes and the switches are connected via aggregated links;

[0006] When acting as a source service node, the service node is used to determine, based on a preset load balancing method, the first physical link for transmitting the target data from the first aggregated link between the service node and the switch; determine the source port number that satisfies the hash scheduling rules of the switch based on the identifier of the first physical link; and send the target packet carrying the source port number and the target data to the switch through the first physical link.

[0007] The switch is configured to determine the hash result of the source port number according to the hash scheduling rule; and, based on the hash result, determine a second physical link from the second aggregated link between the switch and the destination service node of the target packet; and forward the target packet to the destination service node through the second physical link.

[0008] This application also provides a traffic processing method applied to a service node, wherein the service node is connected to a switch via a first aggregated link; the method includes:

[0009] For the target data to be transmitted, a first physical link for transmitting the target data is determined from the first aggregated link according to a preset load balancing method;

[0010] Based on the identifier of the first physical link, determine the source port number that satisfies the hash scheduling rule of the switch;

[0011] The target packet carrying the source port number and the target data is sent to the switch through the first physical link, so that the switch can determine the second physical link for transmitting the target packet from the second aggregated link between the switch and the destination service node of the target packet according to the first hash result of the source port number; wherein, the first hash result is determined according to the hash scheduling rule.

[0012] This application also provides a traffic processing method applied to a switch, the method comprising:

[0013] The target packet is obtained from the first physical link; wherein the first physical link is determined by the source serving node of the target packet from the first aggregated link between itself and the switch according to a preset load balancing method;

[0014] According to the hash scheduling rule, the first hash result of the source port number of the target packet is determined; wherein, the source port number is determined by the source service node based on the identifier of the first physical link and satisfies the hash scheduling rule;

[0015] Based on the first hash result, a second physical link is determined from the second aggregated link between the switch and the destination service node of the target packet;

[0016] The target message is forwarded to the destination service node via the second physical link.

[0017] This application also provides a data processing method, applied to a gated network and / or a service node where the expert network is located in a hybrid expert network, wherein the service node is connected to the switch via a first aggregated link;

[0018] The method includes:

[0019] For the target output result of the gated network or expert network deployed by the service node, the first physical link for transmitting the target output result is determined from the first aggregated link according to the preset load balancing method;

[0020] Based on the identifier of the first physical link, determine the source port number that satisfies the hash scheduling rule of the switch;

[0021] The target packet carrying the target output result and the source port number is sent to the switch through the first physical link, so that the switch can determine the second physical link for transmitting the target packet from the second aggregated link between the switch and the destination service node of the target packet according to the first hash result of the source port number;

[0022] The first hash result is determined according to the hash scheduling rule.

[0023] This application also provides a data processing method applied to a switch, the method comprising:

[0024] The target packet is obtained from the first physical link; the first physical link is determined by the source service node of the target packet from the first aggregated link between it and the switch according to a preset load balancing method; the source service node is the service node of the gated network and / or the expert network in the hybrid expert network; the target packet includes the target output result of the gated network and / or the expert network.

[0025] According to the hash scheduling rule, the first hash result of the source port number of the target packet is determined; wherein the source port number is determined by the source service node based on the identifier of the first physical link and satisfies the hash scheduling rule;

[0026] Based on the first hash result, a second physical link is determined from the second aggregated link between the switch and the destination service node of the target packet;

[0027] The target message is forwarded to the destination service node via the second physical link; wherein, if the source service node is the service node where the gated network is located, the destination service node is the service node where the expert network is located; if the source service node is the service node where the expert network is located, the destination service node is the service node where the aggregation network in the hybrid expert network is located.

[0028] This application also provides an electronic device, including: a memory and a processor; wherein the memory is used to store computer programs;

[0029] The processor is coupled to the memory and is used to execute the computer program to perform the steps in the above-described traffic processing method and / or data processing method.

[0030] This application also provides a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps in the above-described traffic processing method and / or data processing method.

[0031] This application also provides a computer program product, including a computer program that, when executed by one or more processors, causes the one or more processors to perform the steps in the above-described traffic processing method and / or data processing method.

[0032] In this embodiment, the data sender anticipates the hash scheduling rules and input fields (i.e., source ports) used by the switch, and constructs a source port number that satisfies the switch's hash scheduling rules based on the identifier of the physical link sending the target data. This ensures that the hash result of the source port number hits the specific link connecting the destination and the switch. By actively modulating the source port number to introduce sufficient entropy, hash collisions can be effectively mitigated. The data sender implements an effective load balancing strategy on the uplink. By constructing the source port number in reverse, the sender ensures that different data streams are forwarded by specific downlinks, maintaining a correspondence between the downlink traffic distribution and the uplink. This also achieves a balanced distribution of downlink traffic, effectively alleviating the problem of unbalanced physical link utilization. Attached Figure Description

[0033] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0034] Figure 1 This is a schematic diagram illustrating the working principle of a traditional single-forwarding-plane network architecture.

[0035] Figure 2 This is a schematic diagram illustrating the working principle of a dual-forwarding-plane network architecture.

[0036] Figure 3 This is a schematic diagram of the structure of the traffic processing system provided in the embodiments of this application;

[0037] Figure 4 A schematic diagram illustrating the process of traffic processing by the traffic processing system provided in this embodiment of the application;

[0038] Figure 5 and Figure 6A schematic flowchart illustrating the traffic processing method provided in an embodiment of this application;

[0039] Figure 7 and Figure 8 A flowchart illustrating the data processing method provided in an embodiment of this application;

[0040] Figure 9 and Figure 10 A schematic diagram illustrating the bandwidth test results of a traditional traffic processing method and the traffic processing method provided in the embodiments of this application;

[0041] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0043] It should be noted that, in the case of user information involved in the embodiments of this application, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0044] Link aggregation technology is widely used for interconnecting the access layer (i.e., the Leaf layer) in a Leaf-Spine architecture. In this architecture, the Spine layer is located at the network center, and all Leaf layer switches are connected to switches in each Spine layer. Leaf layer switches are located at the edge, directly connecting to servers or other terminal devices. Communication between servers within the same Leaf switch can be completed directly without going through Spine layer switches.

[0045] However, the actual performance of link aggregation is highly dependent on the load balancing mechanism among member links. Current mainstream implementations employ a traffic distribution strategy based on hash algorithms. This involves extracting the five-tuple information from the data stream, performing hash calculations, and then taking the modulo of the hash result with the number of active member links to determine the outgoing physical interface of the packet. The five-tuple information includes: source Internet Protocol (IP) address, destination IP address, source port number, destination port number, and transport layer protocol type.

[0046] Due to the inherent distribution characteristics of hash functions and the non-uniformity of actual traffic patterns, quintuples have low entropy values ​​and are prone to hash collisions, meaning that multiple high-traffic data streams are mapped to the same hash bucket and thus scheduled to the same physical link. For example... Figure 1 As shown, at the Leaf switch level, when the five-tuple characteristics of upstream traffic exhibit a localized concentration trend, it will lead to overload and congestion of some member links, while the remaining links will be underutilized, resulting in an imbalance in link utilization. Figure 1 In the middle, computing node 1 and computing node 2 are the sender and receiver of the data stream, respectively, with IP addresses IP1 and IP2. Figure 1 A bond consists of two physical links, with black and white circles representing data flows. Figure 1 The transmitting end uses a round-robin method to perform load balancing on the two physical links. For data streams transmitted on the two physical links, the source port number of the data stream is determined randomly; the other five-tuple information remains unchanged. Therefore, as... Figure 1 As shown, the switch performs hash calculation on the five-tuple information of the data flow according to the hash algorithm, and takes the modulo of the number of active member links with the hash result value to determine the outgoing physical interface of the packet, resulting in the data flow being centrally routed to physical link 1, while physical link 2 is in a low utilization state.

[0047] To mitigate hash collisions, a dual-plane network architecture is commonly used, which increases the number of switches to achieve physical link redundancy and load balancing. Specifically, for example... Figure 2 As shown, each server is connected to two independent uplink switches (e.g., via two independent physical links) Figure 2 In this architecture, all servers are connected symmetrically, creating two logically isolated forwarding planes—forwarding plane A and forwarding plane B. This architecture achieves link isolation and cross-device load balancing at the physical layer, ensuring that data transmission and reception occur on the same forwarding plane. Because the sending end distributes traffic evenly across the two planes through load balancing scheduling, there is no uneven load distribution in the downlink receiving link. Figure 2As shown, compute node 1 and compute node 2 are the sender and receiver of the data stream, respectively, with IP addresses IP1 and IP2. Figure 1 A bond consists of two physical links, with black and white circles representing data flows. Figure 2 The sending end uses a round-robin method to perform load balancing on the two physical links, distributing the data flow evenly across the two forwarding planes. Therefore, the data flow is also evenly distributed on the physical links between computing node 2 and switches 1 and 2.

[0048] However, this dual-plane architecture faces significant cost challenges. First, even with a small computing cluster, at least two switches are still required, leading to a substantial increase in the switch cost per unit of computing power. Second, the dual-plane design introduces additional cabling complexity, rack space requirements, and power supply needs, significantly increasing deployment, maintenance, and cooling costs.

[0049] In summary, while the traditional dual-plane Bond networking scheme has performance and reliability advantages in large clusters, its cost-effectiveness is low and it lacks competitive advantage in small-scale, low-cost, high-density intelligent computing scenarios.

[0050] In some embodiments of this application, the data sender anticipates the hash algorithm and input field (i.e., source port) used by the switch, and constructs a source port number that satisfies the switch's hash scheduling rules based on the hash algorithm and the identifier of the physical link sending the target data. This ensures that the hash result of the source port number hits the specific link connecting the destination and the switch. By actively modulating the source port number to introduce sufficient entropy, hash collisions can be effectively mitigated. The data sender implements an effective load balancing strategy on the uplink. By constructing the source port number in reverse, the sender ensures that different data streams are forwarded by specific downlinks, maintaining a correspondence between the downlink traffic distribution and the uplink. This also achieves a balanced distribution of downlink traffic, effectively alleviating the problem of unbalanced physical link utilization.

[0051] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0052] It should be noted that the same reference numerals in the following figures and embodiments denote the same object or the same step. Therefore, once an object or step is defined in one figure or embodiment, it does not need to be discussed further in subsequent figures and embodiments.

[0053] Figure 3 This is a schematic diagram of the traffic processing system provided in an embodiment of this application. Figure 3As shown, the traffic processing system includes multiple service nodes 10 and switches 20. In various embodiments of this application, "multiple" refers to two or more (including two). In this embodiment, a service node 10 can be a single server device, a cloud-based server array, or a virtual machine (VM) running in a cloud-based server array. Additionally, a server device can also refer to other computing devices with corresponding service capabilities, such as computers or other terminal devices (running service programs).

[0054] Service node 10 and switch 20 are connected via an aggregation link (Bond). An aggregation link comprises multiple physical links. Switch 20 is a single unit with a single forwarding plane. Figure 3 The traffic processing system shown is a single-plane bond network architecture. Service node 10 may include one or more network interface cards (NICs). "Multiple" means two or more (including two). Figure 3 A service node 10 in China includes 2 network interface cards (NICs). Figure 3 The illustration uses “1” and “2” as examples, but this does not constitute a limitation. Figure 3 A physical link within an ellipse is considered an aggregated link. Generally, there are one or more aggregated links between the same service node and a switch, with different aggregated links providing network services to different users. Physical links connected to the same network interface card (NIC) belong to the same aggregated link, while physical links connected to different NICs belong to different aggregated links.

[0055] Switch 20 uses a hash algorithm to select forwarding links for packets. Specifically, switch 20 determines the hash result of the source port number of the packet according to the hash algorithm. A hash algorithm is a mathematical function that maps input data of arbitrary length to a fixed-length output (called a hash value or digest). Hash algorithms can be 32-bit Cyclic Redundancy Check 32 (CRC32) algorithms, consistent hashing algorithms, Message Digest 5 (MD5) algorithms, or Secure Hash Algorithm (SHA), etc.

[0056] The CRC32 algorithm is based on polynomial division modulo 2 on the input data to obtain a 32-bit checksum, which is the hash value of the input data. The Toeplitz Hash algorithm uses a predefined Toeplitz matrix (with identical elements on each diagonal), performs a dot product operation on the input data and the matrix, obtains the dot product result, and then uses the dot product result modulo 2 to obtain the hash result of the input data.

[0057] Consistent hashing is a special type of hashing algorithm that organizes the entire hash space into a ring structure. Both the downlink physical link and the source port number are mapped to a specific position on the ring using a hash function. The hash value of the source port number is calculated using the hash function and mapped onto the ring; similarly, the hash value of the physical link identifier is calculated using the hash function and also mapped onto the ring. Then, starting from the position of the source port number on the ring, a clockwise search is performed, and the first physical link encountered is the one that transmitted the message.

[0058] The MD5 algorithm can convert input data of any length into a 128-bit (16-byte) hash value. SHA is a family of algorithms, including SHA-1 and SHA-2. SHA-1 is used to convert input data into a 160-bit hash value. SHA-2 is a family that includes SHA-224, SHA-256, SHA-384, and SHA-512. SHA-224, SHA-256, SHA-384, and SHA-512 are used to convert input data into 224-bit, 256-bit, and 384-bit hash values, respectively, totaling 512 bits.

[0059] In the various embodiments of this application, the input data is the source port number of the packet. The hash algorithms shown in the foregoing embodiments are merely illustrative and do not constitute a limitation. In the embodiments of this application, the switch 20 inputs the source port number of the packet into the hash function corresponding to the hash algorithm to obtain the hash result of the source port number; and selects a physical link for the packet from the aggregated links between the destination of the packet and the switch 20 based on the hash result of the source port number.

[0060] When service node 10 acts as the sender of a message (i.e., the source service node), it performs load balancing on the aggregated link between service node 10 and switch 20 according to a preset load balancing method. That is, it distributes the data flow evenly across multiple physical links included in the aggregated link according to the preset load balancing method. The load balancing method set on the service node 10 side can be a round-robin method. Accordingly, service node 10 can distribute the data flow evenly across multiple physical links included in the aggregated link according to the round-robin method. In this embodiment, for ease of description and distinction, the aggregated link between the message sender (i.e., the source service node) and switch 20 is defined as the first aggregated link; and the aggregated link between the message receiver (i.e., the destination service node) and switch 20 is defined as the second aggregated link.

[0061] For the target data to be transmitted (i.e. sent) by the source service node, the source service node 101 can determine the physical link (defined as the first physical link) for transmitting the target data from the first aggregated link between the source service node 101 and the switch according to the preset load balancing method.

[0062] Since the source service node, the sender of the data stream, distributes traffic evenly across multiple physical links included in the first aggregation link through load balancing, and the switch 20 determines the hash result of the source port number of the data stream using a hash algorithm, and schedules the data stream to multiple physical links included in the second aggregation link based on the hash result of the source port number, if the source port number is inferred in reverse based on the strategy of selecting physical links for the data stream on the switch 20 side, the switch 20 can ensure that a data stream originating from a certain physical link in the first aggregation link is scheduled to a fixed physical link in the second aggregation link. This achieves the binding or mapping of physical links in the first aggregation link and physical links in the second aggregation link, thereby ensuring that the data stream is evenly distributed among the multiple physical links included in the second aggregation link. Based on this, the hash scheduling rules adopted by the switch 20 can be pre-set on the service node 10 side. Based on the hash algorithm adopted by the switch 20, when the service node 10 acts as the sender of the target data, it can determine the source port number that satisfies the hash scheduling rules of the switch based on the identifier of the first physical link transmitting the target data.

[0063] like Figure 4 As shown, source service node 101 is connected via the first aggregation link. Connect to switch 20, where n is the total number of physical links included in the first aggregated link. n≥2, and n is an integer. Figure 3 and Figure 4 In the case of n=2. If the i-th physical link is in the first aggregated link, then as follows: Figure 4 As shown, from any physical link Data sent The source port number (defined as the target data) It can be determined by the source service node 101 based on the physical link. The identifier (i-1) is determined by the hash algorithm used by switch 20. The following example illustrates this using the first physical link corresponding to the target data.

[0064] In some embodiments, the source service node 101 may, based on the first physical link The mapping relationship between the identifier and the pre-set physical link identifier and the hash result is used to determine the first physical link. The identifier corresponds to the hash result in this mapping relationship. The hash result in the mapping relationship between the physical link identifier and the hash result refers to the hash result of the source port number. In some embodiments, the mapping relationship between the physical link identifier and the hash result can be implemented as follows: the physical link identifier is equal to the hash result of the source port number. That is, the mapping relationship between the physical link identifier and the hash result can be expressed as:

[0065] (1).

[0066] In equation (1) The source port number. The hash function used to perform hash calculations on the source port numbers of switch 20. For physical links The identifier. This mapping relationship implementation only requires a reverse hash search when determining the source port number, which enables the source service node to construct the source port number autonomously, with low computational overhead and strong determinism.

[0067] In other embodiments, the mapping relationship between the physical link identifier and the hash result can be implemented as follows: the modulo result of the physical link identifier divided by the total number m of physical links included in the second aggregated link is equal to the hash result of the source port number. That is, the mapping relationship between the physical link identifier and the hash result can be expressed as:

[0068] (2).

[0069] In equation (2), m represents the total number of physical links included in the second aggregated link. m ≥ 2, and m is an integer. Generally, the total number of physical links m included in the second aggregated link is equal to the total number of physical links n included in the first aggregated link. This indicates taking the modulus.

[0070] This mapping relationship implementation only requires integer modulo and hash reverse search when determining the source port number, which enables the source service node to construct the source port number autonomously. The computational overhead is low and the determinism is strong. On the other hand, the mapping relationship shown in Equation (2) is the physical link load balancing method commonly used by mainstream switches. Therefore, this mapping relationship is compatible with traditional switches, reducing the cost of modifying the switch-side software.

[0071] Based on the mapping relationship between the identifier and hash result of the aforementioned physical link, the first physical link can be used as a reference. The mapping relationship between the identifier and the pre-set physical link identifier and the hash result is used to determine the first physical link. The identifier corresponds to the hash result in this mapping relationship. For example, the hash result of the first physical link can be calculated. The identifier is the modulo result of the total number m of physical links included in the second aggregated link, and this modulo result is used to determine the first physical link. The identifier corresponds to the hash result in this mapping relationship. Furthermore, the source port number can be used as the variable to be determined, and the hash result of the source port number calculated according to the hash algorithm is equal to the first physical link. The hash result corresponding to the identifier in the mapping relationship is used as a constraint to construct a mathematical model. The constructed mathematical model can be shown as equation (1) or (2). Further, the mathematical model can be solved to obtain the source port number of the message to be sent. Among them, in equation (1), the first physical link The hash result corresponding to the identifier in this mapping relationship is equal to the first physical link. The identifier; in equation (2) the first physical link The hash result corresponding to the identifier in this mapping relationship is equal to the first physical link. The identifier is the modulo result of the total number m of physical links contained in the second aggregated link.

[0072] This embodiment is based on the pre-configured mapping relationship between the physical link identifier and the hash result and the reverse hash search, which enables the sender to actively construct the source port number. It has low computational overhead and strong determinism.

[0073] In other embodiments, the hash algorithm is a consistent hash algorithm, in which case the first physical link can be determined based on the consistent hash algorithm. The hash result of the identifier. Specifically, the first physical link The identifier is input into the consistent hash algorithm and the corresponding hash function is used for hash calculation to obtain the first physical link. The hash result of the identifier. Further, the source port number can be used as the variable to be determined, based on the first physical link. The difference between the hash result of the identifier and the hash result of the source port number, modulo the result of the hash of the second aggregated link with the total number m of physical links included in the first aggregated link, is less than the difference between the hash result of the other physical links in the first aggregated link. The difference between the hash result of the identifier and the hash result of the source port number, modulo the result of the hash of the second aggregated link with the total number m of physical links included, is used as a constraint to construct a mathematical model. Accordingly, this mathematical model can be implemented as follows:

[0074] (3).

[0075] In equation (3), j = 1, 2, ..., n, and i ≠ j. Furthermore, the mathematical model shown in equation (3) can be solved to obtain the source port number. .

[0076] This embodiment requires consistent hashing to be implemented on the switch side, necessitating the switch to maintain a hash ring structure, which places high demands on the switch. Consistent hashing can support the addition or removal of physical links in the second aggregation link and is applicable to downlinks of variable size.

[0077] In other embodiments, the source service node 101 can pre-determine the correspondence between the physical link identifier and the source port number based on the identifier of each physical link in the first aggregated link and the hash algorithm corresponding to the hash scheduling rule adopted by the switch. Specifically, the hash result corresponding to the identifier of each physical link in the mapping relationship can be determined based on the identifier of each physical link and the pre-set mapping relationship between the identifier of each physical link and the hash result. For the specific implementation of the mapping relationship between the identifier of the physical link and the hash result, please refer to the relevant content of the foregoing embodiments, which will not be repeated here. Further, for any physical link in the first aggregated link, a mathematical model can be constructed with the source port number as the variable to be determined and the hash result of the source port number calculated according to the hash algorithm being equal to the hash result corresponding to the physical link in the aforementioned mapping relationship as the constraint condition. Solving the data model yields the source port number corresponding to the physical link. Using the same method, the source port numbers corresponding to each physical link in the first aggregated link can be obtained. Based on this, the correspondence between the identifier and the source port number of each physical link in the first aggregated link can be obtained. The source service node 101 can store this correspondence. Subsequently, when sending target data, the source port number corresponding to the identifier of the first physical link can be obtained from the correspondence between the identifiers of each physical link in the first aggregated link and the source port number, based on the identifier of the first physical link sending the target data. This source port number satisfies the hash scheduling rules of the switch. In this embodiment, the source port number corresponding to each physical link is determined in advance according to the hash scheduling rules of the switch. When sending data, it is only necessary to query this correspondence based on the identifier of the physical link transmitting the data to determine the corresponding source port number, which helps to improve the efficiency of source port number determination and thus improve data transmission efficiency.

[0078] After determining the target data Corresponding source port number Afterwards, source service node 101 can send the target data according to the source port number. Encapsulated into a target message. Specifically, source service node 101 can use its own IP address as the source IP address, the destination service node 102's IP address as the destination IP address, and the source port number... The source port number is the specified destination port number, and the destination data is the target port number. The target data is encapsulated into a message body to obtain the target message. Furthermore, the source service node 101 can access the target message via the first physical link. The target message is sent to switch 20.

[0079] In this embodiment, the data sender anticipates the hash scheduling rules and input fields (i.e., source port) used by the switch. Based on the identifier of the physical link sending the target data, it reverse-engineers a source port number that satisfies the switch's hash scheduling rules. By writing the source port number into the message to be sent, it ensures that the hash result accurately hits the specific link connecting the destination and the switch. This implementation method can introduce sufficient entropy through active modulation of the source port number, effectively mitigating or even eliminating hash collisions, thereby alleviating the problem of unbalanced physical link utilization caused by hash collisions.

[0080] Because each physical link independently carries a set of communication flows, the sending end ensures that different data flows are sent via specific uplinks according to the expected paths by constructing source port numbers in reverse. This achieves a strict binding between the sending and receiving paths, forming a symmetrical forwarding mode of "send from where it goes, receive from where it comes in." This achieves a quasi-dual-forwarding-plane effect in a single-forwarding-plane switch, improving network bandwidth utilization. For example, ... Figure 4 As shown, the source service node 101 constructs the source port number of the data stream in reverse using the method provided in the aforementioned embodiment, so that packets sent from the physical link 1 of the first aggregation link (i.e., the physical link where the white circle is located) are deterministically transmitted to the physical link 1 of the second aggregation link (i.e., the physical link where the white circle is located); packets sent from the physical link 2 of the first aggregation link (i.e., the physical link where the black circle is located) are deterministically transmitted to the physical link 2 of the second aggregation link (i.e., the physical link where the black circle is located).

[0081] Because the data sender implements an effective load balancing strategy on the uplink side, the sender ensures that different data streams are forwarded by specific downlinks by constructing source port numbers in reverse, so that the traffic distribution of the downlink corresponds to that of the uplink. Therefore, the traffic in the downlink direction is also evenly distributed, which can effectively alleviate the problem of physical link utilization imbalance.

[0082] The second aggregation link between destination service node 102 and switch 20 can be represented as: Switch 20 can use the aforementioned hash algorithm to transfer the target data. The physical link mapped to the unique destination node D in the second aggregated link m ≥ 2 and is an integer. Figure 4 The diagram illustrates an example with m=2. Therefore, arbitrarily starting from the first physical link... The destination receiving path of the sent data stream is determined as follows: Instead of being hashed to a member link of the second aggregation link, it will not be hashed to a member link of the second aggregation link. This makes single-plane access and physical multi-plane isolation have the same forwarding effect in link aggregation scenarios, achieving a dual-forwarding-plane-like forwarding effect in a single-forwarding-plane switch, which can improve network bandwidth utilization. Compared with the dual-forwarding-plane solution, no additional switches are required, which can reduce switch costs and network connection complexity.

[0083] Specifically, switch 20 can parse the source port number from the target packet. Furthermore, such as Figure 4 As shown, switch 20 determines the source port number according to the aforementioned hash algorithm. The hash result. In this embodiment of the application, for ease of description and distinction, the source port number determined by switch 20 is... The hash result is defined as the first hash result; the identifier of the aforementioned physical link is... The hash result corresponding to the mapping relationship between the physical link identifier and the hash result is defined as the second hash result. Specifically, switch 20 can assign the source port number... Input the hash function corresponding to the hash algorithm, and input the source port number. Perform a hash calculation to obtain the source port number. The hash result (i.e., the first hash result).

[0084] Furthermore, such as Figure 4 As shown, switch 20 can determine the physical link of the target packet to be transmitted from the aggregated link between switch 20 and destination service node 102 based on the first hash result. (Defined as the second physical link).

[0085] Specifically, the target identifier of the physical link corresponding to the first hash result can be determined based on the pre-configured mapping relationship between the physical link identifier and the hash result. The physical link corresponding to the target identifier is the second physical link. This embodiment can determine the physical link of the target packet to be transmitted from the aggregated links between the destination and the switch based on the pre-configured mapping relationship between the physical link identifier and the hash result and the hash calculation, with low computational overhead.

[0086] In some embodiments, as shown in the foregoing embodiment (1), the mapping relationship between the physical link identifier and the hash result can be implemented as follows: the physical link identifier is equal to the hash result of the source port number. Accordingly, the source port number can be... The hash result (i.e., the first hash result) is used as the target identifier. This mapping relationship is simple to implement and can improve the selection efficiency of forwarding links.

[0087] In other embodiments, as shown in the aforementioned embodiment (2), the mapping relationship between the physical link identifier and the hash result can be implemented as follows: the modulo result of the physical link identifier divided by the total number m of physical links included in the second aggregated link is equal to the hash result of the source port number. Accordingly, a mathematical model can be constructed with the target identifier as the variable to be determined, and with the constraint that the target identifier is less than or equal to the total number m of physical links included in the second aggregated link, and the modulo result of the target identifier divided by the total number m is equal to the second hash result. This mathematical model can be implemented as follows:

[0088] ,(i-1)≤m (4).

[0089] In equation (4), (i-1) is the quantity to be determined, i.e., the target identifier. Source port number The hash result (i.e., the first hash result) is obtained. Further, by solving this mathematical model, the target identifier can be obtained.

[0090] This embodiment only requires the inverse operation of integer modulo to determine the source port number, resulting in low computational overhead. Furthermore, this method of determining the downlink physical link is a common physical link load balancing method used by mainstream switches. Therefore, this method is compatible with traditional switches, reducing the cost of modifying the switch-side software.

[0091] In other embodiments, the hash algorithm is a consistent hash algorithm. The hash result of the identifier of each physical link in the second aggregated link can be determined according to the consistent hash algorithm, and then the hash result of the identifier of each physical link in the second aggregated link is compared with the source port number. The hash results (i.e., the first hash result) are all mapped onto the hash ring. Then, from the source port number... Starting from the position of the hash result (i.e. the first hash result) on the hash ring, search clockwise on the hash ring for the hash results of the identifiers of each physical link in the second aggregation link. The identifier of the first physical link encountered is the target identifier.

[0092] This embodiment requires consistent hashing to be implemented on the switch side, necessitating the switch to maintain a hash ring structure, which places high demands on the switch. Consistent hashing can support the addition or removal of physical links in the second aggregation link and is applicable to downlinks of variable size.

[0093] Furthermore, a second physical link identified as the target identifier can be determined from the second aggregated links. After determining the second physical link, the switch 20 can send the target packet to the destination service node 102 through the second physical link.

[0094] This embodiment utilizes the collaboration between the switch and the aforementioned data sender to forward the target packet to a specific link between the destination and the switch based on the source port number of the target packet. Since the source port number is constructed by reverse engineering the hash algorithm used on the switch side and the identifier of the physical link sending the target data, satisfying the switch's hash scheduling rules, the switch can forward different data streams via a specific downlink. This ensures that the downlink traffic distribution corresponds to the uplink, thus achieving a balanced distribution of downlink traffic and further alleviating the imbalance in the utilization of the physical link between the destination and the switch.

[0095] On the other hand, the switch performs forwarding based on a hash policy, which does not require modification of the network protocol or the introduction of dedicated hardware, thus reducing the software and hardware costs on the switch side.

[0096] Switch 20 can also monitor the health status of the downlink (i.e., the second aggregated link). If a physical link in the second aggregated link becomes abnormal, switch 20 can automatically map the hash result of the source port number of the target packet (i.e., the second hash result) to an available physical link. In some embodiments, the physical link between switch 20 and the destination service node 102 is an optical link. If switch 20 receives a no-light warning for a physical link, it determines that the physical link has become abnormal.

[0097] In this embodiment, for ease of description, the physical link in the second aggregated link that experiences an anomaly is defined as the third physical link. Accordingly, in the event of an anomaly in the third physical link, the switch 20 can determine the physical link (i.e., the second physical link) of the target packet to be transmitted from other physical links in the second aggregated link besides the third physical link, based on the first hash result. For example, the switch 20 can determine the physical link (i.e., the second physical link) of the target packet to be transmitted from other physical links in the second aggregated link besides the third physical link, based on the first hash result and a pre-set mapping relationship between physical links and hash results. The specific implementation method can be found in the aforementioned content regarding determining the physical link of the target packet to be transmitted from the second aggregated link, and will not be repeated here.

[0098] In this embodiment, when there is an abnormal link in the downlink, the switch can automatically route the target packet to an available link, which can realize fault recovery of the downlink and improve service availability.

[0099] In addition to providing a traffic processing system, this application also provides a traffic processing method. The traffic processing method provided in this application is described below from the perspectives of a service node and a switch, respectively.

[0100] Figure 5This is a flowchart illustrating the traffic processing method provided in this application embodiment. This traffic processing method is mainly applied to a service node, which can be implemented as a sender (i.e., source) of target data, or as a receiver (i.e., destination) of other data. The service node is connected to the switch via a first aggregated link; the service node performs load balancing across multiple physical links included in the first aggregated link according to a preset load balancing method. The switch uses a hash algorithm to select a forwarding link for packets. Figure 5 As shown, the method mainly includes the following steps:

[0101] 501. For the target data to be transmitted, determine the first physical link for transmitting the target data from the first aggregated link according to the preset load balancing method.

[0102] 502. Based on the identifier of the first physical link, determine the source port number that satisfies the switch's hash scheduling rules.

[0103] 503. The target packet carrying the source port number and the target data is sent to the switch through the first physical link, so that the switch can determine the second physical link of the target packet to be transmitted from the second aggregated link between the switch and the destination service node of the target packet according to the first hash result of the source port number; wherein, the first hash result is determined according to the hash scheduling rule.

[0104] The service node and the switch are connected via an aggregated link (Bond). An aggregated link comprises multiple physical links. There is one switch, and a single forwarding plane exists.

[0105] The switch uses a hash algorithm to select forwarding links for packets. A description of the hash algorithm can be found in the relevant content of the foregoing embodiments. In the embodiments of this application, the input data for the hash algorithm is the source port number of the packet. In the embodiments of this application, the switch inputs the source port number of the packet into the hash function corresponding to the hash algorithm to obtain the hash result of the source port number; and selects a physical link for the packet from the aggregated links between the destination service node and the switch based on the hash result of the source port number.

[0106] When a service node acts as a packet sender, it performs load balancing on the aggregated link between the service node and the switch according to a preset load balancing method. That is, it distributes the data flow evenly across the multiple physical links included in the aggregated link according to the preset load balancing method. The load balancing method set on the service node side can be a round-robin method. Accordingly, the service node can distribute the data flow evenly across the multiple physical links included in the aggregated link according to the round-robin method. In this embodiment, for ease of description and distinction, the aggregated link between the packet sender (i.e., the source service node) and the switch is defined as the first aggregated link; and the aggregated link between the packet receiver (i.e., the destination) and the switch is defined as the second aggregated link.

[0107] Based on this, in step 501, when the service node sends the target data, it can determine the first physical link for transmitting the target data from the first aggregated link according to the preset load balancing method.

[0108] Since the source service node, the sender of the data stream, distributes traffic evenly across multiple physical links included in the first aggregation link through load balancing, and the switch determines the hash result of the source port number of the data stream using a hash algorithm, and schedules the data stream to multiple physical links included in the second aggregation link based on the hash result of the source port number, if the source port number is inferred in reverse based on the switch's strategy for selecting physical links for the data stream, the switch can ensure that a data stream originating from a physical link in the first aggregation link is scheduled to a fixed physical link in the second aggregation link. This achieves the binding or mapping of physical links in the first aggregation link and physical links in the second aggregation link, thereby ensuring that the data stream is evenly distributed across multiple physical links included in the second aggregation link. Based on this, the hash algorithm used by the switch can be pre-configured on the service node side, and the source port number that satisfies the hash scheduling rule can be determined based on the hash scheduling rule used by the switch. Accordingly, in step 502, the source port number can be determined based on the hash result of the first physical link. The identifier determines the source port number that satisfies the switch's hash scheduling rules. .

[0109] In some embodiments, it may be based on the first physical link The mapping relationship between the identifier and the pre-set physical link identifier and the hash result is used to determine the first physical link. The identifier in this mapping relationship corresponds to the hash result. The hash result in the mapping relationship between the physical link identifier and the hash result refers to the hash result of the source port number. In some embodiments, the mapping relationship between the physical link identifier and the hash result can be implemented as follows: the physical link identifier is equal to the hash result of the source port number. This mapping relationship implementation only requires a reverse hash search when determining the source port number, which enables the source service node to autonomously construct the source port number, resulting in low computational overhead and strong determinism.

[0110] In other embodiments, the mapping relationship between the physical link identifier and the hash result can be implemented as follows: the modulo result of the physical link identifier divided by the total number m of physical links included in the second aggregated link is equal to the hash result of the source port number. This mapping implementation only requires integer modulo and reverse hash search when determining the source port number, enabling the source service node to autonomously construct the source port number, resulting in low computational overhead and strong determinism. Furthermore, this mapping relationship is a common physical link load balancing method used by mainstream switches; therefore, it is compatible with traditional switches, reducing the cost of modifying the switch-side software.

[0111] Based on the mapping relationship between the identifier and hash result of the aforementioned physical link, the first physical link can be used as a reference. The mapping relationship between the identifier and the pre-set physical link identifier and the hash result is used to determine the first physical link. The identifier corresponds to the hash result in this mapping relationship. For example, the hash result of the first physical link can be calculated. The identifier is the modulo result of the total number m of physical links included in the second aggregated link, and this modulo result is used to determine the first physical link. The identifier corresponds to the hash result in this mapping relationship. Furthermore, the source port number can be used as the variable to be determined, and the hash result of the source port number calculated according to the hash algorithm is equal to the hash result of the first physical link. The hash result corresponding to the identifier in this mapping relationship serves as a constraint, and a mathematical model is constructed. Furthermore, this mathematical model can be solved to obtain the source port number of the message to be sent. Wherein, in equation (1), the first physical link... The hash result corresponding to the identifier in this mapping relationship is equal to the first physical link. The identifier; in equation (2) the first physical link The hash result corresponding to the identifier in this mapping relationship is equal to the first physical link. The identifier is the modulo result of the total number m of physical links contained in the second aggregated link.

[0112] This embodiment is based on the pre-configured mapping relationship between the physical link identifier and the hash result and the reverse hash search, which enables the sender to actively construct the source port number. It has low computational overhead and strong determinism.

[0113] In other embodiments, the hash algorithm is a consistent hash algorithm, in which case the first physical link can be determined based on the consistent hash algorithm. The hash result of the identifier. Specifically, the first physical link The identifier is input into the consistent hash algorithm and the corresponding hash function is used for hash calculation to obtain the first physical link. The hash result of the identifier. Further, the source port number can be used as the variable to be determined, based on the first physical link. The difference between the hash result of the identifier and the hash result of the source port number, modulo the result of the hash of the second aggregated link with the total number m of physical links included in the first aggregated link, is less than the difference between the hash result of the other physical links in the first aggregated link. The difference between the hash result of the identifier and the hash result of the source port number is used as a constraint to construct a mathematical model, which is the modulo result of the total number m of physical links included in the second aggregated link.

[0114] This embodiment requires consistent hashing to be implemented on the switch side, necessitating the switch to maintain a hash ring structure, which places high demands on the switch. Consistent hashing can support the addition or removal of physical links in the second aggregation link and is applicable to downlinks of variable size.

[0115] In other embodiments, the correspondence between the physical link identifier and the source port number can be determined in advance based on the identifier of each physical link in the first aggregated link and the hash algorithm corresponding to the hash scheduling rule adopted by the switch. For specific implementation methods, please refer to the relevant content of the aforementioned system embodiments. The service node can store this correspondence. Subsequently, when sending target data, the source port number corresponding to the identifier of the first physical link can be obtained from the correspondence between the identifier of each physical link in the first aggregated link and the source port number based on the identifier of the first physical link sending the target data. This source port number satisfies the hash scheduling rule of the switch. In this embodiment, the source port number corresponding to each physical link is determined in advance according to the hash scheduling rule of the switch. When sending data, it is only necessary to query the correspondence based on the identifier of the physical link transmitting the data to determine the corresponding source port number, which helps to improve the efficiency of determining the source port number and thus improve the data transmission efficiency.

[0116] After determining the target data Corresponding source port number Then, in step 503, it can be done via the first physical link. The target packet, carrying the source port number and target data, is sent to the switch. For details on the specific implementation of encapsulating the target packet, please refer to the relevant content in the aforementioned system embodiment.

[0117] In this embodiment, the data sender anticipates the hash scheduling rules and input fields (i.e., source port) used by the switch. Based on the identifier of the physical link sending the target data, it reverse-engineers a source port number that satisfies the switch's hash scheduling rules. By writing the source port number into the message to be sent, it ensures that the hash result accurately hits the specific link connecting the destination and the switch. This implementation method can introduce sufficient entropy through active modulation of the source port number, effectively mitigating or even eliminating hash collisions, thereby alleviating the problem of unbalanced physical link utilization caused by hash collisions.

[0118] Since each physical link independently carries a set of communication flows, the sending end ensures that different data flows are sent via specific uplinks according to the expected paths by constructing source port numbers in reverse. This achieves a strict binding between the sending and receiving paths, forming a symmetrical forwarding mode of "send from where it goes, receive from where it comes in." This achieves a forwarding effect similar to a dual-forwarding plane in a single-forwarding-plane switch, improving network bandwidth utilization. Compared to dual-forwarding-plane solutions, no additional switches are needed, reducing switch costs and network connection complexity.

[0119] Because the data sender implements an effective load balancing strategy on the uplink side, the sender ensures that different data streams are forwarded by specific downlinks by constructing source port numbers in reverse, so that the traffic distribution of the downlink corresponds to that of the uplink. Therefore, the traffic in the downlink direction is also evenly distributed, which can effectively alleviate the problem of physical link utilization imbalance.

[0120] Accordingly, the traffic processing methods on the switch side are as follows: Figure 6 As shown. Figure 6 This is a flowchart illustrating another traffic processing method provided in an embodiment of this application. This traffic processing method is primarily applied to switches. Figure 6 As shown, the method mainly includes the following steps:

[0121] 601. Obtain the target packet from the first physical link; wherein, the first physical link is determined by the source serving node of the target packet from the first aggregated link between itself and the switch according to a preset load balancing method.

[0122] 602. Determine the first hash result of the source port number of the target packet according to the hash scheduling rule; wherein the source port number is determined by the source service node based on the identifier of the first physical link and satisfies the hash scheduling rule.

[0123] 603. Based on the first hash result, determine the second physical link from the second aggregated link between the switch and the destination service node of the target packet.

[0124] 604. Forward the target message to the destination via the second physical link.

[0125] Specifically, the source port number can be parsed from the target message obtained in step 601. In step 602, the source port number is determined according to the aforementioned hash scheduling rules. The hash result. In this embodiment of the application, for ease of description and distinction, the source port number determined by the switch is used. The hash result is defined as the first hash result.

[0126] Furthermore, in step 603, the physical link of the target packet to be transmitted can be determined from the aggregated link between the switch and the destination service node based on the first hash result. (Defined as the second physical link). For details on how the switch determines the second physical link for the target packet to be transmitted, please refer to the relevant content in the aforementioned system embodiment; it will not be repeated here. After determining the second physical link, in step 604, the target packet can be sent to the destination via the second physical link.

[0127] This embodiment utilizes the collaboration between the switch and the aforementioned data sender to forward the target packet to a specific link between the destination and the switch based on the source port number of the target packet. Since the source port number is constructed by reverse engineering the hash algorithm used on the switch side and the identifier of the physical link sending the target data, satisfying the switch's hash scheduling rules, the switch can forward different data streams via a specific downlink. This ensures that the downlink traffic distribution corresponds to the uplink, thus achieving a balanced distribution of downlink traffic and further alleviating the imbalance in the utilization of the physical link between the destination and the switch.

[0128] On the other hand, the switch performs forwarding based on a hash policy, which does not require modification of the network protocol or the introduction of dedicated hardware, thus reducing the software and hardware costs on the switch side.

[0129] The switch can also monitor the health status of the downlink (i.e., the second aggregated link). In some embodiments, the physical link between the switch and the destination serving node is an optical link. If the switch receives a no-light warning for a physical link, it determines that the physical link is abnormal.

[0130] In this embodiment of the application, for ease of description, the physical link in the second aggregated link that experiences an anomaly is defined as the third physical link. Accordingly, in the event of an anomaly in the third physical link, the physical link (i.e., the second physical link) of the target message to be transmitted can be determined from the other physical links in the second aggregated link, excluding the third physical link, based on the first hash result. For example, the physical link (i.e., the second physical link) of the target message to be transmitted can be determined from the other physical links in the second aggregated link, excluding the third physical link, based on the first hash result and a pre-set mapping relationship between physical links and hash results. The specific implementation method can be found in the aforementioned content on determining the physical link of the target message to be transmitted from the second aggregated link, and will not be repeated here.

[0131] In this embodiment, when there is an abnormal link in the downlink, the switch can automatically route the target packet to an available link, which can realize fault recovery of the downlink and improve service availability.

[0132] The traffic processing method provided in this application can be applied to various traffic forwarding scenarios, such as intelligent computing scenarios, financial transaction scenarios, and distributed storage scenarios. The following example illustrates the traffic processing method using a Mixture of Experts (MoE) model in an intelligent computing scenario. The MoE model divides the model into multiple expert networks, activating only a subset of experts in each forward propagation. The MoE model includes a gating network, multiple expert networks, and a combination network.

[0133] Expert networks can employ feed-forward networks (FFNs), with different expert networks having the same or different structures. Each expert network is responsible for processing a specific type of feature or task. The gating network selects the corresponding expert network for each input token and determines the relevance between the input token and each expert network. The aggregation network weights the outputs of each expert network based on their relevance, resulting in the output of the MoE model. The MoE model involves extensive cross-node communication during model training and online inference, particularly during the data distribution and result aggregation stages, generating high-concurrency, high-bandwidth network traffic.

[0134] Specifically, in each MoE layer, the tokens input to the gating network are dynamically dispatched to the corresponding expert network device according to the gating network's decision. After the expert network completes its calculation, the output results are sent to the aggregation network's service node for weighted aggregation. This process leads to large-scale data redistribution across nodes, resulting in frequent and dense cross-node communication. The traffic processing method provided in this application embodiment can be applied to the data distribution and / or result aggregation stages of the MoE model. In the data distribution stage, the data sender (i.e., the source) is the gating network's service node; the data receiver (i.e., the destination) is the expert network's service node. In the result aggregation stage, the data sender (i.e., the source) is the expert network's service node, and the data receiver (i.e., the destination) is the aggregation network's service node. The following provides an exemplary description of the relevant data processing procedures when the traffic processing method provided in this application embodiment is applied to the data distribution and / or result aggregation stages of the MoE model.

[0135] Figure 7 This is a flowchart illustrating the data processing method provided in an embodiment of this application. This data processing method is mainly applied to the service node of the gated network and / or the service node of the expert network in a hybrid expert network. The service node and the switch are connected via a first aggregated link. Figure 7 As shown, the data processing method executed by the service node specifically includes the following steps:

[0136] 701. For the target output results of the gated network or expert network deployed on the service node, determine the first physical link for transmitting the target output results from the first aggregated link according to the preset load balancing method.

[0137] 702. Based on the identifier of the first physical link, determine the source port number that satisfies the switch's hash scheduling rules.

[0138] 703. The target packet, carrying the source port number and the target output result, is sent to the switch via the first physical link. The switch then determines the second physical link for transmitting the target packet from the second aggregated link between the switch and the destination of the target packet, based on the first hash result of the source port number. The first hash result is determined according to the switch's hash scheduling rules.

[0139] In this embodiment, the target output in step 701 is either the output of the gating network or the output of the expert network. When the service node is the service node where the gating network is located, the gating network can also be used to determine the target expert network corresponding to each of the multiple expert networks in the hybrid expert network. The word corresponding to each of the multiple expert networks is the target output of the gating network. That is, the target word corresponding to the target expert network is the output of the gating network. In this embodiment, the destination service node is the service node where the target expert network corresponding to the target word is located.

[0140] In the embodiment where the source service node is the service node where the expert network resides, before step 701, the target lexical unit input to the expert network can be processed to obtain the processing result of the target lexical unit. In this embodiment, the processing result of the target lexical unit is the target output result of the expert network. The destination service node is the service node where the aggregation network in the hybrid expert network resides.

[0141] In this embodiment, the service node, according to a set load balancing method, evenly distributes the output results of the network deployed by the service node to multiple physical links in the first aggregation link, thereby obtaining the target output results to be transmitted from multiple physical links. The first physical link in step 701 is the physical link for transmitting the target output results. For the specific implementation of steps 501-503, please refer to the relevant content of the foregoing embodiments, which will not be repeated here.

[0142] In this embodiment, the traffic processing method provided in this application is introduced during the data distribution stage and / or result aggregation stage of the MoE model. Sufficient entropy can be introduced through active modulation of the source port number, effectively mitigating or even eliminating hash collisions, thereby alleviating the physical link utilization imbalance caused by hash collisions. Furthermore, a quasi-dual-forwarding-plane forwarding effect is achieved in a single-forwarding-plane switch, improving network bandwidth utilization.

[0143] Because the data sender implements an effective load balancing strategy on the uplink side, the sender ensures that different data streams are forwarded by specific downlinks by constructing source port numbers in reverse, so that the traffic distribution of the downlink corresponds to that of the uplink. Therefore, the traffic in the downlink direction is also evenly distributed, which can effectively alleviate the problem of physical link utilization imbalance.

[0144] For the switch side, the traffic processing method provided in this application embodiment can also be used in conjunction with the traffic processing method on the sending end side to achieve downlink traffic load balancing. The data processing process on the switch side is described below by way of example.

[0145] Figure 8This is a flowchart illustrating another data processing method provided in an embodiment of this application. This data processing method is mainly applied to a switch. The switch uses a hash scheduling rule to select a forwarding link for a packet. The switch receives a target packet from a first physical link; the sender of the target packet is a serving node of the gating network and / or the expert network in a hybrid expert network; the target packet includes the output result of the gating network or the expert network; the sender and the switch are connected via a first aggregated link; the first physical link is any physical link in the first aggregated link; the sender performs load balancing on the first aggregated link according to a preset load balancing method. For a description of the load balancing method of the serving node and the hash algorithm on the switch side, please refer to the relevant description in the foregoing system embodiment. Figure 8 As shown, the data processing method executed by the service node specifically includes the following steps:

[0146] 801. Obtain the target packet from the first physical link; the first physical link is determined by the source service node of the target packet from the first aggregated link between it and the switch according to the preset load balancing method; the source service node is the service node of the gated network and / or the expert network in the hybrid expert network; the target packet includes the target output result of the gated network and / or the expert network.

[0147] 802. Determine the first hash result of the source port number of the target packet according to the hash scheduling rules; wherein the source port number is determined by the source service node based on the identifier of the first physical link and satisfies the hash scheduling rules.

[0148] 803. Based on the first hash result, determine the second physical link from the second aggregated link between the switch and the destination of the target packet.

[0149] 804. Forward the target message to the destination via the second physical link; wherein, if the source service node is the service node of the gated network, the destination service node is the service node of the expert network; if the source service node is the service node of the expert network, the destination service node is the service node of the aggregation network in the hybrid expert network.

[0150] In this embodiment, the target message includes the target output results, which may include the output results of the gating network and / or the output results of the expert network. In the data distribution and / or result aggregation stages of the MoE model, the switch collaborates with the sender of the target message to forward the target message to a specific link between the destination and the switch based on the source port number. Since the source port number is constructed by reverse engineering based on the hash scheduling rules adopted by the switch and the identifier of the physical link sending the target data, satisfying the switch's hash scheduling rules, the switch can forward different data streams via a specific downlink, ensuring that the downlink traffic distribution corresponds to the uplink. Therefore, the downlink traffic is also evenly distributed, further alleviating the problem of unbalanced utilization of the physical link between the destination and the switch.

[0151] To evaluate the impact of the traffic processing method provided in this application on network communication performance, a multi-server test environment was constructed, and performance verification was performed at two-node (2 service nodes) and four-node (4 service nodes) scales. Each service node is configured with 16 Graphics Processing Unit (GPU) cards and 4 200G network cards. Every two 200G network cards are bonded to a 400G aggregation link (Bond), forming dual uplink connections. Each service node is connected to the same switch via a single-track access method, forming a single-plane network architecture. The single-track access method means that multiple service nodes are connected to the same switch through their respective network interfaces. This architecture belongs to a single-forwarding plane network, where uplink traffic is forwarded through the same switch.

[0152] The test uses an open-source communication library from the open-source model as the transmission load generation tool to simulate the communication mode of the data distribution and result aggregation stages in a typical MoE model scenario. Under the same configuration, tests were conducted using... Figure 1 The traffic processing methods shown in the traditional single-forwarding plane network and the traffic processing methods provided in the embodiments of this application are compared. Using the same MoE to simulate the data distribution and result aggregation stages in the MoE model scenario, the bandwidth utilization and congestion control performance under the two traffic processing methods are obtained.

[0153] During communication, when the number of transmitted tokens is 8, Figure 1The traditional single-forwarding plane network architecture shown has exhibited a small number of Explicit Congestion Notification (ECN) packets, indicating that uneven load distribution on aggregated links has led to congestion on one of the physical links. ECN packets are a congestion control mechanism in the IP protocol. When a network device (such as a switch) detects queue congestion, it can mark the ECN field in the IP header to notify the sender to reduce its transmission rate.

[0154] The traffic processing method provided in this application embodiment did not detect ECN packets at this stage, demonstrating good load balancing characteristics. As the communication load increases during the data distribution and result aggregation stages, the number of tokens increases to 256, and the overall network load rises significantly. Figure 1 As shown in the traditional single-forwarding plane networking architecture, the congestion situation is further aggravated. Both network cards receive a large number of ECN packets, and the distribution of receiving traffic on the aggregated link interface is significantly unbalanced, indicating that multi-path hash collisions are serious and some links have become performance bottlenecks.

[0155] In contrast, the traffic processing method provided in this application actively adjusts the source port at the sending end and coordinates with the source port-based hash algorithm on the switch side to achieve forwarding path isolation and deterministic load balancing among the member ports of the aggregated link. Under this mechanism, even in high-load scenarios, each physical link maintains a balanced traffic distribution, and no ECN packets appear, effectively avoiding link congestion.

[0156] In two-node (2 service nodes) and four-node (4 service nodes) configurations, simulations of data distribution and result aggregation scenarios for the MoE model were performed using both traditional traffic processing methods and the traffic processing methods provided in this embodiment. The bandwidth conditions under the two traffic processing methods are as follows: Figure 9 and Figure 10 As shown. Figure 9 The data distribution and result aggregation scenarios of the MoE model were simulated using both the traditional traffic processing method and the traffic processing method provided in the embodiments of this application under two nodes (2 service nodes), and the bandwidth situation under the two traffic processing methods was obtained. Figure 10 The data distribution and result aggregation scenarios of the MoE model were simulated using both the traditional traffic processing method and the traffic processing method provided in the embodiments of this application under a four-node (4 service nodes) configuration, and the bandwidth situation under the two traffic processing methods was obtained. Figure 9 and Figure 10The white rectangles represent the bandwidth of traditional traffic processing methods, while the diagonally filled rectangles represent the bandwidth of the traffic processing method provided in this application embodiment. Test results show that the traffic processing method provided in this application embodiment significantly improves communication efficiency in typical MoE model communication scenarios: in a two-node (2 service nodes) configuration, the communication bandwidth is increased by approximately 43.4% compared to the traditional single-forwarding-plane traffic processing method; in a four-node (4 service nodes) configuration, the communication bandwidth is increased by approximately 67.5% compared to the traditional single-forwarding-plane traffic processing method, and the communication bandwidth performance is comparable to that of a physical dual-plane network architecture. This verifies that the traffic processing method provided in this application embodiment achieves high-performance forwarding capabilities equivalent to a physical dual-plane without increasing the cost of additional network equipment.

[0157] It should be noted that the execution subject of each step of the method provided in the above embodiments can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 401 and 402 can be device A; or the execution subject of step 401 can be device A, and the execution subject of step 402 can be device B; and so on.

[0158] Furthermore, some processes described in the above embodiments and accompanying drawings include multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or they may be executed in parallel. The operation numbers, such as 401, 402, etc., are merely used to distinguish different operations and do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel.

[0159] Accordingly, embodiments of this application also provide a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, cause one or more processors to perform the steps in the traffic processing method and / or data processing method provided in the foregoing embodiments.

[0160] Computer-readable storage media include volatile or non-volatile or a combination thereof, and may be removable or non-removable. Examples of computer-readable storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital video disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transfer medium.

[0161] This application also provides a computer program product, including a computer program that, when executed by one or more processors, causes the one or more processors to perform the steps in the traffic processing method and / or data processing method provided in the foregoing embodiments.

[0162] In the embodiments of this application, the specific implementation form of the computer program product is not limited. In some embodiments, the computer program product may be implemented as an application (APP), a mini-program, a computer-side client, a program module, a plug-in, an installation package, a software development kit (SDK), an image file of an optical disc, a plug-in, or software in the form of Software as a Service (SaaS), etc., but is not limited to these.

[0163] The computer program product should understand that each or a combination of the above-described method flow can be implemented by a computer program or instructions. Furthermore, these computer programs or instructions can be applied to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device, enabling the processor of the general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to function as an apparatus for implementing the corresponding functions in the above-described method embodiments.

[0164] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 11 As shown, the electronic device includes a memory 11a and a processor 11b. The memory 11a is used to store computer programs and can be configured to store various other data to support operation on a computing platform. Examples of this data include instructions for any application or method used to operate on the electronic device, data structures, contact data, phonebook data, messages, pictures, videos, etc.

[0165] Processor 11b is coupled to memory 11a and is used to execute computer programs to perform the steps in the traffic processing method and / or data processing method provided in the foregoing embodiments. Specific implementation details of each step can be found in the relevant descriptions of the foregoing embodiments, and will not be repeated here.

[0166] In some alternative implementations, such as Figure 11 As shown, the electronic device may also include optional components such as a communication component 11c, a power supply component 11d, a display component 11e, and an audio component 11f. Figure 11 The diagram only shows some components and does not mean that the electronic device must contain them. Figure 11 The inclusion of all components does not imply that an electronic device can only include... Figure 11 The components shown.

[0167] in addition, Figure 11 The components within the dashed box are optional, not mandatory, and their specific requirements depend on the product form of the electronic device. When the electronic device is implemented as a service node, it can be a terminal device such as a desktop computer, laptop, mobile phone, or IoT device; or it can be various server devices such as traditional servers, cloud servers, or server clusters. When the electronic device is implemented as a service node, it is used to execute the steps of the traffic processing method and / or data processing method performed by the service node provided in the foregoing embodiments. When the electronic device is implemented as a switch, it is used to execute the steps of the traffic processing method and / or data processing method performed by the switch provided in the foregoing embodiments.

[0168] In this embodiment, the memory is used to store computer programs and can be configured to store various other data to support operation on its host device. The processor can execute the computer programs stored in the memory to implement corresponding control logic. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), electrically erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0169] In the embodiments of this application, the processor can be any hardware processing device capable of executing the above-described method logic. Optionally, the processor can be a central processing unit (CPU), a graphics processing unit (GPU), or a microcontroller unit (MCU); it can also be a programmable device such as a field-programmable gate array (FPGA), a programmable array logic (PAL), a general array logic (GAL), or a complex programmable logic device (CPLD); or it can be an advanced RISC machine (ARM) or a system on chip (SoC), etc., but is not limited thereto.

[0170] In this embodiment, the communication component is configured to facilitate wired or wireless communication between its host device and other devices. The device hosting the communication component can access wireless networks based on communication standards, such as 2G or 3G, 4G, 5G, or combinations thereof. In one exemplary embodiment, the communication component receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel.

[0171] In embodiments of this application, the display component may include a liquid crystal display (LCD) and a touch panel (TP). If the display component includes a touch panel, the display component can be implemented as a touchscreen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation.

[0172] In this embodiment, a power supply component is configured to provide power to various components of the device in which it resides. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component resides.

[0173] In embodiments of this application, the audio component can be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), which is configured to receive external audio signals when the device containing the audio component is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals can be further stored in memory or transmitted via a communication component. In some embodiments, the audio component also includes a speaker for outputting audio signals. For example, in devices with voice interaction capabilities, voice interaction with the user can be achieved through the audio component.

[0174] It should be noted that the terms "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent a chronological order, nor do they limit "first" and "second" to different types.

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

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

Claims

1. A flow processing system, characterized in that, The traffic processing system is a single-plane aggregated link networking architecture, including: multiple service nodes and one switch; the service nodes and the switch are connected through aggregated links; When acting as a source service node, the service node is used to determine, based on a preset load balancing method, the first physical link for transmitting the target data from the first aggregated link between the service node and the switch; determine the source port number that satisfies the hash scheduling rules of the switch based on the identifier of the first physical link; and send the target packet carrying the source port number and the target data to the switch through the first physical link. The switch is configured to determine the hash result of the source port number according to the hash scheduling rule; and determine the second physical link from the second aggregated link between the switch and the destination service node of the target packet according to the hash result; and forward the target packet to the destination service node through the second physical link.

2. A traffic processing method applied to a service node, characterized in that, The service node and the switch are connected via a first aggregated link; The method includes: For the target data to be transmitted, a first physical link for transmitting the target data is determined from the first aggregated link according to a preset load balancing method; Based on the identifier of the first physical link, determine the source port number that satisfies the hash scheduling rule of the switch; The target packet carrying the source port number and the target data is sent to the switch through the first physical link, so that the switch can determine the second physical link for transmitting the target packet from the second aggregated link between the switch and the destination service node of the target packet according to the first hash result of the source port number; wherein, the first hash result is determined according to the hash scheduling rule; The service node, the destination service node, and the switch form a single-plane aggregated link network architecture, and the switch is a single unit.

3. The method according to claim 2, characterized in that, The step of determining the source port number that satisfies the hash scheduling rule of the switch based on the identifier of the first physical link includes: Based on the identifier of the first physical link and the pre-set mapping relationship between the identifier of the physical link and the hash result, determine the second hash result corresponding to the identifier of the first physical link in the mapping relationship; Using the source port number as the variable to be determined, and taking the hash result of the source port number calculated according to the hash algorithm corresponding to the hash scheduling rule as the constraint condition, a mathematical model is constructed. The mathematical model is solved to obtain the source port number.

4. The method according to claim 3, characterized in that, The mapping relationship includes: the modulo result of the physical link identifier modulo the total number of physical links included in the second aggregated link is equal to the hash result.

5. A traffic processing method applied to a switch, characterized in that, The method includes: The target packet is obtained from the first physical link; wherein the first physical link is determined by the source serving node of the target packet from the first aggregated link between itself and the switch according to a preset load balancing method; According to the hash scheduling rule, the first hash result of the source port number of the target packet is determined; wherein, the source port number is determined by the source service node based on the identifier of the first physical link and satisfies the hash scheduling rule; Based on the first hash result, a second physical link is determined from the second aggregated link between the switch and the destination service node of the target packet; The target packet is forwarded to the destination service node via the second physical link; wherein, the switch, the source service node and the destination service node form a single-plane aggregated link network architecture, and the switch is a single unit.

6. The method according to claim 5, characterized in that, The step of determining the second physical link from the second aggregated link between the switch and the destination service node of the target packet based on the first hash result includes: Based on the pre-set mapping relationship between the physical link identifier and the hash result, the target identifier of the physical link corresponding to the first hash result is determined; the physical link corresponding to the target identifier is the second physical link.

7. The method according to claim 6, characterized in that, The mapping relationship includes: the modulo result of the physical link identifier divided by the total number of physical links included in the second aggregated link is equal to the hash result; The step of determining the target identifier of the physical link corresponding to the first hash result based on the pre-set mapping relationship between the identifier of the physical link and the hash result includes: A mathematical model is constructed with the target identifier as the quantity to be determined, and the constraints being that the target identifier is less than or equal to the total quantity, and the modulo result of the target identifier with respect to the total quantity is equal to the first hash result. The mathematical model is solved to obtain the target identifier.

8. The method according to any one of claims 5-7, characterized in that, The step of determining the second physical link from the second aggregated link between the switch and the destination service node of the target packet based on the first hash result includes: In the event of an anomaly in the third physical link of the second aggregated link, the second physical link is determined from the other physical links in the second aggregated link, excluding the third physical link, based on the first hash result.

9. A data processing method, applied to a gated network and / or a service node of an expert network in a hybrid expert network, characterized in that, The service node and the switch are connected via a first aggregated link; The method includes: For the target output result of the gated network or expert network, a first physical link for transmitting the target output result is determined from the first aggregated link according to a preset load balancing method; Based on the identifier of the first physical link, determine the source port number that satisfies the hash scheduling rule of the switch; The target packet carrying the target output result and the source port number is sent to the switch through the first physical link, so that the switch can determine the second physical link for transmitting the target packet from the second aggregated link between the switch and the destination service node of the target packet according to the first hash result of the source port number; The first hash result is determined according to the hash scheduling rule; the service node, the destination service node and the switch form a single-plane aggregated link network architecture, and the switch is one unit.

10. A data processing method applied to a switch, characterized in that, The method includes: The target packet is obtained from the first physical link; the first physical link is determined by the source service node of the target packet from the first aggregated link between it and the switch according to a preset load balancing method; the source service node is the service node of the gated network and / or the expert network in the hybrid expert network; the target packet includes the target output result of the gated network and / or the expert network. According to the hash scheduling rule, the first hash result of the source port number of the target packet is determined; wherein the source port number is determined by the source service node based on the identifier of the first physical link and satisfies the hash scheduling rule; Based on the first hash result, a second physical link is determined from the second aggregated link between the switch and the destination service node of the target packet; The target message is forwarded to the destination service node via the second physical link; wherein, if the source service node is the service node where the gated network is located, the destination service node is the service node where the expert network is located; if the source service node is the service node where the expert network is located, the destination service node is the service node where the aggregation network in the hybrid expert network is located. The source service node, the destination service node, and the switch form a single-plane aggregated link network architecture, and the switch is a single unit.

11. An electronic device, characterized in that, include: A memory and a processor; wherein the memory is used to store computer programs; The processor is coupled to the memory for executing the computer program to perform the steps of the method according to any one of claims 2-10.

12. A computer-readable storage medium storing computer instructions, characterized in that, When the computer instructions are executed by one or more processors, the one or more processors are caused to perform the steps of the method according to any one of claims 2-10.

13. A computer program product, characterized in that, Includes a computer program that, when executed by one or more processors, causes the one or more processors to perform the steps of the method according to any one of claims 2-10.