Method and device for transmitting data packet

By interacting forward packets and answer packets in the Piaoping Fat Tree network, the routing table locking state and packet labeling mechanism are used to solve the problem of out-of-order data packets, ensuring that data packets are transmitted in sequence, reducing cache requirements and chip costs, and improving network performance.

CN120281702APending Publication Date: 2025-07-08SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510409185.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

There is a problem of out-of-order transmission of data packets in the Paiping Fat Tree network, resulting in a decrease in network throughput and an increase in delay. The existing technology requires a large number of cache resources to solve the out-of-order problem, which increases chip costs.

Method used

By interacting forward packets and reply packets between the source node and the target node, the locked state and packet label mechanism in the routing table are used to ensure that data packets are transmitted in sequence, avoid out-of-order phenomena, and reduce cache requirements.

Benefits of technology

The orderly transmission of data packets is realized, the cache demand is reduced, the chip cost is reduced, and the network throughput is improved and the delay is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281702A_ABST
    Figure CN120281702A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data packet transmission method and device, and the method comprises the steps: enabling a target node to transmit a jth response packet to a source node along a first transmission path when a target port receives a jth forward packet transmitted by a source port through the first transmission path, the source port being mounted on the source node, the target port is mounted on a target node, j is an integer greater than or equal to 1, and a plurality of transmission paths exist between the source node and the target node; and when the source node receives the jth response packet and the packet label in the jth response packet is inconsistent with the latest label under the first target entry in the source node routing table, the source port sends the (j + 1) th forward packet to the target port through the first transmission path, the (j + 1) th forward packet is a data packet sent by the source port to the target port after the jth forward packet. According to the invention, the problem of disorder of the data packet transmitted by the leveling fat tree network in the related technology is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of computers, and more particularly, to a method and apparatus for transmitting data packets. Background Art

[0002] The flattened fat tree network is a commonly used multi-level switching network. A typical flattened fat tree network has routing nodes, each node is connected to N other nodes, and all nodes form an N-dimensional hypercube. A number of ports can be attached to each node for receiving and sending data. One feature of the flattened fat tree network is that there are multiple paths from a source port to a destination port.

[0003] Multiple paths are also one of the advantages of the flattened fat tree network. When one path in the network is occupied by data reception and transmission of other ports, data packets can still reach the destination along other paths, which avoids ineffective waiting and helps improve the overall network throughput rate and reduce latency. However, multiple paths also bring the problem of out-of-order. For example, when the source port sends two data packets, which are transmitted along two different paths respectively, due to different delays of the two paths, it is possible that the data of the first packet arrives at the destination port later than the data of the second packet.

[0004] In view of the above problems, there is currently no effective solution. Summary of the Invention

[0005] Embodiments of the present application provide a method and apparatus for transmitting data packets to at least solve the problem of out-of-order data packet transmission in the flattened fat tree network in related technologies.

[0006] According to an embodiment of the present application, a method for transmitting data packets is provided, including: when the target port receives the j-th forward packet sent by the source port through the first transmission path, the target node sends the j-th acknowledgment packet to the source node along the first transmission path, where the source port is attached to the source node, the target port is attached to the target node, j is an integer greater than or equal to 1, and there are multiple transmission paths between the source node and the target node;

[0007] When the source node receives the j-th acknowledgment packet and the packet label in the j-th acknowledgment packet is inconsistent with the latest label in the first target entry in the source node routing table, the source port sends the (j + 1)-th forward packet to the target port through the first transmission path, where the (j + 1)-th forward packet is a data packet sent by the source port to the target port after the j-th forward packet.

[0008] In an exemplary embodiment, when the source node receives the j-th acknowledgment packet and the packet label in the j-th acknowledgment packet is inconsistent with the latest label under the first target entry in the source node routing table, the source port sends the (j + 1)-th forward packet to the target port through the first transmission path, including: The source node determines the first target entry in the source node routing table, where the first target entry records the relevant information of the forward packet sent from the source port to the target port; The source node determines that the status field in the first target entry is in a locked state, where the locked state is used to indicate that the source node sends the forward packet sent to the target port to the next node indicated by the next node field in the first target entry; The source node obtains a first node label in the next node field of the first target entry, where the first node label is the label of the first node among the N nodes connected to the source node, and the source node has sent the j-th forward packet to the first node, and N is an integer greater than 1; The source node sends the (j + 1)-th forward packet to the first node.

[0009] In an exemplary embodiment, after the source node sends the (j + 1)-th forward packet to the first node, the method further includes: When the first node is an intermediate node, the first node determines that there is no refresh flag in the (j + 1)-th forward packet; The first node determines a second target entry in the intermediate node routing table, where the second target entry records the relevant information of the forward packet sent from the source port to the target port; The first node obtains a second node label in the next node field of the second target entry, where the second node label is the label of the second node among the M nodes connected to the first node, and the first node has sent the j-th forward packet to the second node, and M is an integer greater than 1; The first node sends the (j + 1)-th forward packet to the second node.

[0010] In an exemplary embodiment, after the first node sends the (j + 1)-th forward packet to the second node, the method further includes: When the second node is the target node, the target node sends the (j + 1)-th forward packet to the target port; The target node records the first node label in the previous node field of the third target entry in the target node routing table, where the third target entry records the relevant information of the forward packet sent from the source port to the target port.

[0011] In an exemplary embodiment, after the target node records the first node label in the previous node field of the third target entry in the target node routing table, the method further includes: the target node generates a (j + 1)-th response packet, where the (j + 1)-th response packet includes: the port identifier of the source port, the port identifier of the target port, and the (j + 1)-th label of the (j + 1)-th forward packet; the target node obtains the first node label in the third target entry of the target node routing table and sends the (j + 1)-th response packet to the first node.

[0012] In an exemplary embodiment, after sending the (j + 1)-th response packet to the first node, the method further includes: the first node obtains the node label of the source node in the previous node field of the second target entry; the first node sends the (j + 1)-th response packet to the source node.

[0013] In an exemplary embodiment, after the first node sends the (j + 1)-th response packet to the source node, the method further includes: the source node obtains the (j + 1)-th label of the (j + 1)-th forward packet in the (j + 1)-th response packet; the source node recycles the (j + 1)-th label to the label pool, where the labels recycled to the label pool are allowed to be assigned to other forward packets sent by the source node; or, the source node determines the (j + 1)-th label as the acknowledged label and recycles the labels in the acknowledged packet label counter that are before the (j + 1)-th label, where the labels in the acknowledged packet label counter are allowed to be assigned to other forward packets sent by the source node.

