Message spraying method and system

By using message spraying technology in high-performance networks, the message data stream is reencapsulated and distributed to multiple network paths, the problems of network congestion and performance degradation are solved, and efficient load balancing and network resource utilization are achieved.

CN120110997APending Publication Date: 2025-06-06SCIVO TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510255583.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

In high-performance networks, traditional network technologies are difficult to effectively utilize network capacity, resulting in network congestion and performance degradation. Especially in large-scale GPU cluster computing, the increase in east-west and north-south traffic has led to an exponential increase in network bandwidth demand.

Method used

Packet Spray technology is used to repackage the message data stream through the packet spray initiator and add spray headers to distribute it to multiple network paths to ensure load balancing of the network paths. The packet spray end is responsible for decapsulating and sorting, and restoring the original packet data flow.

Benefits of technology

It realizes efficient network load balancing, makes full use of the switch's interface performance, storage capacity and processing capacity, reduces the work and overhead of network cards and host software in message sorting, makes the message spraying process transparent and requires no intervention, and promotes the application of technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120110997A_ABST
    Figure CN120110997A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of network transmission, and particularly discloses a message spraying method and system, and the method comprises the steps: obtaining a message data flow which needs to be subjected to a packet spraying operation from a network data flow through a packet spraying initiating end, carrying out the repackaging of a source message, adding a special spraying message header, and spraying the message to a packet spraying ending end, and the packet spraying ending end carries out de-encapsulation and sequencing combination reverse processing on the spraying message so as to realize efficient message spraying transmission. Through a corresponding packet spraying message forwarding process, the load balancing of a high-load network can be well realized, the interface performance, the storage capability and the processing capability of the switch can be fully utilized, the work and the overhead of a network card and host software in the aspect of spraying message sorting are saved, and the efficiency is improved. Therefore, the message spraying process becomes transparent and intervention-free network operation, and the application of the packet spraying technology can be effectively promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of network transmission, and in particular relates to a message spraying method and system. Background Art

[0002] With the widespread application of large models, the scale of GPU cluster computing is getting larger and larger. Thousands and tens of thousands of GPUs have become the mainstream, and hundreds of thousands and millions of GPUs are also in the future planning. Cluster computing networks can be divided into two categories: one is north-south traffic, which is commonly known as external network traffic; the other is east-west traffic, which is commonly known as internal network traffic. The huge number of network connections in cluster computing has led to a sharp increase in the proportion of east-west traffic in data centers. In addition, the increase in north-south network traffic caused by the expansion of system scale has led to an exponential growth in the network bandwidth required by data centers.

[0003] If there are too many data packets in the network, it will cause packet delays and will be discarded due to timeout, causing congestion. A high-performance network needs to make full use of network capacity to avoid network congestion as much as possible while providing low-latency network transmission. Traditional Ethernet networks are based on spanning trees to ensure a path from end A to end B to avoid loops in the network. Technologies such as Equal Cost Multi-Path (ECMP) attempt to use as many links as possible between the communicating parties to share the traffic load, but this still limits high-throughput flows to one path. When multi-path technology maps too much traffic to a single network path, network performance will degrade, and load balancing needs to be carefully managed for optimal performance.

[0004] Based on this, a technology called "Packet Spray" has been proposed to achieve a more balanced use of all network paths. However, the current packet spraying will cause packet disorder. The disordered packets after load balancing need to be sorted in logical order on the receiving host side. If the disordered packets are sorted in logical order before transmitting them to the host software, a large buffer and a customized algorithm will be required. It is expensive to restore the order of data packets in the network card. This function requires customized support from the receiving end smart network card, while ordinary network cards usually have only weak storage and processing capabilities and cannot implement this function. This limits the promotion and application of packet spraying technology. Summary of the invention

[0005] The purpose of the present invention is to provide a message spraying method and system to solve the above-mentioned problems existing in the prior art.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] In a first aspect, a message spraying system is provided, including a packet spraying initiator, a transmission network and a packet spraying terminal, wherein the packet spraying initiator and the packet spraying terminal are switches or switching chips, the packet spraying initiator is provided with a plurality of output network ports, the transmission network comprises a plurality of network paths, each network path comprises a plurality of switches or switching chips capable of message forwarding, wherein:

