Data packet routing method, computer device, storage medium and program product
By setting up a fully connected network in the on-chip network to query the routing status of the previous data packet, the problem of disordered packet order is solved and the correctness of the packet order at the receiving end is achieved.
Patent Information
- Application Number
- CN202411266959.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-09-11
AI Technical Summary
In an on-chip network, random routing of data packets leads to different transmission delays of different data packets, resulting in the problem of disordered packet order at the receiving end.
By setting up a fully connected network in the network, query the routing status of data packets before the packet order. If the previous data packet has not passed through the target routing node, the current packet will be suspended and the previous data packet will be waited for the target routing node to pass through the target routing node. Send again.
Ensure that the order of packets received by the receiving end is consistent with the order of packets, and avoid the disorder of packet order caused by network delay.
Smart Images

Figure CN118802709B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of data transmission, and in particular, relates to a data packet routing method, a computer device, a storage medium and a program. Background Art
[0002] In the traditional technology of on-chip network, the same data is usually split into multiple data packets and then sent to the receiving end one by one according to the arrangement order of the data packets.
[0003] The traditional routing method for data packet transmission is to randomly select a source routing node and the father node closest to the terminal node, first send the data packet to the father node, and then send the data packet from the father node to the target node. However, there may be multiple father nodes between the source node and the terminal node, that is, there is path diversity from the source node to the terminal node. Therefore, different data packets will have different routing paths during the transmission process, and the blocking degree of different routing paths is different, which leads to different transmission delays of different data packets. The order of data packets received by the receiving end is inconsistent with the actual order of data packets, resulting in data disorder errors. Summary of the invention
[0004] The present application provides a data packet routing method, a computer device, a storage medium and a program.
[0005] Some embodiments of the present application provide a method for routing a data packet, the method comprising:
[0006] When there is a first data packet to be sent, querying a routing situation of a second data packet whose corresponding data packet order is before the first data packet, wherein the routing situation is obtained from a fully connected network;
[0007] When the routing condition indicates that the second data packet has not passed through the target routing node, suspending the sending of the first data packet;
[0008] In a case where the routing condition indicates that the second data packet has passed through the target routing node, the first data packet is sent to the next routing node, and the routing condition of the first data packet is sent to the fully connected network.
[0009] Optionally, the method further comprises:
[0010] When there is a first data packet to be sent, determining whether the data packet sequence corresponding to the first data packet is first;
[0011] When the data packet sequence corresponding to the first data packet is first, selecting a routing node from the father nodes connected to the source routing node and the target routing node of the first data packet as the next routing node;
[0012] The first data packet is sent to the target routing node through the next routing node.
[0013] Optionally, selecting a routing node from a father node connected to a source routing node and a target routing node of the first data packet as the next routing node includes:
[0014] Selecting a routing node with the closest path from the father nodes connected to the source routing node and the target routing node of the first data packet as the next routing node;
[0015] Sending the first data packet from the current routing node to the father node;
[0016] After the first data packet reaches the father node, the first data packet is sent from the father node to the target routing node.
[0017] Optionally, sending the first data packet from the current routing node to the father node includes:
[0018] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the father node to obtain a first operation result, and performing a bitwise exclusive OR operation on the node numbers of the source routing node and the current routing node to obtain a second operation result;
[0019] Check the highest valid value bit of the valid value in the second operation result from low to high;
[0020] Search from low to high the target value bit of the first operation result between the lowest value bit and the highest valid value bit to obtain a valid value;
[0021] Invert the values corresponding to the target value bits in the node number of the current routing node from low to high, and obtain a first routing path constituted by the obtained node numbers;
[0022] The first data packet is sent to the father node according to the first routing path.
[0023] Optionally, sending the first data packet from the father node to the target routing node includes:
[0024] Performing a bitwise exclusive OR operation on the node numbers of the father node and the target routing node to obtain a third operation result, and performing a bitwise exclusive OR operation on the node numbers of the current routing node and the target routing node to obtain a fourth operation result;
[0025] Check the highest valid value bit of the valid value in the fourth operation result from high to low;
[0026] Search from high to low the target value bit between the lowest value bit and the highest valid value bit in the third operation result to obtain a valid value;
[0027] Invert the values corresponding to the target value bits in the node number of the current routing node in order from high to low, and obtain a second routing path constituted by the obtained node numbers;
[0028] The first data packet is sent to the target routing node according to the second routing path.
[0029] Optionally, the target routing node includes: a father node;
[0030] After querying the routing status of the second data packet whose data packet order is before the first data packet, the method further includes:
[0031] When the routing situation of the second data packet is queried, determining whether the second data packet reaches the father node;
[0032] When the second data packet has not reached the father node, taking the current routing node where the first data packet is located as the next routing node;
[0033] When the second data packet reaches the father node, the first data packet is sent to the next routing node.
[0034] Optionally, when the second data packet has not reached the father node, taking the current routing node where the first data packet is located as the next routing node includes:
[0035] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the next routing node to obtain a fifth operation result;
[0036] Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits;
[0037] Check the target value bit of the valid value bit in the fifth operation result from low to high to obtain the valid value;
[0038] Invert the values corresponding to the target value bits in the node number of the current routing node in order from low to high, and obtain a third routing path constituted by the obtained node numbers;
[0039] The first data packet is sent to the next routing node according to the third routing path.
[0040] Optionally, when the second data packet reaches the father node, sending the first data packet to the next routing node includes:
[0041] When the second data packet reaches the father node, determining whether the first data packet passes through the father node;
[0042] When the first data packet passes through the father node, routing the first data packet to a lower-layer routing node;
[0043] When the first data packet does not pass through the father node, the first data packet is routed to the father node between the current routing node and the next routing node.
[0044] Optionally, routing the first data packet to a lower-layer routing node includes:
[0045] Performing a bitwise exclusive OR operation on the node numbers of the father node and the next routing node to obtain a sixth operation result;
[0046] Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits;
[0047] Check the target value bit of the valid value bit in the sixth operation result from low to high to obtain the valid value;
[0048] Invert the values corresponding to the target value bits in the node numbers of the source routing nodes in order from high to low, and obtain a fourth routing path constituted by the obtained node numbers;
[0049] The first data packet is sent to the next routing node according to the fourth routing path.
[0050] Optionally, routing the first data packet to an upper-layer routing node includes:
[0051] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the next routing node to obtain a seventh operation result;
[0052] Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits;
[0053] Check the target value bit of the valid value in the seventh operation result from low to high;
[0054] Invert the values corresponding to the target value bits in the node number of the current routing node in order from low to high, and obtain a third routing path constituted by the obtained node numbers;
[0055] The first data packet is sent to the next routing node according to the third routing path.
[0056] Optionally, the method further comprises:
[0057] When there is a first data packet to be sent, determining whether the node numbers of the source routing node and the target routing node of the first data packet are the same;
[0058] When the node numbers of the source routing node and the target routing node are the same, the first data packet is routed internally at the current routing node.
[0059] Optionally, the determining whether the node numbers of the source routing node and the target routing node of the first data packet are the same includes:
[0060] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the target routing node to obtain an eighth operation result;
[0061] When there is no valid value in the eighth operation result, determining that the node numbers of the source routing node and the target routing node are the same;
[0062] When a valid value exists in the eighth operation result, it is determined that the node numbers of the source routing node and the target routing node are different.
[0063] Optionally, after querying the routing status of a second data packet whose data packet order is before the first data packet, the method further includes:
[0064] When the routing information of the second data packet is not found, the sending process of the first data packet is suspended.
[0065] Some embodiments of the present application provide a network system, including: a fat tree network and a fully connected network;
[0066] The nodes in the fat tree network are used to transmit data packets through the data packet routing method and send the routing information of the data packets to the fully connected network;
[0067] The fully connected network is used to send a broadcast message corresponding to the routing situation to the routing nodes in the fat tree network when receiving the routing situation of the data packet.
[0068] Optionally, when any node in the fully connected network receives the routing information of the data packet, the node sends the routing information to other nodes in the fully connected network.
[0069] Optionally, when any node in the fully connected network receives the routing information of the data packet, it sends a broadcast message to the routing node corresponding to the node in the fat tree network.
[0070] Some embodiments of the present application provide a data packet routing device, including:
[0071] A query module, configured to query, when there is a first data packet to be sent, a routing condition of a second data packet whose corresponding data packet sequence is before the first data packet, wherein the routing condition is obtained from a fully connected network;
[0072] A routing module, configured to suspend sending the first data packet when the routing condition indicates that the second data packet has not passed through a target routing node;
[0073] In a case where the routing condition indicates that the second data packet has passed through the target routing node, the first data packet is sent to the next routing node, and the routing condition of the first data packet is sent to the fully connected network.
[0074] Optionally, the routing module is further used to:
[0075] When there is a first data packet to be sent, determining whether the data packet sequence corresponding to the first data packet is first;
[0076] When the data packet sequence corresponding to the first data packet is first, selecting a routing node from the father nodes connected to the source routing node and the target routing node of the first data packet as the next routing node;
[0077] The first data packet is sent to the target routing node through the next routing node.
[0078] Optionally, the routing module is further used to:
[0079] Selecting a routing node with the closest path from the father nodes connected to the source routing node and the target routing node of the first data packet as the next routing node;
[0080] Sending the first data packet from the current routing node to the father node;
[0081] After the first data packet reaches the father node, the first data packet is sent from the father node to the target routing node.
[0082] Optionally, the routing module is further used to:
[0083] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the father node to obtain a first operation result, and performing a bitwise exclusive OR operation on the node numbers of the source routing node and the current routing node to obtain a second operation result;
[0084] Check the highest valid value bit of the valid value in the second operation result from low to high;
[0085] Search from low to high the target value bit of the first operation result between the lowest value bit and the highest valid value bit to obtain a valid value;
[0086] Invert the values corresponding to the target value bits in the node number of the current routing node from low to high, and obtain a first routing path constituted by the obtained node numbers;
[0087] The first data packet is sent to the father node according to the first routing path.
[0088] Optionally, the routing module is further used to:
[0089] Performing a bitwise exclusive OR operation on the node numbers of the father node and the target routing node to obtain a third operation result, and performing a bitwise exclusive OR operation on the node numbers of the current routing node and the target routing node to obtain a fourth operation result;
[0090] Check the highest valid value bit of the valid value in the fourth operation result from high to low;
[0091] Search from high to low the target value bit between the lowest value bit and the highest valid value bit in the third operation result to obtain a valid value;
[0092] Invert the values corresponding to the target value bits in the node number of the current routing node in order from high to low, and obtain a second routing path constituted by the obtained node numbers;
[0093] The first data packet is sent to the target routing node according to the second routing path.
[0094] Optionally, the target routing node includes: a father node;
[0095] The routing module is also used for:
[0096] When the routing situation of the second data packet is queried, determining whether the second data packet reaches the father node;
[0097] When the second data packet has not reached the father node, taking the current routing node where the first data packet is located as the next routing node;
[0098] When the second data packet reaches the father node, the first data packet is sent to the next routing node.
[0099] Optionally, the routing module is further used to:
[0100] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the next routing node to obtain a fifth operation result;
[0101] Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits;
[0102] Check the target value bit of the valid value bit in the fifth operation result from low to high to obtain the valid value;
[0103] Invert the values corresponding to the target value bits in the node number of the current routing node in order from low to high, and obtain a third routing path constituted by the obtained node numbers;
[0104] The first data packet is sent to the next routing node according to the third routing path.
[0105] Optionally, the routing module is further used to:
[0106] When the second data packet reaches the father node, determining whether the first data packet passes through the father node;
[0107] When the first data packet passes through the father node, routing the first data packet to a lower-layer routing node;
[0108] When the first data packet does not pass through the father node, the first data packet is routed to the father node between the current routing node and the next routing node.
[0109] Optionally, the routing module is further used to:
[0110] Performing a bitwise exclusive OR operation on the node numbers of the father node and the next routing node to obtain a sixth operation result;
[0111] Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits;
[0112] Check the target value bit of the valid value bit in the sixth operation result from low to high to obtain the valid value;
[0113] Invert the values corresponding to the target value bits in the node numbers of the source routing nodes in order from high to low, and obtain a fourth routing path constituted by the obtained node numbers;
[0114] The first data packet is sent to the next routing node according to the fourth routing path.
[0115] Optionally, the routing module is further used to:
[0116] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the next routing node to obtain a seventh operation result;
[0117] Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits;
[0118] Check the target value bit of the valid value in the seventh operation result from low to high;
[0119] Invert the values corresponding to the target value bits in the node number of the current routing node in order from low to high, and obtain a third routing path constituted by the obtained node numbers;
[0120] The first data packet is sent to the next routing node according to the third routing path.
[0121] Optionally, the routing module is further used to:
[0122] When there is a first data packet to be sent, determining whether the node numbers of the source routing node and the target routing node of the first data packet are the same;
[0123] When the node numbers of the source routing node and the target routing node are the same, the first data packet is routed internally at the current routing node.
[0124] Optionally, the routing module is further used to:
[0125] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the target routing node to obtain an eighth operation result;
[0126] When there is no valid value in the eighth operation result, determining that the node numbers of the source routing node and the target routing node are the same;
[0127] When a valid value exists in the eighth operation result, it is determined that the node numbers of the source routing node and the target routing node are different.
[0128] Optionally, the routing module is further used to:
[0129] When the routing information of the second data packet is not found, the sending process of the first data packet is suspended.
[0130] Some embodiments of the present application provide a computer device, comprising: a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the data packet routing method as described above.
[0131] Some embodiments of the present application provide a computer-readable storage medium having a computer program / instruction stored thereon, wherein the computer program / instruction, when executed by a processor, implements the steps of the data packet routing method as described above.
[0132] Some embodiments of the present application provide a computer program product, including a computer program / instruction, which implements the steps of the data packet routing method when executed by a processor.
[0133] The data packet routing method, computer device, storage medium and program provided by some embodiments of the present application collect and distribute the routing status of data packets in the network by setting up a fully connected network on the network, so that when a routing node transmits a data packet, it can query the routing status of the data packet that precedes the data packet in the order, so that the data packet in the order before it is sent only after the data packet passes through the target routing node, thereby ensuring that the order in which the data packets are received by the receiving end is consistent with the order in which the data packets are arranged, and avoiding the disorder of the data packet order at the receiving end due to network delay.
[0134] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0135] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0136] Figure 1 A schematic diagram of the structure of a network system provided by some embodiments of the present application is schematically shown;
[0137] Figure 2 The structure diagram of a fat tree network provided in some embodiments of the present application is schematically shown;
[0138] Figure 3 The structure diagram of a fully connected network provided in some embodiments of the present application is schematically shown;
[0139] Figure 4 The structure diagram of a broadcast message provided in some embodiments of the present application is schematically shown;
[0140] Figure 5A schematic diagram of a flow chart of a data packet routing method provided in some embodiments of the present application is schematically shown;
[0141] Figure 6 One of the effect diagrams of a data packet routing method provided by some embodiments of the present application is schematically shown;
[0142] Figure 7 One of the effect diagrams of a data packet routing method provided by some embodiments of the present application is schematically shown;
[0143] Figure 8 One of the effect diagrams of a data packet routing method provided by some embodiments of the present application is schematically shown;
[0144] Fig. 9 One of the effect diagrams of a data packet routing method provided by some embodiments of the present application is schematically shown;
[0145] Fig.10 One of the effect diagrams of a data packet routing method provided by some embodiments of the present application is schematically shown;
[0146] Fig.11 The structure diagram of a data packet routing device provided in some embodiments of the present application is schematically shown;
[0147] Fig.12 A block diagram schematically shows a computer device for executing the method according to some embodiments of the present application;
[0148] Fig.13 A storage unit for holding or carrying program codes for implementing methods according to some embodiments of the present application is schematically shown. DETAILED DESCRIPTION
[0149] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0150] Figure 1 The schematic diagram shows a structure of a network system provided by the present application, including: a fat tree network 10 and a fully connected network 20.
[0151] The fat tree network 10 is used to transmit data packets through the data packet routing method in some embodiments of the present application, and send the routing information of the data packets to the fully connected network.
[0152] The fully connected network 20 is used to send a broadcast message corresponding to the routing situation to the routing nodes in the fat tree network when receiving the routing situation of the data packet.
[0153] Optionally, when any node in the fully connected network 10 receives the routing information of the data packet, the node sends the routing information to other nodes in the fully connected network.
[0154] Optionally, when any node in the fully connected network 20 receives the routing information of the data packet, it sends a broadcast message to the routing node corresponding to the node in the fat tree network.
[0155] It should be noted that a fat tree network refers to a network topology. Compared with the traditional tree network topology in which the bandwidth converges layer by layer, the network bandwidth at the root is much smaller than the sum of all the bandwidths at the leaves. The network bandwidth from the leaves to the roots in the fat tree network is not converged, which is also the basis for the fat tree network architecture to support non-blocking networks.
[0156] For example, refer to Figure 2 ,Assume that there are 32 source routing nodes in the fat tree network, a five-layer network, and 16 routing nodes in each layer of the network. The routing node at the bottom layer is connected to two source routing nodes, where the source routing node is responsible for sending and collecting data packets. Source routing nodes can send data packets to each other, and routing nodes are responsible for forwarding data packets.
[0157] Usually, the traditional shortest path routing algorithm of fat tree network randomly selects the closest father node F between source routing node s and terminal node d, first from s to F, and then from F to d. However, there are multiple father nodes for source routing node s and terminal node d, that is, there is path diversity from source routing node s to terminal node d.
[0158] When a certain starting terminal node initiates multi-packet data transmission to the same target terminal node, due to the path diversity of the topological structure, different packet data may match different routing paths for data routing transmission. Since the blocking degree of each secondary routing node is different, the order in which the data is transmitted to the target terminal node through different secondary routing nodes cannot be controlled. This results in the multi-packet data transmission initiated at the source terminal node being unable to be output from the corresponding target routing node in sequence according to the corresponding starting order, that is, data disorder occurs, resulting in data transmission errors.
[0159] For example, assume that input terminal node 0 sends 3 packets of data to output terminal node 6. The order of these 3 packets of data when input terminal node 0 initiates transmission is packet 1 → packet 2 → packet 3, due to the routing diversity of the topology.
[0160] Data packet 1 may choose the path: input terminal node 0 → first-layer routing node 0 → second-layer routing node 0 → third-layer routing node 2 → second-layer routing node 2 → first-layer routing node 3 → output terminal node 6.
[0161] Data packet 2 may choose the path: input terminal node 0 → first-layer routing node 0 → second-layer routing node 1 → third-layer routing node 3 → second-layer routing node 3 → first-layer routing node 3 → output terminal node 6.
[0162] Data packet 3 may choose the path: input terminal node 0 → first-layer routing node 0 → second-layer routing node 1 → third-layer routing node 1 → second-layer routing node 3 → first-layer routing node 3 → output terminal node 6.
[0163] It can be seen that there are differences in the three path selections of the three data packets. Due to the diversity of data routing paths in the interconnection structure, each routing node will have different routing requests for arbitration. Due to the influence of the arbitration method, the three packets of data will be blocked to varying degrees at the routing nodes, resulting in changes in the order in which the data packets arrive at the target node. The data sent from the starting order of packet 1 → packet 2 → packet 3 arrives at the same target node in the order of packet 2 → packet 3 → packet 1, which will cause data disorder errors at the receiving end.
[0164] The traditional solution to data disorder is to set a buffer at the receiving end and reorder the received data. The problem is that the more paths there are, the larger the buffer is required, and once the buffer is used up but the reordering is not completed, the entire network will be paralyzed. Therefore, this application starts from another perspective, starting from the routing algorithm, and proposes a data packet routing method, adding an N*N fully connected network to transmit broadcast messages. The information contained in the broadcast message is the routing node that each data packet can currently reach. Therefore, the data packet with the first data packet sequence is routed in a random routing manner, and each subsequent data packet needs to query the latest broadcast message before routing, query the position of the data packet before its data packet sequence, and determine the current routing target based on the position of the previous data packet.
[0165] For example, refer to Figure 3 , assuming that the fully connected network is 16*16, each node has a link directly connected to send and receive broadcast messages. In addition, Figure 2Each node i in the network and Figure 2 In the topology network shown, each routing node i in each layer has a link directly connected to it for sending and receiving broadcast messages.
[0166] Among them, refer to Figure 4 , where the return flag (which can be expressed as Return) can be 0 to indicate that the nearest father node has not been reached, and 1 to indicate that the father node has been reached. The node number of the source routing node (which can be expressed as src_id), the node number of the destination routing node (which can be expressed as dst_id), the sequence number of the data packet (which can be expressed as pkg_id), and the level and node number of the next routing node to be sent (which can be expressed as next_id).
[0167] Figure 2 In the topology network shown in the figure, each routing node i sends a broadcast message to other routing nodes while sending data packets to them. Figure 3 The node numbered i in the network, then Figure 3 The node numbered i will send the broadcast message to Figure 3 other nodes in the network.
[0168] Figure 3 After receiving the broadcast message, the intermediate node i will pass the broadcast message through Figure 3 The network shown sends the broadcast message to Figure 3 other nodes in the network.
[0169] Figure 3 After each node i receives the broadcast message, it will synchronize the broadcast message to Figure 2 The routing nodes numbered i are in each layer of the topological network shown.
[0170] The following will describe a data packet routing method provided by some embodiments of the present application in conjunction with the embodiments. Figure 1 The specific process of data transmission in the network system shown.
[0171] Figure 5 A schematic diagram of a flow chart of a data packet routing method provided by the present application is schematically shown, and the method comprises:
[0172] Step 101: when there is a first data packet to be sent, query the routing status of a second data packet whose corresponding data packet sequence is before the first data packet, wherein the routing status is obtained from a fully connected network.
[0173] It should be noted that the execution subject in some embodiments of the present application may be Figure 1Any routing node in the fat tree network shown. The first data packet and the second data packet refer to data packets with a sequence, and the data packet sequence of the second data packet is before the first data packet. It can be understood that usually for data with a large amount of data, the data needs to be split into multiple data packets for transmission to ensure the data transmission efficiency. The data will be split into several data packets with a sequence. The sending end sends several data packets to the receiving end. After receiving all the data packets, the receiving end can splice these data packets according to the data packet sequence to obtain complete data.
[0174] In an embodiment of the present application, when any routing node receives a first data packet sent by other routing nodes or input by a user, it will not forward the first data packet first, but will perform a logical judgment based on the routing status of the second data packet before the first data packet to determine whether the first data packet needs to be sent and how to send it.
[0175] Specifically, the routing node will query the routing status of the second data packet locally. The routing status of the second data packet is obtained in advance from the fully connected network, and the routing status in the fully connected network is provided to the fully connected network by any routing node after sending any data packet. In other words, after sending a data packet, each routing node will send the routing status of the data packet such as the source routing node, the target routing node, the current routing node, and the next routing node to be sent to to the connected network, and then the fully connected network will send the routing status to each routing node in the fat tree network in the form of a broadcast message, so that the routing node can query the routing status of each data packet.
[0176] Step 102: When the routing condition indicates that the second data packet does not pass through the target routing node, suspend sending the first data packet.
[0177] In the embodiment of the present application, the target routing node refers to a routing node having a routing progress mark feature. The target routing node may be the previous routing node of the target routing node, or the next routing node of the source routing node, and of course, it may also be any routing node between the source routing node and the target routing node. It is worth noting that the target routing node may be a routing node that both the first data packet and the second data packet need to pass through, or it may not be a routing node that both the first data packet and the second data packet need to pass through. The target routing node can be specifically set according to actual needs as long as it can represent the routing progress of the first data packet and the second data packet to reach the target routing node, and is not limited here.
[0178] Specifically, when the second data packet before the first data packet has not passed the target routing node, the first data packet is sent. The transmission delay of the first data packet may be smaller than that of the second data packet, causing the first data packet to reach the target routing node before the second data packet. This will cause the data packets in the receiving end to be disordered in order. Therefore, if the second data packet has not passed the target routing node, the sending of the first data packet is suspended, and the first data packet is sent again after the second data packet has passed the target routing node. This can ensure that the first data packet can reach the target routing node after the second data packet, thereby ensuring that the order in which the data packets are received by the receiving end is consistent with the order in which the data packets are sorted.
[0179] Step 103: When the routing condition indicates that the second data packet has passed through the target routing node, the first data packet is sent to the next routing node, and the routing condition of the first data packet is sent to the fully connected network.
[0180] In an embodiment of the present application, if the second data packet has passed through the target routing node, it can be determined that the routing progress of the first data packet is slower than that of the second data packet. If the first data packet is sent at this time, it can be ensured that the first data packet reaches the target routing node after the second data packet, thereby ensuring that the order in which the data packets are received by the receiving end is consistent with the sorting order of the data packets. At this time, the first data packet can be sent to the next routing node to route the first data packet to the target routing node. Furthermore, after sending the first data packet, the routing node will send the routing status of the first data packet to the fully connected network, so that the fully connected network sends the routing status of the first data packet to other routing nodes in the fat tree network in the form of a broadcast message, so that other routing nodes in the fat tree network can update the routing status of the first data packet.
[0181] The embodiment of the present application collects and distributes the routing status of data packets in the network by setting up a fully connected network on the network, so that when a routing node transmits a data packet, it can query the routing status of the data packet that is located before the data packet in the order, so that the data packet in the order before it is sent only after it passes through the target routing node, thereby ensuring that the order in which the data packets are received by the receiving end is consistent with the arrangement order of the data packets, and avoiding the disorder of the data packet order at the receiving end due to network delay.
[0182] Optionally, the method further comprises:
[0183] Step 201: When there is a first data packet to be sent, determine whether the data packet sequence corresponding to the first data packet is the first.
[0184] Step 202: When the data packet sequence corresponding to the first data packet is first, a routing node is selected from the father nodes connected to the source routing node and the target routing node of the first data packet as the next routing node.
[0185] Step 203: Send the first data packet to the target routing node through the next routing node.
[0186] In an embodiment of the present application, when receiving the first data packet, the routing node will query the routing status of the first data packet locally, that is, receive a broadcast message about the first data packet from the connected network, and then extract the data packet number of the first data packet therefrom, and determine the data packet order of the first data packet based on the data packet number. If the data packet order of the first data packet is the first, there will be no second data packet before it. Therefore, there will be no hidden danger of the routing progress of the first data packet being too fast, resulting in a disordered order of the data packets received by the receiving end. At this time, a father node can be directly selected from the set of father nodes between the source routing node and the target routing node of the first data packet to send the first data packet.
[0187] The embodiment of the present application ensures the efficiency of data packet routing by directly sending the first data packet when the first data packet is the first data packet.
[0188] Optionally, the step 203 includes:
[0189] Step 2031: Select a routing node with the shortest path from the father nodes connected to the source routing node and the target routing node of the first data packet as the next routing node.
[0190] Step 2032: Send the first data packet from the current routing node to the father node.
[0191] Step 2033: After the first data packet reaches the father node, the first data packet is sent from the father node to the target routing node.
[0192] In the embodiment of the present application, in order to ensure the routing efficiency of the first data packet, the father node with the closest routing path can be selected as the next routing node from the father nodes connected to the source routing node and the target routing node of the first data packet. First, the first data packet needs to be routed to the father node, and then the first data packet is routed from the father node to the target routing node.
[0193] The embodiment of the present application ensures the efficiency of data packet routing by directly sending the first data packet when the first data packet is the first data packet.
[0194] Optionally, the step 2032 includes:
[0195] Step 20321, performing a bitwise XOR operation on the node numbers of the source routing node and the father node to obtain a first operation result, and performing a bitwise XOR operation on the node numbers of the source routing node and the current routing node to obtain a second operation result.
[0196] Step 20322, check the highest valid value bit of the valid value in the second operation result from low to high.
[0197] Step 20323, check the target value bit with a valid value between the lowest value bit and the highest valid value bit in the first operation result from low to high.
[0198] Step 20324, invert the values corresponding to the target value bits in the node number of the current routing node in order from low to high, and obtain the first routing path constituted by the obtained node numbers.
[0199] Step 20325: Send the first data packet to the father node according to the first routing path.
[0200] In an embodiment of the present application, assuming that the node number of the source routing node of the first data packet is S, the node number of the target routing node is D, and the set of father nodes between the source routing node S and the target routing node D is {F}, then a father node F can be randomly selected from {F} to send the first data packet.
[0201] In the first step, the node numbers of the source routing node S and the father node F can be bitwise XORed to obtain the first operation result I, and then the node numbers of the source routing node S and the target routing node D can be bitwise XORed to obtain the second operation result ;
[0202] Step 2: Query the second operation result from low to high The most significant bit of the valid value "1" is assumed to be at bit k, then the k bits from low to high in the first operation result I are valid bits, and the remaining value bits are invalid bits and are not considered;
[0203] In the third step, for the valid bits in the first operation result I, in order from low to high, refer to the target value bits in I that take the valid value "1", and invert the values corresponding to the source routing address S in turn to obtain the routing nodes for upward routing. In this process, if a bit that takes the invalid value "0" is encountered, it will jump upward directly until all the target value bits in the first operation result I are traversed, and the first routing path for sending the first data packet from the current routing node D to the father node F can be obtained.
[0204] Furthermore, for ease of understanding, the above algorithm will be explained below through examples:
[0205] Assume that the node number of the source routing node S is 0001, and the node number of the target routing node D is 0111. Select the father node F closest to S and D in the fourth layer, and select the routing node with the node number 0100 in the fourth layer as the father node.
[0206] In the first step, the node numbers of the source routing node S and the father node F are XORed bit by bit to obtain the first operation result I which is 0101; the node numbers of the source routing node S and the current routing node D are XORed bit by bit to obtain the second operation result, which is recorded as
[0207] Step 2: View from low to high The most significant bit of the most significant value "1" is at the 3rd bit, so the 3 bits from low to high in the first operation result I are valid bits, and the remaining bits are invalid bits and are not considered; that is, the valid bits of I are the lower three bits, _101;
[0208] The third step is upward routing: for the valid bits in the first operation result I, starting from the low bit, based on the target value bit of the valid value "1" in I, the value of the corresponding target value bit in S is inverted to obtain the node number of the routing node for the upper layer routing. For the position where "0" is encountered, it can be directly jumped to the upper layer; until all the valid bits in the first operation result I are traversed, the father node is reached. , refer to Figure 6 , the first routing path obtained is as follows:
[0209] First-layer routing node 0001 (I: _101) -> second-layer routing node 0000 (I: _10_) -> third-layer routing node 0000 (I: _1__) -> fourth-layer routing node 0100 (I: ____).
[0210] Of course, the above is only an exemplary description and can be set according to actual needs, which is not limited here.
[0211] Optionally, the step 2033 includes:
[0212] Step 20331, performing a bitwise XOR operation on the node numbers of the father node and the target routing node to obtain a third operation result, and performing a bitwise XOR operation on the node numbers of the current routing node and the target routing node to obtain a fourth operation result.
[0213] Step 20332, check the highest valid value bit of the valid value in the fourth operation result from high to low.
[0214] Step 20333, check the target value bit with a valid value between the lowest value bit and the highest valid value bit in the third operation result from high to low.
[0215] Step 20334, invert the values corresponding to the target value bits in the node number of the current routing node from high to low, and obtain a second routing path constituted by the obtained node numbers.
[0216] Step 20335: Send the first data packet to the target routing node according to the second routing path.
[0217] In an embodiment of the present application, assuming that the node number of the source routing node of the first data packet is S, the node number of the target routing node is D, and the set of father nodes between the source routing node S and the target routing node is {F}, then a father node F can be randomly selected from {F} to send the first data packet.
[0218] In the first step, the node numbers of the target routing node D and the father node F can be bitwise XORed to obtain the third operation result I, and then the node numbers of the source routing node S and the target routing node D can be bitwise XORed to obtain the fourth operation result ;
[0219] Step 2: Query the fourth operation result from high to low The most significant bit of the valid value "1" is assumed to be at bit k, then the k bits from low to high in the third operation result I are valid bits, and the remaining value bits are invalid bits and are not considered;
[0220] In the third step, for the valid bits in the third operation result I, in descending order, with reference to the target value bits in I that take the valid value "1", the values corresponding to the node number S of the source routing node are inverted in turn to obtain the node number of the routing node in the next layer. In this process, if a bit with an invalid value "0" is encountered, it is possible to jump directly to the next layer until all the target value bits in the third operation result I are traversed, and the second routing path for sending the father node F of the first data packet to the target routing node is obtained.
[0221] Furthermore, for ease of understanding, the above algorithm will be explained below through examples:
[0222] Assume that the node number of the source routing node S is 0001, and the node number of the target routing node D is 0111. Select the father node F closest to S and D in the fourth layer, and select the routing node with the node number 0100 in the fourth layer as the father node.
[0223] In the first step, the node numbers of the target routing node D and the father node F are XORed bit by bit to obtain the third operation result I which is 0011; the node numbers of the source routing node S and the target routing node D are XORed bit by bit to obtain the fourth operation result, which is recorded as
[0224] Step 2: View from low to high The most significant bit of the most significant value "1" is at the 3rd bit, so the 3 bits from low to high in the first operation result I are valid bits, and the remaining bits are invalid bits and are not considered; that is, the valid bits of I are the lower three bits, _101;
[0225] Step 3: Routing downward: For the valid bits in the third operation result I, starting from the high bit, based on the target value bit of the valid value "1" in I, the value of the corresponding target value bit in S is inverted to obtain the node number of the routing node to the next layer. If a "0" is encountered, it can be directly jumped to the next layer; until all the valid bits in the first operation result I are traversed and the target routing node D is reached, refer to Figure 7 , the first routing path obtained is as follows:
[0226] Fourth-layer routing node 0100 (I: _011) -> third-layer routing node 0100 (I: __11) -> second-layer routing node 0110 (I: ___1) -> first-layer routing node 0111 (I: ____).
[0227] Of course, the above is only an exemplary description and can be set according to actual needs, which is not limited here.
[0228] Optionally, the target routing node includes: a father node. After step 101, the method further includes:
[0229] Step 301: when the routing status of the second data packet is queried, it is determined whether the second data packet reaches the father node.
[0230] Step 302: When the second data packet has not reached the father node, the current routing node where the first data packet is located is used as the next routing node.
[0231] Step 303: When the second data packet reaches the father node, the first data packet is sent to the next routing node.
[0232] In the embodiment of the present application, considering that the father node is the intermediate node that the data packet needs to reach during the routing process, the father node is used as the intermediate node to measure the routing progress of the data packet, which can obviously reflect the routing progress of the data packet.
[0233] Specifically, after the routing node inquires about the routing situation of the second data packet, it will query the turnaround flag of the broadcast message corresponding to the routing situation. If the turnaround flag is "0", it means that the second data packet has not reached the father node. If the turnaround flag is "1", it means that the second data packet has reached the father node. If the second data packet has not reached the father node, if the second data packet is sent to the father node at this time, it may cause the first data packet to reach the target routing node before the second data packet, causing the receiving end to receive data packets out of order. Therefore, at this time, the current routing node of the first data packet can be used as the next routing node, so that the first data packet is routed inside the current routing node, waiting for the second data packet to reach the father node. If the second data packet has reached the father node, the first data packet can be sent to the father node.
[0234] The embodiment of the present application determines whether to send the first data packet based on whether the second data packet reaches the father node, thereby ensuring that the first data packet can reach the receiving end after the second data packet, so that the order in which the data packets are received by the receiving end can be consistent with the order of the data packets.
[0235] Optionally, the step 302 includes:
[0236] Step 3021, performing a bitwise exclusive OR operation on the node numbers of the source routing node and the next routing node to obtain a fifth operation result.
[0237] Step 3022: Take the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits.
[0238] Step 3023, checking the target value bits of the valid value bits in the fifth operation result from low to high to obtain the valid value.
[0239] Step 3024: invert the values corresponding to the target value bits in the node number of the current routing node in order from low to high, and obtain a third routing path constituted by the obtained node numbers.
[0240] Step 3025: Send the first data packet to the next routing node according to the third routing path.
[0241] In the embodiment of the present application, it is assumed that the node number of the current routing node of the first data packet is , the node number of the target routing node is D, the node number of the designated next routing node is L, and the first data packet is sent.
[0242] In the first step, the node numbers of the source routing node S and the next routing node L can be subjected to a bitwise XOR operation to obtain a fifth operation result I, and the current routing node and the next routing node L respectively at and layer;
[0243] The second step is to convert the fifth operation result I from low to high The bits up to l-1 are valid value bits, and the remaining value bits are invalid bits and are not considered;
[0244] Step 3: For the valid bits in the fifth operation result I, in order from low to high, refer to the target value bit in I that takes the valid value "1", and change the node number of the current routing node to The corresponding numerical values are inverted in turn to obtain the node number of the upward routing node. If a bit with an invalid value of "0" is encountered in this process, it can jump upward directly until all the target value bits in the fifth operation result I are traversed, and the third routing path to the specified layer routing node L can be obtained.
[0245] Furthermore, for ease of understanding, the above algorithm will be explained below through examples:
[0246] In an example of an embodiment of the present application, it is assumed that the node number S of the source routing node is 0001, and the node number of the current routing node where the data packet is located is The node number D of the target routing node is 0111, and the node number of the fourth layer is 0100 as the next routing node L. Routing upward to the specified layer routing node routing algorithm is explained:
[0247] Step 1: The source routing node S and the next routing node L are bit-wise XORed and recorded as the fifth operation result I=0101; and L are on the 2nd and 4th floors respectively;
[0248] Step 2: The 2nd to 3rd bits from the lowest to the highest in the fifth operation result I are valid bits, and the remaining bits are invalid bits and are not considered, I=_10_;
[0249] Step 3: Routing upward: The valid bits in the fifth operation result I are traversed from the low bit. The bit corresponding to the source routing node S is inverted at the position of the valid value "1" in the fifth operation result I to obtain the node number of the routing node for upward routing. The position of "0" can be directly jumped upward; until all the valid bits in the fifth operation result I are traversed and the next routing node L of the specified layer is reached, refer to Figure 8 , the first routing path obtained is as follows:
[0250] Second-layer routing node 0000 (I: _10_) -> third-layer routing node 0000 (I: _1__) -> fourth-layer routing node 0100 (I: ____).
[0251] In another example of the embodiment of the present application, it is assumed that the node number S of the source routing node is 0001, the node number D of the target routing node is 0111, and the node number of the current routing node where the data packet is located is For S, select 0000 on the third layer as the next routing node L.
[0252] Step 1: The source routing node S and the next routing node L are bit-wise XORed and recorded as the fifth operation result I=0001; and L are on the 1st and 3rd floors respectively;
[0253] Step 2: The 1st to 2nd bits from the lowest to the highest in the fifth operation result I are valid bits, and the remaining bits are invalid bits and are not considered, I=__01;
[0254] Step 3: Upward routing: The valid bits in the fifth operation result I are inverted from the low bit, and the bit corresponding to the source routing node S is inverted at the position of the valid value "1" in the fifth operation result I to obtain the node number of the routing node for upward routing. The position of "0" can be directly jumped upward; until all the valid bits in the fifth operation result I are traversed and the next routing node L of the specified layer is reached, the first routing path obtained is as follows:
[0255] First-layer routing node 0001 (I: __01) -> second-layer routing node 0000 (I: __0_) -> third-layer routing node 0000 (I: ____).
[0256] Of course, the above is only an exemplary description and can be set according to actual needs, which is not limited here.
[0257] Optionally, the step 303 includes:
[0258] Step 3031: When the second data packet reaches the father node, determine whether the first data packet passes through the father node.
[0259] Step 3032: When the first data packet passes through the father node, the first data packet is routed to a lower-layer routing node.
[0260] Step 3033: When the first data packet has not passed through the father node, the first data packet is routed to the father node between the current routing node and the next routing node.
[0261] In an embodiment of the present application, the second data packet may not be sent out from the father node after reaching the father node. Therefore, after determining that the second data packet has reached the father node, it is also necessary to determine whether the second data packet has passed through the father node, that is, whether it has been sent from the father node. There are different routing strategies for the first data packet for different situations.
[0262] Specifically, when the first data packet arrives at the father node and has passed through the father node, the first data packet is routed to the next routing node. If the first data packet reaches the father node and has passed through the father node, a father node between the current routing node where the first data packet is located and the next routing node is randomly selected, and the first data packet is routed to the father node.
[0263] Optionally, the step 3032 includes:
[0264] Step 30321, performing a bitwise XOR operation on the node numbers of the father node and the next routing node to obtain a sixth operation result.
[0265] Step 30322: Take the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits.
[0266] Step 30323, check the target value bits of the valid value bits in the sixth operation result from low to high to obtain the valid value.
[0267] Step 30324, invert the values corresponding to the target value bits in the node numbers of the source routing nodes in order from high to low, and obtain a fourth routing path constituted by the obtained node numbers.
[0268] Step 30325: Send the first data packet to the next routing node according to the fourth routing path.
[0269] In the embodiment of the present application, it is assumed that the node number of the current routing node of the first data packet is , the node number of the target routing node is D, the node number of the designated next routing node is L, and the first data packet is sent.
[0270] In the first step, the node numbers of the father node F and the next routing node L can be bitwise XORed to obtain the sixth operation result I, the current routing node and the next routing node L respectively at and layer;
[0271] The second step is to convert the sixth operation result I from low to high 1 bits to -1 is used as a valid value bit, and the remaining value bits are invalid bits and are not considered;
[0272] In the third step, for the valid bits in the sixth operation result I, in descending order, with reference to the target value bits in the sixth operation result I that take the valid value "1", the values corresponding to the node number S of the source routing node are inverted in turn to obtain the node number of the routing node of the next layer. In this process, if a bit that takes the invalid value "0" is encountered, it is possible to jump directly to the next layer until all the target value bits in the sixth operation result I are traversed, and the fourth routing path to the routing node L of the specified layer can be obtained.
[0273] Furthermore, for ease of understanding, the above algorithm will be explained below through examples:
[0274] In an example of an embodiment of the present application, assuming that the node number S of the source routing node is 0001 and the node number D of the target routing node is 0111, the parent node closest to S and D is selected at the fourth layer, and 0100 at the third layer is selected as , select 0110 of the second layer as the next routing node L.
[0275] Step 1: The father node F (0100) and the next routing node L (0110) are bitwise XORed and recorded as the sixth operation result I=0010; and L are on the 3rd and 2nd floors respectively;
[0276] Step 2: The 2nd to 2nd bits from the lowest to the highest in the sixth operation result I are valid bits, and the remaining bits are invalid bits and are not considered, and are recorded as __1_;
[0277] Step 3: Downward routing: The valid bits in the sixth operation result I are traversed from the high bit. The bit corresponding to the source routing node S is inverted at the position of the valid value "1" in the sixth operation result I to obtain the node number of the routing node to the next layer. The position of "0" can directly jump to the next layer; until all the valid bits in the sixth operation result I are traversed and the target routing node D is reached, refer to Fig. 9 , the fourth routing path obtained is as follows:
[0278] Third-layer routing node 0100 (I: __1_) -> second-layer routing node 0110 (I: ____).
[0279] In another example of the embodiment of the present application, assuming that the node number S of the source routing node is 0001, the node number D of the target routing node is 0111, the father node F closest to S and D is selected at the fourth layer, and 0100 at the third layer is selected as the current routing node , 0110 of the second layer specifies the routing node L of the next layer.
[0280] Step 1: The father node F (0100) and the next routing node L (0110) are bitwise XORed, and the sixth operation result I is 0010; and L are on the 3rd and 2nd floors respectively;
[0281] Step 2: The 2 to 2 bits from the lowest to the highest in the sixth operation result I are valid bits, and the remaining bits are invalid bits and are not considered; that is, the valid bits of I are, __1_;
[0282] Step 3: Downward routing: The valid bits in the sixth operation result I are traversed from the high bit. The position of "1" in the sixth operation result I inverts the bit corresponding to the source routing node S to obtain the routing node for the next layer of routing. The position of "0" can directly jump to the next layer; until all the valid bits in I are traversed, refer to Fig.10 , the fourth routing path obtained to reach the target routing node D is as follows:
[0283] Fourth-layer routing node 0100 (I: _01_) -> third-layer routing node 0100 (I: __1_) -> second-layer routing node 0110 (I: ____).
[0284] Optionally, the step 3033 includes:
[0285] Step 30331, performing a bitwise exclusive OR operation on the node numbers of the source routing node and the next routing node to obtain a seventh operation result.
[0286] Step 30332: Take the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits.
[0287] Step 30333, check the target value bits of the valid value bits in the seventh operation result from low to high to obtain the valid value.
[0288] Step 30334, invert the values corresponding to the target value bits in the node number of the current routing node from low to high, and obtain a third routing path constituted by the obtained node numbers.
[0289] Step 30335: Send the first data packet to the next routing node according to the third routing path.
[0290] The detailed description of steps 30331 to 30335 is similar to that of steps 3021 to 3025 and is not repeated here.
[0291] Optionally, the method further comprises:
[0292] Step 401: When there is a first data packet to be sent, determine whether the node numbers of the source routing node and the target routing node of the first data packet are the same.
[0293] Step 402: When the node numbers of the source routing node and the target routing node are the same, the first data packet is routed internally in the current routing node.
[0294] In an embodiment of the present application, if the node numbers of the source routing node and the target routing node of the first data packet are the same, it proves that the source routing node and the target routing node are the same routing node, and routing can be performed at the current routing node content.
[0295] Optionally, the step 401 includes:
[0296] Step 401, performing a bitwise exclusive OR operation on the node numbers of the source routing node and the target routing node to obtain an eighth operation result.
[0297] Step 402: When there is no valid value in the eighth operation result, determine that the node numbers of the source routing node and the target routing node are the same.
[0298] Step 403: When a valid value exists in the eighth operation result, it is determined that the node numbers of the source routing node and the target routing node are different.
[0299] In an embodiment of the present application, the node numbers of the source routing node and the target routing node can be subjected to a bitwise XOR operation. Since the calculation result of the same numerical value during the XOR calculation is 0, and the calculation result of different data is 1, if the values of the eighth operation results obtained are all invalid values 0, or there is no valid value 1, it means that the node numbers of the source routing node and the target routing node are the same. Conversely, if there is a valid value 1 in the eighth operation result, it means that the source routing node and the target routing node are different, and the subsequent steps can be continued.
[0300] Optionally, after step 101, the method further includes: when the routing status of the second data packet is not queried, suspending the sending process of the first data packet.
[0301] In an embodiment of the present application, if the routing node fails to query the routing status of the second data packet, it means that the second data packet has not yet been sent. In order to send the first data to the receiving end before the second data packet, the sending process of the first data packet can be paused, and wait for the routing status of the second data packet to be obtained from the fully connected network.
[0302] Fig.11 The structure diagram of a data packet routing device 50 provided by the present application is schematically shown, and the device includes:
[0303] A query module 501 is used to query the routing status of a second data packet whose corresponding data packet order is before the first data packet when there is a first data packet to be sent, wherein the routing status is obtained from a fully connected network;
[0304] The routing module 502 is configured to suspend sending the first data packet when the routing condition indicates that the second data packet has not passed through the target routing node;
[0305] In a case where the routing condition indicates that the second data packet has passed through the target routing node, the first data packet is sent to the next routing node, and the routing condition of the first data packet is sent to the fully connected network.
[0306] Optionally, the routing module 502 is further configured to:
[0307] When there is a first data packet to be sent, determining whether the data packet sequence corresponding to the first data packet is first;
[0308] When the data packet sequence corresponding to the first data packet is first, selecting a routing node from the father nodes connected to the source routing node and the target routing node of the first data packet as the next routing node;
[0309] The first data packet is sent to the target routing node through the next routing node.
[0310] Optionally, the routing module 502 is further configured to:
[0311] Selecting a routing node with the closest path from the father nodes connected to the source routing node and the target routing node of the first data packet as the next routing node;
[0312] Sending the first data packet from the current routing node to the father node;
[0313] After the first data packet reaches the father node, the first data packet is sent from the father node to the target routing node.
[0314] Optionally, the routing module 502 is further configured to:
[0315] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the father node to obtain a first operation result, and performing a bitwise exclusive OR operation on the node numbers of the source routing node and the current routing node to obtain a second operation result;
[0316] Check the highest valid value bit of the valid value in the second operation result from low to high;
[0317] Search from low to high the target value bit of the first operation result between the lowest value bit and the highest valid value bit to obtain a valid value;
[0318] Invert the values corresponding to the target value bits in the node number of the current routing node from low to high, and obtain a first routing path constituted by the obtained node numbers;
[0319] The first data packet is sent to the father node according to the first routing path.
[0320] Optionally, the routing module 502 is further configured to:
[0321] Performing a bitwise exclusive OR operation on the node numbers of the father node and the target routing node to obtain a third operation result, and performing a bitwise exclusive OR operation on the node numbers of the current routing node and the target routing node to obtain a fourth operation result;
[0322] Check the highest valid value bit of the valid value in the fourth operation result from high to low;
[0323] Search from high to low the target value bit between the lowest value bit and the highest valid value bit in the third operation result to obtain a valid value;
[0324] Invert the values corresponding to the target value bits in the node number of the current routing node in order from high to low, and obtain a second routing path constituted by the obtained node numbers;
[0325] The first data packet is sent to the target routing node according to the second routing path.
[0326] Optionally, the target routing node includes: a father node;
[0327] The routing module 502 is further used for:
[0328] When the routing situation of the second data packet is queried, determining whether the second data packet reaches the father node;
[0329] When the second data packet has not reached the father node, taking the current routing node where the first data packet is located as the next routing node;
[0330] When the second data packet reaches the father node, the first data packet is sent to the next routing node.
[0331] Optionally, the routing module 502 is further configured to:
[0332] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the next routing node to obtain a fifth operation result;
[0333] Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits;
[0334] Check the target value bit of the valid value bit in the fifth operation result from low to high to obtain the valid value;
[0335] Invert the values corresponding to the target value bits in the node number of the current routing node in order from low to high, and obtain a third routing path constituted by the obtained node numbers;
[0336] The first data packet is sent to the next routing node according to the third routing path.
[0337] Optionally, the routing module 502 is further configured to:
[0338] When the second data packet reaches the father node, determining whether the first data packet passes through the father node;
[0339] When the first data packet passes through the father node, routing the first data packet to a lower-layer routing node;
[0340] When the first data packet does not pass through the father node, the first data packet is routed to the father node between the current routing node and the next routing node.
[0341] Optionally, the routing module 502 is further configured to:
[0342] Performing a bitwise exclusive OR operation on the node numbers of the father node and the next routing node to obtain a sixth operation result;
[0343] Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits;
[0344] Check the target value bit of the valid value bit in the sixth operation result from low to high to obtain the valid value;
[0345] Invert the values corresponding to the target value bits in the node numbers of the source routing nodes in order from high to low, and obtain a fourth routing path constituted by the obtained node numbers;
[0346] The first data packet is sent to the next routing node according to the fourth routing path.
[0347] Optionally, the routing module 502 is further configured to:
[0348] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the next routing node to obtain a seventh operation result;
[0349] Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits;
[0350] Check the target value bit of the valid value in the seventh operation result from low to high;
[0351] Invert the values corresponding to the target value bits in the node number of the current routing node in order from low to high, and obtain a third routing path constituted by the obtained node numbers;
[0352] The first data packet is sent to the next routing node according to the third routing path.
[0353] Optionally, the routing module 502 is further configured to:
[0354] When there is a first data packet to be sent, determining whether the node numbers of the source routing node and the target routing node of the first data packet are the same;
[0355] When the node numbers of the source routing node and the target routing node are the same, the first data packet is routed internally at the current routing node.
[0356] Optionally, the routing module 502 is further configured to:
[0357] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the target routing node to obtain an eighth operation result;
[0358] When there is no valid value in the eighth operation result, determining that the node numbers of the source routing node and the target routing node are the same;
[0359] When a valid value exists in the eighth operation result, it is determined that the node numbers of the source routing node and the target routing node are different.
[0360] Optionally, the routing module 502 is further configured to:
[0361] When the routing information of the second data packet is not found, the sending process of the first data packet is suspended.
[0362] The embodiment of the present application collects and distributes the routing status of data packets in the network by setting up a fully connected network on the network, so that when a routing node transmits a data packet, it can query the routing status of the data packet that is located before the data packet in the order, so that the data packet in the order before it is sent only after it passes through the target routing node, thereby ensuring that the order in which the data packets are received by the receiving end is consistent with the arrangement order of the data packets, and avoiding the disorder of the data packet order at the receiving end due to network delay.
[0363] The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components of a computer device according to an embodiment of the present application. The present application may also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present application may be stored on a non-transient computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0364] For example, Fig.12 A computer device that can implement the method according to the present application is shown. The computer device conventionally includes a processor 610 and a computer program product or a non-transitory computer-readable medium in the form of a memory 620. The memory 620 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 620 has a storage space 630 for program code, i.e., code 631, for executing any method step in the above method. For example, the storage space 630 for program code may include individual codes 631 for implementing various steps in the above method, respectively. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is usually as shown in reference Fig.13 The portable or fixed storage unit. The storage unit may have Fig.12The memory 620 in the computer device of the computer device is similarly arranged as a storage segment, storage space, etc. The program code can be compressed, for example, in an appropriate form. Generally, the storage unit includes computer readable code, i.e., code 631, that is, code that can be read by a processor such as 610, which, when executed by the computer device, causes the computer device to perform the various steps in the method described above.
[0365] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0366] The term "one embodiment", "embodiment" or "one or more embodiments" herein means that a particular feature, structure or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. In addition, please note that the examples of the term "in one embodiment" here do not necessarily all refer to the same embodiment.
[0367] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0368] In the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0369] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for routing a data packet, characterized in that: include: When there is a first data packet to be sent, query the routing situation of a second data packet whose corresponding data packet order is before the first data packet, wherein the routing situation is obtained from a fully connected network; the routing situation in the fully connected network includes the routing situation of any second data packet sent by any routing node; the routing situation of each second data packet includes a source routing node, a target routing node, a current routing node, and a next routing node to be sent to; When the routing condition indicates that a second data packet preceding the first data packet has not passed through the target routing node, suspending the sending of the first data packet; When the routing condition indicates that a second data packet preceding the first data packet has passed through a target routing node, the first data packet is sent to a next routing node, and the routing condition of the first data packet is sent to a fully connected network; The method further comprises: When there is a first data packet to be sent, determining whether the data packet sequence corresponding to the first data packet is first; When the data packet sequence corresponding to the first data packet is first, selecting a routing node from the father nodes connected to the source routing node and the target routing node of the first data packet as the next routing node; Sending the first data packet to the target routing node through the next routing node; The target routing node includes: a father node; after the query corresponds to the routing condition of a second data packet whose order of data packet is before the first data packet, the method further includes: When the routing situation of the second data packet is queried, determining whether the second data packet reaches the father node; When the second data packet has not reached the father node, taking the current routing node where the first data packet is located as the next routing node; When the second data packet reaches the father node, the first data packet is sent to the next routing node.
2. The method according to claim 1, characterized in that: The selecting a routing node from the father node connected to the source routing node and the target routing node of the first data packet as the next routing node comprises: Selecting a routing node with the closest path from the father nodes connected to the source routing node and the target routing node of the first data packet as the next routing node; Sending the first data packet from the current routing node to the father node; After the first data packet reaches the father node, the first data packet is sent from the father node to the target routing node.
3. The method according to claim 2, characterized in that The sending the first data packet from the current routing node to the father node includes: Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the father node to obtain a first operation result, and performing a bitwise exclusive OR operation on the node numbers of the source routing node and the current routing node to obtain a second operation result; Check the highest valid value bit of the valid value in the second operation result from low to high; Search from low to high the target value bit of the first operation result between the lowest value bit and the highest valid value bit to obtain a valid value; Invert the values corresponding to the target value bits in the node number of the current routing node from low to high, and obtain a first routing path constituted by the obtained node numbers; The first data packet is sent to the father node according to the first routing path.
4. The method according to claim 2, characterized in that: The sending the first data packet from the father node to the target routing node comprises: Performing a bitwise exclusive OR operation on the node numbers of the father node and the target routing node to obtain a third operation result, and performing a bitwise exclusive OR operation on the node numbers of the current routing node and the target routing node to obtain a fourth operation result; Check the highest valid value bit of the valid value in the fourth operation result from high to low; Search from high to low the target value bit between the lowest value bit and the highest valid value bit in the third operation result to obtain a valid value; Invert the values corresponding to the target value bits in the node number of the current routing node in order from high to low, and obtain a second routing path constituted by the obtained node numbers; The first data packet is sent to the target routing node according to the second routing path.
5. The method according to claim 1, characterized in that When the second data packet has not reached the father node, taking the current routing node where the first data packet is located as the next routing node includes: Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the next routing node to obtain a fifth operation result; Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits; Check the target value bit of the valid value bit in the fifth operation result from low to high to obtain the valid value; Invert the values corresponding to the target value bits in the node number of the current routing node in order from low to high, and obtain a third routing path constituted by the obtained node numbers; The first data packet is sent to the next routing node according to the third routing path.
6. The method according to claim 1, characterized in that When the second data packet reaches the father node, sending the first data packet to the next routing node includes: When the second data packet reaches the father node, determining whether the first data packet passes through the father node; When the first data packet passes through the father node, routing the first data packet to a lower-layer routing node; When the first data packet does not pass through the father node, the first data packet is routed to the father node between the current routing node and the next routing node.
7. The method according to claim 6, characterized in that Routing the first data packet to a lower-layer routing node includes: Performing a bitwise exclusive OR operation on the node numbers of the father node and the next routing node to obtain a sixth operation result; Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits; Check the target value bit of the valid value bit in the sixth operation result from low to high to obtain the valid value; Invert the values corresponding to the target value bits in the node numbers of the source routing nodes in order from high to low, and obtain a fourth routing path constituted by the obtained node numbers; The first data packet is sent to the next routing node according to the fourth routing path.
8. The method according to claim 6, characterized in that Routing the first data packet to an upper-layer routing node includes: Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the next routing node to obtain a seventh operation result; Taking the value bits corresponding to the layers between the layer number where the current routing node is located and the layer number where the next routing node is located as valid value bits; Check the target value bit of the valid value in the seventh operation result from low to high; Invert the values corresponding to the target value bits in the node number of the current routing node in order from low to high, and obtain a third routing path constituted by the obtained node numbers; The first data packet is sent to the next routing node according to the third routing path.
9. The method according to claim 1, characterized in that: The method further comprises: When there is a first data packet to be sent, determining whether the node numbers of the source routing node and the target routing node of the first data packet are the same; When the node numbers of the source routing node and the target routing node are the same, the first data packet is routed internally at the current routing node.
10. The method according to claim 9, characterized in that The determining whether the node numbers of the source routing node and the target routing node of the first data packet are the same includes: Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the target routing node to obtain an eighth operation result; When there is no valid value in the eighth operation result, determining that the node numbers of the source routing node and the target routing node are the same; When a valid value exists in the eighth operation result, it is determined that the node numbers of the source routing node and the target routing node are different.
11. The method according to claim 1, characterized in that After querying the routing status of the second data packet whose data packet order is before the first data packet, the method further includes: When the routing information of the second data packet is not found, the sending process of the first data packet is suspended.
12. A network system, characterized in that: include: Fat tree networks and fully connected networks; The nodes in the fat tree network are used to transmit data packets through the data packet routing method described in any one of claims 1 to 11, and send the routing information of the data packets to the fully connected network; The fully connected network is used to send a broadcast message corresponding to the routing situation to the routing nodes in the fat tree network when receiving the routing situation of the data packet.
13. The network system according to claim 12, characterized in that: When any node in the fully connected network receives the routing information of the data packet, it sends the routing information to other nodes in the fully connected network.
14. The network system according to claim 12, characterized in that: When any node in the fully connected network receives the routing information of the data packet, it sends a broadcast message to the routing node corresponding to the node in the fat tree network.
15. A computer device, characterized in that: include: A memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the data packet routing method as described in any one of claims 1 to 11.
16. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the data packet routing method as claimed in any one of claims 1 to 11 are implemented.
17. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the data packet routing method described in any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Data packet transmission method, terminal and computer readable storage medium
CN108737557A
Method, system and device for implementing dual-host routing and medium
CN117155842A
Routing path determination method, device and equipment of bidirectional topology network and medium
CN117354230A