[0014] In an exemplary embodiment, after the first node sends the (j + 1)-th forward packet to the second node, the method further includes: when the second node is an intermediate node, the second node determines that there is no refresh flag in the (j + 1)-th forward packet; the second node determines a fourth target entry in the intermediate node routing table, where the fourth target entry records the relevant information of the forward packet sent from the source port to the target port; the second node obtains a third node label in the next node field of the fourth target entry, where the third node label is the label of the third node among the T nodes connected to the second node, and the second node has sent the j-th forward packet to the third node, and T is an integer greater than 1; the second node sends the (j + 1)-th forward packet to the third node.

[0015] In an exemplary embodiment, before the source node sends the (j + 1)-th forward packet to the first node, the method further includes: the source node obtains the (j + 1)-th data packet at the source port; the source node generates a first key field and adds the first key field to the (j + 1)-th data packet to obtain the (j + 1)-th forward packet, where the first key field includes: the port identifier of the source port, the port identifier of the destination port, and the packet label of the (j + 1)-th forward packet.

[0016] In an exemplary embodiment, the source node generating a first key field includes: the source node obtains the (j + 1)-th label from the label pool and determines the (j + 1)-th label as the packet label of the (j + 1)-th forward packet; or, the source node increments the value of the sent packet label counter by one to determine the (j + 1)-th label and determines the (j + 1)-th label as the packet label of the (j + 1)-th forward packet, where the sent packet label counter records the packet labels of the forward packets that the source port has sent to the destination port.

[0017] In an exemplary embodiment, after the source node sends the (j + 1)-th forward packet to the first node, the method further includes: the source node modifies the latest label in the first target entry to the packet label of the (j + 1)-th forward packet, where the latest label under the first target entry is used to indicate the packet label of the latest forward packet sent by the source node.

[0018] In an exemplary embodiment, the method further includes: when the source node receives the j-th acknowledgment packet and the j-th packet label in the j-th acknowledgment packet is consistent with the latest label in the source node routing table, modifying the locked state in the first target entry of the source node routing table to the free state.

[0019] In an exemplary embodiment, after modifying the locked state in the first target entry of the source node routing table to the free state, the method further includes: the source node determines a fourth node among the N nodes connected to the source node through a routing algorithm, where N is an integer greater than 1; the source node sends the (j + 1)-th forward packet to the fourth node.

[0020] In an exemplary embodiment, after the source node sends the (j + 1)-th forward packet to the fourth node, the method further includes: the fourth node determines that the refresh flag exists in the (j + 1)-th forward packet; the fourth node determines a fifth node among S - 1 nodes connected to the fourth node through a routing algorithm, where the S - 1 nodes are the nodes among the S nodes connected to the fourth node except the source node, and S is an integer greater than 1; the fourth node sends the (j + 1)-th forward packet to the fifth node.

[0021] In an exemplary embodiment, after the fourth node sends the (j + 1)-th forward packet to the fifth node, the method further includes: in the case where the fifth node is the target node, the target node sends the (j + 1)-th forward packet to the target port; the target node records the fourth node label of the fourth node in the previous node field of the fourth target entry in the target node routing table, where the fourth target entry records the relevant information of the forward packet sent from the source port to the target port.

[0022] In an exemplary embodiment, after the target node records the fourth node label of the fourth node in the previous node field of the fourth target entry in the target node routing table, the method further includes: the target node generates a (j + 1)-th acknowledgment packet, where the (j + 1)-th acknowledgment packet includes: the port identifier of the source port, the port identifier of the target port, and the packet label of the (j + 1)-th forward packet; the target node obtains the fourth node label in the fourth target entry in the target node routing table and sends the (j + 1)-th acknowledgment packet to the fourth node.

[0023] In an exemplary embodiment, after the fourth node sends the (j + 1)-th forward packet to the fifth node, the method further includes: in the case where the fifth node is an intermediate node, the fifth node determines that the refresh flag exists in the (j + 1)-th forward packet; the fifth node determines a sixth node among R - 1 nodes connected to the fifth node through a routing algorithm, where the R - 1 nodes are the nodes among the R nodes connected to the fifth node except the fifth node, and R is an integer greater than 1; the fifth node sends the (j + 1)-th forward packet to the sixth node.

[0024] In an exemplary embodiment, before the source node sends the (j + 1)-th forward packet to the fourth node, the method further includes: the source node obtains the (j + 1)-th data packet at the source port; the source node generates a second key field and adds the second key field to the (j + 1)-th data packet to obtain the (j + 1)-th forward packet, where the second key field includes: the port identifier of the source port, the port identifier of the destination port, the packet label of the (j + 1)-th forward packet, and a refresh flag.

[0025] In an exemplary embodiment, after the source node sends the (j + 1)-th forward packet to the fourth node, the method further includes: the source node modifies the latest label of the first target entry to the packet label of the (j + 1)-th forward packet, where the latest label of the first target entry is used to indicate the packet label of the latest forward packet sent by the source node.

[0026] According to another embodiment of the present application, there is provided a flattened fat tree network, including: a target node, configured to, when receiving the j-th forward packet sent by a source port through a first transmission path at a target port, send a j-th response packet to the source node along the first transmission path, where the source port is mounted on the source node, the target port is mounted on the target node, j is an integer greater than or equal to 1, and there are multiple transmission paths between the source node and the target node; a source port, configured to, when the source node receives the j-th response packet and the packet label in the j-th response packet is inconsistent with the latest label under a first target entry in the source node routing table, send a (j + 1)-th forward packet to the target port through the first transmission path, where the (j + 1)-th forward packet is a data packet sent by the source port to the target port after the j-th forward packet.

[0027] According to still another embodiment of the present application, there is further provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0028] According to still another embodiment of the present application, there is further provided an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0029] Through the present application, the source node places a source node routing table, and the latest tag is recorded under the first target entry of the source node routing table; when the target port receives the j-th forward packet sent by the source port through the first transmission path, the target node sends the j-th acknowledgment packet to the source node along the first transmission path. When the source node receives the j-th acknowledgment packet and the packet tag in the j-th acknowledgment packet is inconsistent with the latest tag under the first target entry in the source node routing table, the source port sends the (j + 1)-th forward packet to the target port through the first transmission path. Therefore, the problem of out-of-order packet transmission in the flattened fat tree network in the related art can be solved, and the effect of ensuring that the packet transmission in the flattened fat tree network will not be out of order can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a schematic diagram of the flattened fat tree network structure according to an embodiment of the present application Figure 1 ;

[0031] Figure 2 is a schematic diagram of the flattened fat tree network structure according to an embodiment of the present application Figure 2 ;