[0008] A packet spraying initiator is used to obtain a message data stream that needs to be subjected to a packet spraying operation from a network data stream as a spraying stream, wherein the spraying stream contains a number of source messages arranged in sequence; and each source message contained in the spraying stream is re-encapsulated, and a spraying message header is added to each source message to obtain a corresponding spraying message packet; then, based on the queuing status of different output network ports and the network busy status of the transmission network, each spraying message packet corresponding to the same spraying stream is matched with possibly different output network ports and possibly different network paths; then, each spraying message packet is sequentially outputted through the matched different output network ports to the matched different network paths in the transmission network, and the corresponding spraying message packet is transmitted to the packet spraying end via the matched different network paths;

[0009] The packet spraying end is used to receive the spraying message packets transmitted by the packet spraying initiator through each network path of the transmission network; then decapsulate each spraying message packet to obtain the corresponding associated source message and spraying message header; then parse the spraying message header to determine the sequence number of the corresponding source message, and sort each source message according to the sequence number of each source message to obtain the original message data stream with restored order, and transmit the original message data stream to the next level device.

[0010] In one possible design, the spray message header includes at least the MAC address of the packet spraying end, the MAC address of the packet spraying initiator, the protocol identifier, the spraying flow identifier, the packet sequence number, the number of preceding packets and the number of preceding packet bytes.

[0011] In one possible design, the network busy state includes the network topology and the bandwidth utilization of each network path, and the queuing state includes the effective rate, queue length and buffer occupancy.

[0012] In one possible design, the spray message header includes a spray flow identifier, a packet sequence number, a number of preceding packets, and a number of bytes of the preceding packet.

[0013] In a second aspect, a message spraying method is provided, which is applied to the message spraying system described in the first aspect, and the method comprises:

[0014] The packet spraying initiator obtains a message data stream that needs to be subjected to a packet spraying operation from a network data stream as a spraying stream, wherein the spraying stream includes a plurality of source messages arranged in sequence;

[0015] The packet spraying initiator re-encapsulates each source message contained in the spraying flow, adds a spraying message header to each source message, and obtains the corresponding spraying message packet;

[0016] The packet spraying initiator matches corresponding possibly different output network ports and possibly different network paths for each spraying message packet based on the queuing status of each output network port contained therein and the network busy status of the transmission network, and transmits the corresponding spraying message packet to the packet spraying end via the matched network path;

[0017] The packet spraying end receives the spraying message packets transmitted by the packet spraying initiator through each network path of the transmission network;

[0018] The packet spraying end decapsulates each spraying message packet to obtain the corresponding associated source message and spraying message header;

[0019] The packet spraying end parses the spraying message header, determines the order of the corresponding source messages, and arranges and combines each source message according to the order of each source message to obtain the original message data stream with restored order, and transmits the original message data stream to the next level device.

[0020] In a possible design, the step of sorting the source messages according to the sequence numbers of the source messages to obtain the original message data stream in a restored order includes:

[0021] Determine the spray flow sequence according to the spray flow identifier corresponding to the current source message, and compare the packet number corresponding to the current source message with the packet number corresponding to the source message that has been sorted at the end of the spray flow sequence. If the difference between the two is 1, the current source message is placed at the end of the spray flow sequence, and the number of source messages that have been sorted in the spray flow sequence is counted. If the difference between the two is greater than 1, the current source message is stored in the corresponding position of the buffer according to the number of prefix packets and the number of prefix packet bytes corresponding to the current source message.

[0022] In a possible design, the source messages cached in the buffer are used to extract and add to the spray flow sequence according to their corresponding packet sequence numbers, and the source messages cached in the buffer are all set with a maximum waiting sorting time for being extracted and added to the spray flow sequence.

[0023] In a third aspect, a computer-readable storage medium is provided, wherein instructions are stored on the computer-readable storage medium, and when the instructions are executed on a computer, the computer executes the message spraying method described in any one of the first aspect or the message spraying method described in any one of the second aspect. At the same time, a computer program product is also provided, and when the computer program product is executed on a computer, the message spraying method described in any one of the first aspect or the message spraying method described in any one of the second aspect is executed.

[0024] Beneficial effect: The present invention obtains the message data stream that needs to be subjected to the packet spraying operation from the network data stream through the packet spraying initiator to re-encapsulate the source message, and sprays it to the packet spraying end after adding the special message header for spraying, and the packet spraying end then performs reverse processing of decapsulation and sorting combination on the sprayed message to achieve efficient message spraying transmission. The present invention can well achieve load balancing of high-load networks through the corresponding packet spraying message forwarding process, and can make full use of the interface performance, storage capacity and processing capacity of the switch, eliminating the work and overhead of the network card and host software in spraying message sorting, so that the message spraying process becomes a transparent, intervention-free network operation, which can effectively promote the application of packet spraying technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 This is a schematic diagram of the steps of the method in Example 1 of the present invention;

[0027] Figure 2 This is a schematic diagram of the settings for the spray message header;

[0028] Figure 3 This is a schematic diagram of the structure of the system in Example 2 of the present invention;

[0029] Figure 4 This is a schematic diagram of the structure of the device in Example 3 of the present invention. DETAILED DESCRIPTION

[0030] It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. The specific structures and functional details disclosed herein are only used to describe the exemplary embodiments of the present invention. However, the present invention can be embodied in many alternative forms, and it should not be understood that the present invention is limited to the embodiments set forth herein.

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

[0032] In the following description, certain details are provided to facilitate a complete understanding of the example embodiments. However, it will be appreciated by those of ordinary skill in the art that the example embodiments may be implemented without these certain details. For example, devices may be shown in block diagrams to avoid obscuring the examples with unnecessary details. In other embodiments, well-known processes, structures, and techniques may not be shown in unnecessary detail to avoid obscuring the embodiments.

[0033] Embodiment 1:

[0034] This embodiment provides a message spraying method, which can be applied to a message spraying system composed of a three-layer switch or a switching chip. The message spraying system may include a packet spraying initiator, a transmission network, and a packet spraying terminal. Figure 1 As shown, the method comprises the following steps:

[0035] S1. The packet spraying initiator obtains a message data stream that needs to be subjected to a packet spraying operation from a network data stream as a spraying stream, wherein the spraying stream includes a plurality of source messages arranged in sequence.

[0036] In specific implementation, the packet spraying initiator can identify the message data flow that needs to be packet sprayed from the network data flow according to the flow table indication, and then extract the message data flow that needs to be packet sprayed as the spraying flow, which contains several source messages arranged in sequence.

[0037] S2. The packet spraying initiator re-encapsulates each source message contained in the spraying flow, adds a spraying message header to each source message, and obtains the corresponding spraying message packet.

[0038] In specific implementation, the packet spraying initiator can re-encapsulate each source message contained in the spraying flow based on the order of each source message in the spraying flow, add a spraying message header to each source message, and obtain the corresponding spraying message packet. Figure 2 As shown, the added spraying message header may include the MAC address SP-DA of the packet spraying end, the MAC address SP-SA of the packet spraying initiator, the protocol identifier SPTYP (which may be a 16-bit protocol identifier, such as 0xa833), the spraying flow identifier SP_ID (which may be a 16-bit spraying flow identifier), the packet sequence number PKT_ID (which may be a 16-bit packet sequence number, i.e., the order of the corresponding source message), the number of preceding packets FWD_K (i.e., the number of corresponding source messages in the front order) and the number of preceding packet bytes K_PKTS_LEN (i.e., the length of the preceding spraying message packet obtained after the corresponding source message in the front order is re-encapsulated). The number of preceding packets FWD_K is related to the maximum number of out-of-order packets that may occur, and is generally preset by the control program. The number of preceding packet bytes K_PKTS_LEN refers to the byte length of the preceding spraying message packet encapsulated previously.

[0039] S3. The packet spraying initiator matches each spraying message packet with a corresponding possibly different output network port and possibly different network path based on the queue status of each output network port contained therein and the network busy status of the transmission network.

[0040] In specific implementation, the packet spraying initiator matches the corresponding output network port and network path for each spraying message packet based on the queuing status of each output network port and the network busy status of the transmission network. The network busy status of each transmission network includes the network topology and the bandwidth utilization of each network path, and the queuing status of each output network port includes the effective rate, queue length and cache occupancy.

[0041] S4. The packet spraying initiator outputs each spraying message packet in turn through the matched output network port to the matched network path in the transmission network, and transmits the corresponding spraying message packet to the packet spraying end via the matched network path.