[0032] Figure 3 is a hardware structure block diagram of a server device for a method of transmitting data packets according to an embodiment of the present application;

[0033] Figure 4 is a flowchart of a method of transmitting data packets according to an embodiment of the present application;

[0034] Figure 5 is a schematic structural diagram of a forward packet according to an embodiment of the present application;

[0035] Figure 6 is a schematic diagram of a counter according to an embodiment of the present application;

[0036] Figure 7 is a schematic diagram of a source node routing table according to an embodiment of the present application;

[0037] Figure 8 is a schematic diagram of an intermediate node routing table according to an embodiment of the present application;

[0038] Figure 9 is a schematic diagram of a target node routing table according to an embodiment of the present application;

[0039] Figure 10 is a schematic diagram of the structure of an acknowledgment packet according to an embodiment of the present application;

[0040] Figure 11 is a schematic diagram of the flattened fat tree network structure according to an embodiment of the present application Figure 3 ;

[0041] Figure 12Schematic diagram of a flattened fat tree network structure according to an embodiment of the present application Figure 4 ;

[0042] Figure 13 Schematic diagram of a flattened fat tree network structure according to an embodiment of the present application Figure 5 ;

[0043] Figure 14 Schematic diagram of a flattened fat tree network structure according to an embodiment of the present application Figure 6 。 Detailed implementation manners

[0044] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

[0045] As Figure 1 is a schematic diagram of a flattened fat tree network structure. It has a total of 16 nodes (circles in the figure), numbered 0 to 15. These 16 nodes form a 4-dimensional hypercube, and each node is connected to 4 nodes. The connection relationship between nodes indicates that data can be transmitted between them. Zero or several ports can be attached to each node, and each port serves as a data source and the final destination of the data for data sending and receiving.

[0046] One feature of the flattened fat tree network is that there may be multiple paths from a source port to a destination port. Figure 2 is an example scenario of multiple paths. A source port attached to node 0 sends data to a target port attached to node 11, and there are at least two paths:

[0047] One is along node 0 -> node 1 -> node 9 -> node 11 to reach the target port; the other is along node 0 -> node 8 -> node 10 -> node 11 to reach the target port.

[0048] Multiple paths are also one of the advantages of the flattened fat tree network. When one path in the network is occupied due to data sending and receiving by other ports, the data packet can still reach the destination along other paths, which avoids ineffective waiting and helps to improve the overall network throughput rate and reduce latency.

[0049] However, multiple paths also bring the problem of out-of-order. Taking the scenario in the figure as an example, when the source port sends two data packets and they are transmitted along the above two paths respectively, it may happen that path 1 is busier and has a longer latency than path 2, resulting in the first packet of data arriving later than the second packet of data.

[0050] Out-of-order is completely unacceptable for some protocols, such as the PCIe protocol. The main method to solve out-of-order is to reorder at the target port and then send out. However, this method requires setting a cache for each sending port at each receiving port. For example, assume in the above-mentioned flattened fat-tree network with 16 nodes, each node is connected with 4 ports. Then each port needs to set a cache for the other 63 ports for sorting, and a total of 63 * 63 cache chips are needed. And for each cache chip, it needs to be prepared according to the possible out-of-order depth in the worst case. Therefore, the whole chip requires a very high cache capacity. And cache is an expensive resource in the chip, and an excessive cache capacity will significantly drive up the chip cost.

[0051] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence.

[0052] The method embodiments provided in the embodiments of this application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 3 is the hardware structure block diagram of a server device for a method of transmitting data packets in the embodiments of this application. As Figure 3 shown, the server device may include one or more ( Figure 3 only one is shown in the figure) processors 102 (the processors 102 may include, but are not limited to, processing devices such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above-mentioned server device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that, Figure 3 the structure shown is only schematic, and it does not limit the structure of the above-mentioned server device. For example, the server device may further include more or fewer components than Figure 3 shown in the figure, or have a different configuration from Figure 3 shown in the figure.

[0053] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method of transmitting data packets in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the server device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0054] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the server device. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0055] In this embodiment, a method for transmitting data packets is provided, which is applied to a flattened fat-tree network structure. Figure 4 It is a flowchart of the method for transmitting data packets according to the embodiments of the present application, as Figure 4 shown. The process includes the following steps:

[0056] Step S402, when the j-th forward packet sent by the source port is received at the target port through the first transmission path, the target node sends the j-th acknowledgment packet to the source node along the first transmission path, where the source port is mounted on the source node, the target port is mounted on the target node, j is an integer greater than or equal to 1, and there are multiple transmission paths between the source node and the target node;

[0057] Step S404, when the source node receives the j-th acknowledgment packet and the packet label in the j-th acknowledgment packet is inconsistent with the latest label under the first target entry in the source node routing table, the source port sends the (j + 1)-th forward packet to the target port through the first transmission path, where the (j + 1)-th forward packet is the data packet sent by the source port to the target port after the j-th forward packet.

[0058] Through the above steps, the source node places the source node routing table, and the latest label is recorded under the first target entry of the source node routing table; in the case that the j-th forward packet sent by the source port is received at the target port through the first transmission path, the target node sends the j-th response packet to the source node along the first transmission path, and when the source node receives the j-th response packet and the packet label in the j-th response packet is inconsistent with the latest label under the first target entry in the source node routing table, the source port sends the (j + 1)-th forward packet to the target port through the first transmission path. Therefore, the problem of out-of-order transmission of data packets in the flattened fat tree network in the related art can be solved, and the effect of ensuring that the data packets transmitted in the flattened fat tree network will not be out of order can be achieved. Among them, the execution subject of the above steps can be a server, a terminal, etc., but is not limited thereto.

[0059] An interaction mechanism for forward packets and response packets is implemented in the flattened fat tree network. When the source port sends data to the source node, the source node needs to append some information outside the payload of the data packet to form a forward packet, and send it step by step to the target node, and extract the data payload at the target node and send it to the target port. When the target port receives the data, the target node also needs to construct a response packet and send it back to the source node along the path of the forward packet.

[0060] Before the source node sends the (j + 1)-th forward packet to the first node, the method further includes: the source node obtains the (j + 1)-th data packet at the source port; the source node generates a first key field and adds the first key field to the (j + 1)-th data packet to obtain the (j + 1)-th forward packet, where the first key field includes: the port identifier of the source port, the port identifier of the target port, and the packet label of the (j + 1)-th forward packet.

[0061] As Figure 5 is a schematic diagram of the structure of a forward packet. In addition to the data payload, the forward packet also contains 4 key data fields, namely the source port, the target port, the packet label, and the refresh flag. The source port is the number of the port that sends the forward packet, the target port is the number of the port that receives the forward packet, and the source port and the target port can be used to query the corresponding routing table in all nodes on the path including the source node, and query the corresponding entry in the corresponding routing table.

[0062] As an optional implementation manner, the source node generates the first key field, including: the source node obtains the (j + 1)-th label from the label pool and determines the (j + 1)-th label as the packet label of the (j + 1)-th forward packet; or, the source node adds 1 to the value of the sent packet label counter to determine the (j + 1)-th label, and determines the (j + 1)-th label as the packet label of the (j + 1)-th forward packet, where the sent packet label counter records the packet labels of the forward packets that the source port has sent to the target port.

[0063] The packet label is a unique identifier for each packet transmitted for each {source port, destination port} pair. That is, for each {source port, destination port} pair, each packet being transmitted in the flattened fat-tree network has a different label value. Each source node needs to maintain a label pool for each possible {source port, destination port} pair. When a source node receives a data packet, it retrieves a label from the label pool and places it in this field of the forward packet; when it receives an acknowledgment packet, it reclaims the corresponding label.

[0064] The packet label can simply use N numbers from 0 to L - 1, and the label pool can also be implemented using a simple counter. As Figure 6 shown, the two counters respectively represent the sent packet label and the acknowledged packet label. Whenever a data packet needs to be sent, the sent packet label + 1 is used as the label of the packet, and the value after + 1 is used to update the sent packet label counter; whenever an acknowledgment packet is received, the packet label field in the acknowledgment packet is used to update the acknowledged packet label counter to reclaim one or more labels. If the sent packet label + 1 is equal to the acknowledged packet label (using wrap-around addition, that is, if the sent packet label = L - 1, then the sent packet label + 1 = 0), then there are no available labels currently, and the source node needs to wait and cannot send data.

[0065] In the above embodiment, a label pool or a counter is used to assign packet labels to data packets, and the corresponding label is reclaimed whenever an acknowledgment packet is received. Before the previous packet sent from the same source port to the same destination port has successfully reached the destination port, the current packet will temporarily lose the choice of path diversity and will be sent to the destination port along the path of the previous packet; when multiple data packets are sent from the same source port to the same destination port, these data packets will reach the destination port in order and there will be no out-of-order situation, achieving the effect that the data packets can be ordered.

[0066] As an optional implementation, when the source node receives the j-th acknowledgment packet and the packet tag in the j-th acknowledgment packet is inconsistent with the latest tag under the first target entry in the source node routing table, the source port sends the (j + 1)-th forward packet to the target port through the first transmission path, including: the source node determines the first target entry in the source node routing table, where the first target entry records the relevant information of the forward packet sent from the source port to the target port; the source node determines that the status field in the first target entry is in the locked state, where the locked state is used to indicate that the source node sends the forward packet sent to the target port to the next node indicated by the next node field in the first target entry; the source node obtains a first node tag in the next node field of the first target entry, where the first node tag is the tag of the first node among the N nodes connected to the source node, and the source node sends the j-th forward packet to the first node, and N is an integer greater than 1; the source node sends the (j + 1)-th forward packet to the first node.

[0067] Routing tables are placed at each node of the flattened fat tree network, namely the source node routing table, the intermediate node routing table, and the target node routing table. For each transmission, if the data packet is sent from the port mounted on the current node, then the current node is the source node of this transmission, the port from which the source node sends the data packet is the source port, and the routing table placed on the source node is the source node routing table; if the data packet is finally sent to the port mounted on the current node, then the current node is the target node of this transmission, the port to which the target node sends the data packet is the target port, and the target node routing table is placed on the target node; if the above conditions are not met, then the current node is the intermediate node of this transmission, and the intermediate node routing table is used. It should be noted that if, in a transmission, both the source port and the target port are mounted on the current node, then there is only one path for the data packet transmission, so the method of the present invention is not required, and the present invention does not discuss this situation either.

[0068] The source node routing table is built with each possible pair of {source port, target port} as the lookup address, where the source port includes all ports mounted on the current node, and the target port includes all ports not mounted on the current node. As Figure 7 shown, each entry in the routing table includes three key fields: status, next node number, and the latest tag.

[0069] The status field has two values, namely the free state and the locked state. The free state means that the data packet can freely perform multi-path selection; the locked state means that the data packet must be sent to the node specified by the "next node number". The latest tag field is used to record the tag number of the last packet sent out from the current node.

[0070] The intermediate node routing table is built with each possible {source port, destination port} pair as the lookup address, where the source port and the destination port respectively contain ports not mounted under the current node. As Figure 8 shown, each entry of the intermediate node routing table contains two key fields, namely the next node number and the previous node number. When the received data packet contains a "refresh" flag, the node can freely select the next node according to path diversity and refresh the "next node number" in the table after selection; when it does not contain the "refresh" flag, the "next node number" in the table is selected for routing. The previous node number is used to record the number of the previous node of the received data packet, which is updated every time a data packet is received, and this field is used to send an acknowledgement packet.

[0071] The destination node routing table is built with each possible {source port, destination port} pair as the lookup address, where the source port needs to contain ports not mounted under the current node, and the destination port only needs to contain ports mounted under the current node. As Figure 9 shown, each entry of the destination node routing table contains a field, namely the previous node number. Similar to the intermediate node routing table, this field is used to record the number of the previous node of the received data packet, which is updated every time a data packet is received, and this field is used to send an acknowledgement packet.

[0072] As an optional implementation manner, when the source node receives the j-th acknowledgement packet and the packet label in the j-th acknowledgement packet is inconsistent with the latest label under the first target entry in the source node routing table, the source port sends the (j + 1)-th forward packet to the destination port through the first transmission path, including: the source node determines the first target entry in the source node routing table, where the first target entry records the relevant information of the forward packet sent by the source port to the destination port; the source node determines that the status field in the first target entry is in a locked state, where the locked state is used to indicate that the source node sends the forward packet sent to the destination port to the next node indicated by the next node field in the first target entry; the source node obtains a first node label in the next node field of the first target entry, where the first node label is the label of the first node among the N nodes connected to the source node, and the source node has sent the j-th forward packet to the first node, and N is an integer greater than 1; the source node sends the (j + 1)-th forward packet to the first node.

[0073] In the above embodiments, the locked state of the source node in the source node routing table indicates that the current packet will temporarily lose the option of path diversity, and the (j + 1)-th forward packet will be sent to the destination port along the path of the previous packet (the j-th forward packet). This can ensure that the data packets will reach the destination port in order, without out-of-order situation, achieving the effect that the forward packets can reach the destination port in order.