[0042] S5. The packet spraying end receives the spraying message packet transmitted by the packet spraying initiator through various network paths of the transmission network.

[0043] During specific implementation, the packet spraying end receives various message packets transmitted by the transmission network, and can identify which message packets are spraying message packets transmitted by the spraying initiator through the corresponding network path of the transmission network by checking whether the fixed bits of the message packets contain the corresponding protocol identifier and spraying flow identifier.

[0044] S6. The packet spraying terminal decapsulates each spraying message packet to obtain the corresponding associated source message and spraying message header.

[0045] In specific implementation, after receiving the spraying message packets, the packet spraying terminal decapsulates each spraying message packet to obtain the corresponding associated source message and spraying message header.

[0046] S7. The packet spraying end parses the spraying message header, determines the order of the corresponding source messages, and arranges and combines each source message according to the order of each source message to obtain the original message data stream with restored order, and transmits the original message data stream to the next level device.

[0047] In the specific implementation, the packet spraying end parses the spraying message header to obtain a spraying message header including a spraying flow identifier, a packet sequence number, a number of preceding packets, and a number of preceding packet bytes. Then, the spraying flow sequence is determined according to the spraying flow identifier corresponding to the current source message, and the packet sequence number corresponding to the current source message is compared with the packet sequence number corresponding to the source message that has been sorted at the end of the spraying flow sequence. If the difference between the two is 1, it means that the current source message is sorted right after the source message at the end of the spraying flow sequence. The current source message is placed at the end of the spraying flow sequence, and the number of source messages that have been arranged in the spraying flow sequence is counted and recorded as n (n>0), until the number of source messages n that have been arranged in the spraying flow sequence is consistent with the number of source messages arranged in the spraying flow (which can be determined by the number of preceding packets corresponding to the last source message that has been arranged in the spraying flow sequence). If the difference between the two is greater than 1, it indicates that the current source message is not immediately behind the source message at the end of the spraying sequence. Therefore, it is necessary to reserve storage space for the message packets that have not yet arrived and are immediately behind the source message at the end of the spraying sequence, and store the current source message in the corresponding position of the buffer according to the number of preceding packets and the number of preceding packet bytes corresponding to the current source message. The buffer at the packet spraying end can be a ring buffer, that is, the address of the buffer increases to the maximum and then returns to the starting address. The source messages cached in the buffer are used to extract and add to the spraying sequence according to their corresponding packet sequence numbers, and the source messages cached in the buffer are all set with the maximum waiting sorting time for being extracted and added to the spraying sequence. The maximum waiting sorting time can be pre-configured by the packet spraying end or configured and specified in the corresponding spraying message header. Finally, the n consecutive source messages in the spraying sequence are arranged to form the original order of the spraying flow, that is, the original message data stream, and the packet spraying end transmits the original message data stream to the next level device to achieve efficient packet spraying operation.

[0048] Embodiment 2:

[0049] This embodiment provides a message spraying system, such as Figure 3 As shown, it includes a packet spraying initiator, a transmission network and a packet spraying terminal, the packet spraying initiator and the packet spraying terminal are switches or switching chips, the packet spraying initiator is provided with a plurality of output network ports, the transmission network includes a plurality of network paths, and each network path includes a plurality of switches or switching chips that can forward messages. The message spraying system is used to implement the message spraying method in Example 1. This system can well realize the load balancing of high-load networks through the corresponding packet spraying message forwarding process, and can make full use of the interface performance, storage capacity and processing capacity of the switch, eliminating the work and overhead of the network card and host software in the spraying message sorting, so that the message spraying process becomes a transparent, intervention-free network operation, which can effectively promote the application of packet spraying technology.

[0050] Embodiment 3:

[0051] This embodiment provides a switch or switching chip for message spraying, such as Figure 4 As shown, at the hardware level, it includes:

[0052] Data network port, used to establish data connection between the processor and external switch or switching chip;

[0053] A memory, used for storing corresponding instructions;

[0054] The processor is used to read the instructions stored in the memory and execute the functional steps of the packet spraying initiator or the packet spraying terminal in Example 1 according to the instructions.

[0055] Optionally, the device further includes an internal bus, through which the processor, the memory and the data interface can be interconnected, and the internal bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0056] The memory may include, but is not limited to, random access memory (RAM), read only memory (ROM), flash memory, first input first output (FIFO) and / or first in last out (FILO) memory, etc. The processor may be a switching chip processor or a general processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0057] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A message spraying system, characterized in that: It includes a packet spraying initiator, a transmission network and a packet spraying terminal, wherein the packet spraying initiator and the packet spraying terminal are switches or switching chips, the packet spraying initiator is provided with a plurality of output network ports, the transmission network includes a plurality of network paths, and each network path includes a plurality of switches or switching chips capable of message forwarding, wherein: A packet spraying initiator is used to obtain a message data stream that needs to be subjected to a packet spraying operation from a network data stream as a spraying stream, wherein the spraying stream contains a number of source messages arranged in sequence; and each source message contained in the spraying stream is re-encapsulated, and a spraying message header is added to each source message to obtain a corresponding spraying message packet; then, based on the queuing status of different output network ports and the network busy status of the transmission network, each spraying message packet corresponding to the same spraying stream is matched with possibly different output network ports and possibly different network paths; then, each spraying message packet is sequentially outputted through the matched different output network ports to the matched different network paths in the transmission network, and the corresponding spraying message packet is transmitted to the packet spraying end via the matched different network paths; The packet spraying end is used to receive the spraying message packets transmitted by the packet spraying initiator through each network path of the transmission network; then decapsulate each spraying message packet to obtain the corresponding associated source message and spraying message header; then parse the spraying message header to determine the sequence number of the corresponding source message, and sort each source message according to the sequence number of each source message to obtain the original message data stream with restored order, and transmit the original message data stream to the next level device.

2. A message spraying system according to claim 1, characterized in that: The spraying message header at least includes the MAC address of the packet spraying end, the MAC address of the packet spraying initiator, the protocol identifier, the spraying flow identifier, the packet sequence number, the number of preceding packets and the number of preceding packet bytes.

3. A message spraying system according to claim 1, characterized in that: The network busy state includes the network topology and the bandwidth utilization of each network path, and the queuing state includes the effective rate, queue length and buffer occupancy.

4. A message spraying system according to claim 1, characterized in that: The spray message header includes a spray flow identifier, a packet sequence number, a number of preceding packets, and a number of bytes of the preceding packet.

5. A message spraying method, applied to the message spraying system according to any one of claims 1 to 4, characterized in that: include: The packet spraying initiator obtains a message data stream that needs to be subjected to a packet spraying operation from a network data stream as a spraying stream, wherein the spraying stream includes a plurality of source messages arranged in sequence; The packet spraying initiator re-encapsulates each source message contained in the spraying flow, adds a spraying message header to each source message, and obtains the corresponding spraying message packet; The packet spraying initiator matches corresponding possibly different output network ports and possibly different network paths for each spraying message packet based on the queuing status of each output network port contained therein and the network busy status of the transmission network, and transmits the corresponding spraying message packet to the packet spraying end via the matched network path; The packet spraying end receives the spraying message packets transmitted by the packet spraying initiator through each network path of the transmission network; The packet spraying end decapsulates each spraying message packet to obtain the corresponding associated source message and spraying message header; The packet spraying end parses the spraying message header, determines the order of the corresponding source messages, and arranges and combines each source message according to the order of each source message to obtain the original message data stream with restored order, and transmits the original message data stream to the next level device.

6. A message spraying method according to claim 5, characterized in that: The step of sorting the source messages according to the sequence numbers of the source messages to obtain the original message data stream in a restored order includes: Determine the spray flow sequence according to the spray flow identifier corresponding to the current source message, and compare the packet number corresponding to the current source message with the packet number corresponding to the source message that has been sorted at the end of the spray flow sequence. If the difference between the two is 1, the current source message is placed at the end of the spray flow sequence, and the number of source messages that have been sorted in the spray flow sequence is counted. If the difference between the two is greater than 1, the current source message is stored in the corresponding position of the buffer according to the number of prefix packets and the number of prefix packet bytes corresponding to the current source message.

7. A message spraying method according to claim 6, characterized in that: The source messages cached in the buffer are used to be extracted and added to the spraying flow sequence according to their corresponding packet sequence numbers, and the source messages cached in the buffer are all set with a maximum waiting sorting time for being extracted and added to the spraying flow sequence.