[0074] After the source node sends the (j + 1)-th forward packet to the first node, the method further includes: when the first node is an intermediate node, the first node determines that there is no refresh flag in the (j + 1)-th forward packet; the first node determines a second target entry in the intermediate node routing table, where the second target entry records the relevant information of the forward packet sent from the source port to the destination port; the first node obtains a second node label in the next node field of the second target entry, where the second node label is the label of the second node among the M nodes connected to the first node, and the first node has sent the j-th forward packet to the second node, and M is an integer greater than 1; the first node sends the (j + 1)-th forward packet to the second node.

[0075] After the first node sends the (j + 1)-th forward packet to the second node, the method further includes: when the second node is the destination node, the destination node sends the (j + 1)-th forward packet to the destination port; the destination node records the first node label in the previous node field of the third target entry in the destination node routing table, where the third target entry records the relevant information of the forward packet sent from the source port to the destination port.

[0076] In the above embodiments, the previous node field is recorded in the destination node routing table and the intermediate routing table, so that the response packet can be returned along the original path, and the response packet is always transmitted according to the "previous node number" in the routing table to avoid out-of-order arrival of the response packet, achieving the technical effect of ensuring that the response packet can reach in order.

[0077] As Figure 10 shown is the schematic diagram of the structure of the response packet. When the destination node receives the forward packet and sends it to the destination port, it needs to send a response packet to the source node. The response packet includes three fields: source port, destination port, and packet label.

[0078] For each {source port, destination port} pair, if the destination node experiences congestion when sending an acknowledgment packet, such that subsequent acknowledgment packets are generated before the current acknowledgment packet is fully sent, the destination node can skip sending the current acknowledgment packet and directly send the subsequent acknowledgment packets. After skipping one or more acknowledgment packets, the acknowledgment packets received by the source node will have discontinuous packet tags. Therefore, the source node can directly update the acknowledged packet tag counter using the packet tags in the acknowledgment packets, rather than incrementing the counter by 1 for each received packet. This can avoid buffering the acknowledgment packets at the destination node, which would occupy expensive buffer resources; it can also reduce the number of acknowledgment packets, thereby alleviating congestion.

[0079] When the source node receives an acknowledgment packet, it needs to compare the packet tag in the acknowledgment packet with the "latest tag" field in the routing table. If they are equal, the status of the corresponding routing table entry is updated to the free state. For packets sent from the same source port to the same destination port, if the source port knows that all previous packets have been received by the destination port, it will release path diversity again, i.e., when the current packet is sent from this source port, it can choose a reasonable path to reach the destination port.

[0080] When the source node sends a data packet, it needs to query the corresponding entry in the routing table. If it is in the free state, it needs to ignore the "next node number" in the routing table, then select the current optimal next node according to the routing algorithm, and set the refresh field to valid in the forward packet to notify the intermediate node to refresh the path. Then, fill the selected next node into the "next node number" of the routing table and update the status field to the locked state to lock this path.

[0081] After the destination node records the first node label in the previous node field of the third destination entry in the destination node routing table, the method further includes: the destination node generates the (j + 1)-th acknowledgment packet, where the (j + 1)-th acknowledgment packet includes: the port identifier of the source port, the port identifier of the destination port, and the (j + 1)-th label of the (j + 1)-th forward packet; the destination node obtains the first node label in the third destination entry of the destination node routing table and sends the (j + 1)-th acknowledgment packet to the first node.

[0082] After sending the (j + 1)-th acknowledgment packet to the first node, the method further includes: the first node obtains the node label of the source node in the previous node field of the second destination entry; the first node sends the (j + 1)-th acknowledgment packet to the source node.

[0083] After the first node sends the (j + 1)-th acknowledgment packet to the source node, the method further includes: the source node obtains the (j + 1)-th label of the (j + 1)-th forward packet in the (j + 1)-th acknowledgment packet; the source node recycles the (j + 1)-th label to the label pool, where the labels recycled to the label pool are allowed to be assigned to other forward packets sent by the source node; or, the source node determines the (j + 1)-th label as an acknowledged label and recycles the labels in the acknowledged packet label counter that are before the (j + 1)-th label, where the labels in the acknowledged packet label counter are allowed to be assigned to other forward packets sent by the source node.

[0084] After the first node sends the (j + 1)-th forward packet to the second node, the method further includes: when the second node is an intermediate node, the second node determines that there is no refresh flag in the (j + 1)-th forward packet; the second node determines a fourth target entry in the intermediate node routing table, where the fourth target entry records the relevant information of the forward packet sent from the source port to the target port; the second node obtains a third node label in the next node field of the fourth target entry, where the third node label is the label of the third node among the T nodes connected to the second node, and the second node has sent the j-th forward packet to the third node, and T is an integer greater than 1; the second node sends the (j + 1)-th forward packet to the third node.

[0085] Compared with the traditional implementation, the main advantages of this application are: all packets will arrive at the target port in order, so the target port does not need any out-of-order reordering cache, greatly saving the cache usage and reducing the chip cost.

[0086] The following uses an example to illustrate the implementation process of the present invention:

[0087] As Figures 11 to 14 shown, the source port needs to send a forward packet 0 to the target. The source port is mounted on node 0, and the target port is mounted on node 11. In the initial state, the status of the routing table corresponding to node 0 is the free state.

[0088] After node 0 receives the data packet, it reads the routing table and queries that the status is the free state. According to the routing algorithm, the next optimal node is selected as 2, then the refresh field in the forward packet is set to 1, and the data packet is sent to node 2. Node 2 receives the data packet and queries that the refresh field is 1, so it ignores the routing table entry. According to the routing algorithm, the next optimal node is selected as 10, and then the previous node and the next node of the routing table are updated to 10 and 0 respectively.

[0089] After the data packet 0 is sent to the target port, node 11 generates an acknowledgment packet with a packet label of 0. This acknowledgment packet will sequentially verify the "previous node number" in the routing tables of node 11 and other intermediate nodes and is delivered to node 0 along the reverse path. When node 0 receives this acknowledgment packet, since data packets with packet labels 1 to 3 have already been sent, the "latest label" in the routing table is updated to 3. Therefore, the packet label of the current acknowledgment packet is not equal to that in the routing table, and this path cannot be released, as Figure 13 shown. It can also be seen from the figure that since there is still data packet 3 on the path, subsequent packets cannot adopt a new path to prevent overtaking data packet 3.

[0090] Assume that the source port is idle for a certain period of time. When the acknowledgment packet 3 arrives at node 0, data packet 4 has not been sent from the source port to node 0. The packet label obtained by node 0 from the acknowledgment packet is equal to the latest label in the routing table. Therefore, node 0 changes the locked state in the routing table back to the free state.

[0091] Subsequent data packet 4, after being sent to node 0, can reselect the optimal next node like data packet 0 and notify the intermediate nodes to perform path selection by setting the refresh field of the forward packet to 1.

[0092] It can be seen from the figure that since data packet 3 has already arrived at the target port at this time, no path will cause data packet 4 to overtake data packet 3 and result in out-of-order.

[0093] In this application, for each {source node, target node} pair, if there are no other data packets in the current network, paths can be freely selected within the range of path diversity; if there are, the path is locked to ensure that later-sent data packets are sent along the previous path. Use forward packets, acknowledgment packets, and the key fields and interaction mechanisms in the above two types of packets to implement path locking and release; skip certain acknowledgment packets during congestion to avoid caching and reduce congestion; the method of this application enables all packets to arrive at the target port in order, so the target port does not require any out-of-order reordering cache, greatly saving the usage of the cache and reducing the chip cost.

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

[0095] In this embodiment, a flattened fat tree network is also provided. This network is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be elaborated here. As used hereinafter, the term "node" can be a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0096] The flattened fat tree network includes: a target node, which is configured to, when the target node receives the j-th forward packet sent by the source port through the first transmission path at the target port, the target node sends the j-th acknowledgment packet to the source node along the first transmission path, where the source port is mounted on the source node, the target port is mounted on the target node, j is an integer greater than or equal to 1, and there are multiple transmission paths between the source node and the target node; a source port, which is configured to, when the source node receives the j-th acknowledgment packet and the packet label in the j-th acknowledgment packet is inconsistent with the latest label in the first target entry in the source node routing table, the source port sends the (j + 1)-th forward packet to the target port through the first transmission path, where the (j + 1)-th forward packet is a data packet sent by the source port to the target port after the j-th forward packet.

[0097] In an exemplary embodiment, the source node is further configured to determine the first target entry in the source node routing table, where the first target entry records information related to the forward packets sent by the source port to the target port; the source node determines that the status field in the first target entry is in a locked state, where the locked state is used to indicate that the source node sends the forward packets sent to the target port to the next node indicated by the next node field in the first target entry; the source node obtains a first node label in the next node field of the first target entry, where the first node label is the label of the first node among the N nodes connected to the source node, and the source node has sent the j-th forward packet to the first node, and N is an integer greater than 1; the source node sends the (j + 1)-th forward packet to the first node.

[0098] In an exemplary embodiment, when the first node is an intermediate node, the first node is further configured to determine that there is no refresh flag in the (j + 1)-th forward packet; the first node determines a second target entry in the intermediate node routing table, where the second target entry records information related to the forward packet sent from the source port to the target port; the first node obtains a second node label in the next node field of the second target entry, where the second node label is the label of the second node among the M nodes connected to the first node, and the first node has sent the j-th forward packet to the second node, and M is an integer greater than 1; the first node sends the (j + 1)-th forward packet to the second node.

[0099] In an exemplary embodiment, after the first node sends the (j + 1)-th forward packet to the second node, when the second node is the target node, the target node is further configured to send the (j + 1)-th forward packet to the target port; the target node records the first node label in the previous node field of the third target entry in the target node routing table, where the third target entry records information related to the forward packet sent from the source port to the target port.

[0100] In an exemplary embodiment, after the target node records the first node label in the previous node field of the third target entry in the target node routing table, the target node is further configured to generate a (j + 1)-th acknowledgment packet, where the (j + 1)-th acknowledgment packet includes: the port identifier of the source port, the port identifier of the target port, and the (j + 1)-th label of the (j + 1)-th forward packet; the target node obtains the first node label in the third target entry of the target node routing table and sends the (j + 1)-th acknowledgment packet to the first node.

[0101] In an exemplary embodiment, after sending the (j + 1)-th acknowledgment packet to the first node, the first node is further configured to obtain the node label of the source node in the previous node field of the second target entry; the first node sends the (j + 1)-th acknowledgment packet to the source node.

[0102] In an exemplary embodiment, after the first node sends the (j + 1)-th acknowledgment packet to the source node, the source node is further configured to obtain the (j + 1)-th label of the (j + 1)-th forward packet in the (j + 1)-th acknowledgment packet; the source node recycles the (j + 1)-th label to the label pool, where the label recycled to the label pool is allowed to be assigned to other forward packets sent by the source node; or, the source node determines the (j + 1)-th label as an acknowledged label, and recycles the labels in the acknowledged packet label counter that are before the (j + 1)-th label, where the labels in the acknowledged packet label counter are allowed to be assigned to other forward packets sent by the source node.

[0103] In an exemplary embodiment, after the first node sends the (j + 1)-th forward packet to the second node, when the second node is an intermediate node, the second node is further configured to determine that there is no refresh flag in the (j + 1)-th forward packet; the second node determines a fourth target entry in the intermediate node routing table, where the fourth target entry records information related to the forward packet sent from the source port to the target port; the second node obtains a third node label in the next node field of the fourth target entry, where the third node label is the label of the third node among the T nodes connected to the second node, and the second node has sent the j-th forward packet to the third node, and T is an integer greater than 1; the second node sends the (j + 1)-th forward packet to the third node.

[0104] In an exemplary embodiment, before the source node sends the (j + 1)-th forward packet to the first node, the source node is further configured to obtain the (j + 1)-th data packet at the source port; the source node generates a first key field, and adds the first key field to the (j + 1)-th data packet to obtain the (j + 1)-th forward packet, where the first key field includes: the port identifier of the source port, the port identifier of the target port, and the packet label of the (j + 1)-th forward packet.

[0105] In an exemplary embodiment, the source node is further configured to obtain the (j + 1)-th label in the label pool, and determine the (j + 1)-th label as the packet label of the (j + 1)-th forward packet; or, the source node adds 1 to the value of the sent packet label counter to determine the (j + 1)-th label, and determines the (j + 1)-th label as the packet label of the (j + 1)-th forward packet, where the sent packet label counter records the packet labels of the forward packets that have been sent from the source port to the target port.

[0106] In an exemplary embodiment, after the source node sends the (j + 1)-th forward packet to the first node, the source node is further configured to modify the latest label in the first target entry to the packet label of the (j + 1)-th forward packet, where the latest label under the first target entry is used to indicate the packet label of the latest forward packet sent by the source node.

[0107] In an exemplary embodiment, when the source node receives the j-th acknowledgment packet and the j-th packet label in the j-th acknowledgment packet is consistent with the latest label in the source node routing table, the source node is further configured to modify the locked state in the first target entry of the source node routing table to a free state.

[0108] In an exemplary embodiment, after modifying the locked state in the first target entry of the source node routing table to a free state, the source node is further configured to determine a fourth node among the N nodes connected to the source node through a routing algorithm, where N is an integer greater than 1; the source node sends the (j + 1)-th forward packet to the fourth node.

[0109] In an exemplary embodiment, after the source node sends the (j + 1)-th forward packet to the fourth node, the fourth node is further configured to determine that the refresh flag exists in the (j + 1)-th forward packet; the fourth node is further configured to determine a fifth node among the S - 1 nodes connected to the fourth node through a routing algorithm, where the S - 1 nodes are the nodes among the S nodes connected to the fourth node except the source node, and S is an integer greater than 1; the fourth node sends the (j + 1)-th forward packet to the fifth node.

[0110] In an exemplary embodiment, after the fourth node sends the (j + 1)-th forward packet to the fifth node, when the fifth node is the target node, the target node is further configured to send the (j + 1)-th forward packet to the target port; the target node records the fourth node label of the fourth node in the previous node field of the fourth target entry in the target node routing table, where the fourth target entry records the relevant information of the forward packet sent from the source port to the target port.

[0111] In an exemplary embodiment, after the target node records the fourth node label of the fourth node in the previous node field of the fourth target entry in the target node routing table, the target node is further configured to generate a (j + 1)-th response packet, where the (j + 1)-th response packet includes: the port identifier of the source port, the port identifier of the target port, and the packet label of the (j + 1)-th forward packet; the target node obtains the fourth node label in the fourth target entry of the target node routing table, and sends the (j + 1)-th response packet to the fourth node.

[0112] In an exemplary embodiment, after the fourth node sends the (j + 1)-th forward packet to the fifth node, when the fifth node is an intermediate node, the fifth node is further configured to determine that the refresh flag exists in the (j + 1)-th forward packet; the fifth node determines a sixth node among R - 1 nodes connected to the fifth node through a routing algorithm, where the R - 1 nodes are the nodes among the R nodes connected to the fifth node except the fifth node, and R is an integer greater than 1; the fifth node sends the (j + 1)-th forward packet to the sixth node.

[0113] In an exemplary embodiment, before the source node sends the (j + 1)-th forward packet to the fourth node, the source node is further configured to obtain a (j + 1)-th data packet at the source port; the source node generates a second key field and adds the second key field to the (j + 1)-th data packet to obtain the (j + 1)-th forward packet, where the second key field includes: the port identifier of the source port, the port identifier of the target port, the packet label of the (j + 1)-th forward packet, and the refresh flag.

[0114] In an exemplary embodiment, after the source node sends the (j + 1)-th forward packet to the fourth node, the source node is further configured to modify the latest label of the first target entry to the packet label of the (j + 1)-th forward packet, where the latest label of the first target entry is used to indicate the packet label of the latest forward packet sent by the source node.

[0115] It should be noted that the above-mentioned respective modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited thereto: the above-mentioned modules are all located in the same processor; or, the above-mentioned respective modules are separately located in different processors in any combination form.

[0116] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the steps in any one of the above method embodiments when running.

[0117] In an exemplary embodiment, the above-mentioned computer-readable storage medium may include, but is not limited to: various media that can store computer programs such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), mobile hard disks, magnetic disks, or optical discs.

[0118] An embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0119] In an exemplary embodiment, the above-mentioned electronic device may further include a transmission device and input / output devices. Among them, the transmission device is connected to the above-mentioned processor, and the input / output devices are connected to the above-mentioned processor.

[0120] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.

[0121] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to be implemented. In this way, the present application is not limited to any specific combination of hardware and software.

[0122] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present application shall be included within the protection scope of the present application.

Claims

1. A method for transmitting data packets, characterized in that, Including: When the j-th forward packet sent by the source port is received at the target port through the first transmission path, the target node sends the j-th acknowledgment packet to the source node along the first transmission path, where the source port is mounted on the source node, the target port is mounted on the target node, j is an integer greater than or equal to 1, and there are multiple transmission paths between the source node and the target node; When the source node receives the j-th acknowledgment packet and the packet label in the j-th acknowledgment packet is inconsistent with the latest label under the first target entry in the source node routing table, the source port sends the (j + 1)-th forward packet to the target port through the first transmission path, where the (j + 1)-th forward packet is a data packet sent by the source port to the target port after the j-th forward packet.

2. The method according to claim 1, wherein When the source node receives the j-th acknowledgment packet and the packet label in the j-th acknowledgment packet is inconsistent with the latest label under the first target entry in the source node routing table, the source port sending the (j + 1)-th forward packet to the target port through the first transmission path includes: The source node determines the first target entry in the source node routing table, where the first target entry records the relevant information of the forward packet sent by the source port to the target port; The source node determines that the status field in the first target entry is in the locked state, where the locked state is used to indicate that the source node sends the forward packet to the target port to the next node indicated by the next node field in the first target entry; The source node obtains the first node label from the next node field in the first target entry, where the first node label is the label of the first node among the N nodes connected to the source node, and the source node has sent the j-th forward packet to the first node, and N is an integer greater than 1; The source node sends the (j + 1)-th forward packet to the first node.

3. The method according to claim 2, wherein After the source node sends the (j + 1)-th forward packet to the first node, the method further includes: When the first node is an intermediate node, the first node determines that there is no refresh flag in the (j + 1)-th forward packet; The first node determines the second target entry in the intermediate node routing table, where the second target entry records the relevant information of the forward packet sent by the source port to the target port; The first node obtains the second node label from the next node field of the second target entry, where the second node label is the label of the second node among the M nodes connected to the first node, and the first node has sent the j-th forward packet to the second node, and M is an integer greater than 1; The first node sends the (j + 1)-th forward packet to the second node.

4. The method according to claim 3, wherein After the first node sends the (j + 1)-th forward packet to the second node, the method further includes: When the second node is the target node, the target node sends the (j + 1)-th forward packet to the target port; The target node records the first node label in the previous node field of the third target entry in the target node routing table, where the third target entry records information related to the forward packet sent from the source port to the target port.

5. The method according to claim 4, wherein After the target node records the first node label in the previous node field of the third target entry in the target node routing table, the method further includes: The target node generates the (j + 1)-th response packet, where the (j + 1)-th response packet includes: the port identifier of the source port, the port identifier of the target port, and the (j + 1)-th label of the (j + 1)-th forward packet. The target node obtains the first node label in the third target entry of the target node routing table and sends the (j + 1)-th response packet to the first node.

6. The method according to claim 5, wherein After sending the (j + 1)-th response packet to the first node, the method further includes: The first node obtains the node label of the source node in the previous node field of the second target entry. The first node sends the (j + 1)-th response packet to the source node.

7. The method according to claim 6, characterized in that, After the first node sends the (j + 1)-th response packet to the source node, the method further includes: The source node obtains the (j + 1)-th label of the (j + 1)-th forward packet in the (j + 1)-th response packet. The source node recycles the (j + 1)-th label to the label pool, where the labels recycled to the label pool are allowed to be assigned to other forward packets sent by the source node; or, The source node determines the (j + 1)-th label as the responded label and recycles the labels in the responded packet label counter before the (j + 1)-th label, where the labels in the responded packet label counter are allowed to be assigned to other forward packets sent by the source node.

8. The method according to claim 3, characterized in that, After the first node sends the (j + 1)-th forward packet to the second node, the method further includes: In the case where the second node is an intermediate node, the second node determines that there is no refresh flag in the (j + 1)-th forward packet. The second node determines a fourth target entry in the intermediate node routing table, where the fourth target entry records information related to the forward packet sent from the source port to the target port. The second node obtains the third node label in the next node field of the fourth target entry, where the third node label is the label of the third node among the T nodes connected to the second node, and the second node has sent the j-th forward packet to the third node, and T is an integer greater than 1. The second node sends the (j + 1)-th forward packet to the third node.

9. The method according to claim 2, wherein Before the source node sends the (j + 1)-th forward packet to the first node, the method further includes: The source node obtains the (j + 1)-th data packet at the source port. The source node generates a first key field and adds the first key field to the (j + 1)-th data packet to obtain the (j + 1)-th forward packet, where the first key field includes: the port identifier of the source port, the port identifier of the destination port, and the packet label of the (j + 1)-th forward packet.

10. The method according to claim 9, characterized in that The source node generating the first key field includes: The source node obtains the (j + 1)-th label from the label pool and determines the (j + 1)-th label as the packet label of the (j + 1)-th forward packet; or, The source node increments the value of the sent packet label counter by one to determine the (j + 1)-th label, and determines the (j + 1)-th label as the packet label of the (j + 1)-th forward packet, where the sent packet label counter records the packet labels of the forward packets that the source port has sent to the destination port.

11. The method according to claim 2, wherein After the source node sends the (j + 1)-th forward packet to the first node, the method further includes: The source node modifies the latest label in the first target entry to the packet label of the (j + 1)-th forward packet, where the latest label under the first target entry is used to indicate the packet label of the most recently sent forward packet by the source node.

12. The method according to claim 1, characterized in that The method further includes: When the source node receives the j-th acknowledgment packet and the j-th packet label in the j-th acknowledgment packet is consistent with the latest label in the source node routing table, the source node modifies the lock state in the first target entry of the source node routing table to the free state.

13. The method according to claim 12, wherein After modifying the lock state in the first target entry of the source node routing table to the free state, the method further includes: The source node determines a fourth node among the N nodes connected to the source node through a routing algorithm, where N is an integer greater than 1; The source node sends the (j + 1)-th forward packet to the fourth node.

14. The method according to claim 13, characterized in that, After the source node sends the (j + 1)-th forward packet to the fourth node, the method further includes: The fourth node determines that there is a refresh flag in the (j + 1)-th forward packet; The fourth node determines a fifth node among the S - 1 nodes connected to the fourth node through a routing algorithm, where the S - 1 nodes are the nodes among the S nodes connected to the fourth node excluding the source node, and S is an integer greater than 1; The fourth node sends the (j + 1)-th forward packet to the fifth node.

15. The method according to claim 14, wherein After the fourth node sends the (j + 1)-th forward packet to the fifth node, the method further includes: When the fifth node is the destination node, the destination node sends the (j + 1)-th forward packet to the destination port; The destination node records the fourth node label of the fourth node in the previous node field of the fourth target entry in the destination node routing table, where the fourth target entry records the relevant information of the forward packet sent from the source port to the destination port.

16. The method according to claim 15, characterized in that After the destination node records the fourth node label of the fourth node in the previous node field of the fourth target entry in the destination node routing table, the method further includes: The target node generates the (j + 1)-th response packet, where the (j + 1)-th response packet includes: the port identifier of the source port, the port identifier of the target port, and the packet label of the (j + 1)-th forward packet; The target node obtains the fourth node label in the fourth target entry of the target node routing table, and sends the (j + 1)-th response packet to the fourth node.

17. The method according to claim 14, characterized in that, After the fourth node sends the (j + 1)-th forward packet to the fifth node, the method further includes: When the fifth node is an intermediate node, the fifth node determines that there is a refresh flag in the (j + 1)-th forward packet; The fifth node determines a sixth node among the R - 1 nodes connected to the fifth node through a routing algorithm, where the R - 1 nodes are the nodes other than the fifth node among the R nodes connected to the fifth node, and R is an integer greater than 1; The fifth node sends the (j + 1)-th forward packet to the sixth node.

18. The method according to claim 13, wherein Before the source node sends the (j + 1)-th forward packet to the fourth node, the method further includes: The source node obtains the (j + 1)-th data packet at the source port; The source node generates a second key field and adds the second key field to the (j + 1)-th data packet to obtain the (j + 1)-th forward packet, where the second key field includes: the port identifier of the source port, the port identifier of the target port, the packet label of the (j + 1)-th forward packet, and a refresh flag.

19. The method according to claim 13, wherein After the source node sends the (j + 1)-th forward packet to the fourth node, the method further includes: The source node modifies the latest label of the first target entry to the packet label of the (j + 1)-th forward packet, where the latest label of the first target entry is used to indicate the packet label of the latest forward packet sent by the source node.

20. A flattened fat tree network, characterized in that, including: A target node, configured to, when the target node receives the j-th forward packet sent by the source port through the first transmission path at the target port, the target node sends the j-th response packet to the source node along the first transmission path, where the source port is mounted on the source node, the target port is mounted on the target node, j is an integer greater than or equal to 1, and there are multiple transmission paths between the source node and the target node; A source port, configured to, when the source node receives the j-th response packet and the packet label in the j-th response packet is inconsistent with the latest label under the first target entry in the source node routing table, the source port sends the (j + 1)-th forward packet to the target port through the first transmission path, where the (j + 1)-th forward packet is a data packet sent by the source port to the target port after the j-th forward packet.

21. A computer-readable storage medium, characterized in that A computer program is stored in the computer-readable storage medium, where the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 20.

22. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 20.