Data packet routing method, computer device, storage medium and program

By setting up a fully connected network in the network, the routing of data packets is collected and distributed, the data out of order caused by random packet routing in traditional technology is solved, and the orderly transmission and reception of data packets are realized.

CN118802710BActive Publication Date: 2025-02-25SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411266960.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-02-25
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

In traditional on-chip networks, due to the random routing methods of data packets, the routing paths selected by different data packets during transmission are different, which leads to different transmission delays. The order of receiving data packets at the receiving end is inconsistent with the order at which it was sent. An out-of-order error occurred.

Method used

By setting up a fully connected network in the network, the routing status of data packets is collected and distributed, so that the routing node can query the routing status of data packets located before the packet order, thereby determining the next routing node and target routing path of the packet. Ensure that packets are sent along route nodes before their packet paths in order.

Benefits of technology

It effectively avoids the disorder of the packet order of the receiving end due to network delay, and ensures that the order of reception of the packets received by the receiving end is consistent with the order of the packets arranged by the packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802710B_ABST
    Figure CN118802710B_ABST
Patent Text Reader

Abstract

The data packet routing method, computer device, storage medium and program provided in the present application belong to the field of data transmission technology. The method includes: when there is a first data packet to be sent, querying the routing status of a second data packet whose corresponding data packet order is before the first data packet, and the routing status is obtained from a fully connected network; based on the routing status, determining the next routing node of the first data packet from the routing nodes passed by the second data packet; determining a target routing path based on the next routing node and the current routing node of the first data packet; sending the first data packet through the target routing path, and sending the routing status of the first data packet to the fully connected network after sending.
Need to check novelty before this filing date? Find Prior Art

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] Determine a next routing node for the first data packet from the routing nodes along which the second data packet passes based on the routing situation;

[0008] Determine a target routing path based on the next routing node and the current routing node of the first data packet;

[0009] The first data packet is sent through the target routing path, and after sending, the routing information of the first data packet is sent to the fully connected network.

[0010] Optionally, the method further comprises:

[0011] When there is a first data packet to be sent, performing a bitwise exclusive OR operation on the numbers of the source routing node and the target routing node of the first data packet to obtain a first operation result;

[0012] When each bit in the first operation result is not a valid value, the first data packet is routed inside the current routing node.

[0013] Optionally, after performing a bitwise XOR operation on the numbers of the source routing node and the target routing node of the first data packet to obtain a first operation result, the method further includes:

[0014] When there is only one valid value in the first operation result, the routing path between the source routing node and the target routing node is used as the target routing path.

[0015] Optionally, the querying of the routing status of a second data packet whose order of data packet corresponds to the query and precedes the first data packet includes:

[0016] When there are at least two valid values ​​in the first operation result, the routing status of the second data packet whose corresponding data packet order is before the first data packet is queried.

[0017] Optionally, determining the next routing node of the first data packet from the routing nodes passed by the second data packet based on the routing situation includes:

[0018] The next routing node of the second data packet is used as the next routing node of the first data packet.

[0019] Optionally, determining a target routing path based on the next routing node and a current routing node of the first data packet includes:

[0020] Performing a bitwise exclusive OR operation on the node numbers of the current routing node and the next routing node of the first data packet to obtain a second operation result;

[0021] Query the valid value bit that takes a valid value in the second operation result;

[0022] The valid value bits in the node number of the current routing node are sequentially inverted, and the routing path formed by the obtained node numbers is used as the target routing path.

[0023] Optionally, the method further comprises:

[0024] When there is a first data packet to be sent, determining whether the data packet sequence of the first data packet is first;

[0025] When the data packet is in the first order, a target routing path is determined based on the node numbers of the source routing node and the target routing node of the first data packet.

[0026] Optionally, determining the target routing path based on the node numbers of the source routing node and the target routing node of the first data packet includes:

[0027] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the target routing node to obtain a third operation result;

[0028] Query the valid value bit that takes a valid value in the second operation result;

[0029] The valid value bits in the node number of the source routing node are sequentially inverted, and the routing path formed by the obtained node numbers is used as the target routing path.

[0030] 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:

[0031] When the routing information of the second data packet is not found, the sending process of the first data packet is suspended.

[0032] Some embodiments of the present application provide a network system, including: flattening a fat tree network and a fully connected network;

[0033] The nodes in the flattened 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;

[0034] The fully connected network is used to send a broadcast message corresponding to the routing situation to the routing nodes in the flattened fat tree network when receiving the routing situation of the data packet.

[0035] 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.

[0036] 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 flattened fat tree network.

[0037] Some embodiments of the present application provide a data packet routing device, including:

[0038] 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;

[0039] Determine a next routing node for the first data packet from the routing nodes along which the second data packet passes based on the routing situation;

[0040] Determine a target routing path based on the next routing node and the current routing node of the first data packet;

[0041] A routing module is used to send the first data packet through the target routing path, and after sending, send the routing information of the first data packet to the fully connected network.

[0042] Optionally, the query module is further used to:

[0043] When there is a first data packet to be sent, performing a bitwise exclusive OR operation on the numbers of the source routing node and the target routing node of the first data packet to obtain a first operation result;

[0044] When each bit in the first operation result is not a valid value, the first data packet is routed inside the current routing node.

[0045] Optionally, the query module is further used to:

[0046] When there is only one valid value in the first operation result, the routing path between the source routing node and the target routing node is used as the target routing path.

[0047] Optionally, the query module is further used to:

[0048] When there are at least two valid values ​​in the first operation result, the routing status of the second data packet whose corresponding data packet order is before the first data packet is queried.

[0049] Optionally, the query module is further used to:

[0050] The next routing node of the second data packet is used as the next routing node of the first data packet.

[0051] Optionally, the query module is further used to:

[0052] Performing a bitwise exclusive OR operation on the node numbers of the current routing node and the next routing node of the first data packet to obtain a second operation result;

[0053] Query the valid value bit that takes a valid value in the second operation result;

[0054] The valid value bits in the node number of the current routing node are sequentially inverted, and the routing path formed by the obtained node numbers is used as the target routing path.

[0055] Optionally, the query module is further used to:

[0056] When there is a first data packet to be sent, determining whether the data packet sequence of the first data packet is first;

[0057] When the data packet is in the first order, a target routing path is determined based on the node numbers of the source routing node and the target routing node of the first data packet.

[0058] Optionally, the query module is further used to:

[0059] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the target routing node to obtain a third operation result;

[0060] Query the valid value bit that takes a valid value in the second operation result;

[0061] The valid value bits in the node number of the source routing node are sequentially inverted, and the routing path formed by the obtained node numbers is used as the target routing path.

[0062] Optionally, the query module is further used to:

[0063] When the routing information of the second data packet is not found, the sending process of the first data packet is suspended.

[0064] Some embodiments of the present application provide a computer device, including: 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.

[0065] Some embodiments of the present application provide a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of the data packet routing method as described above when the computer program / instruction is executed by a processor.

[0066] 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.

[0067] 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 order of the data packet, so that the data packet can be sent along the routing nodes along the path of the data packet that precedes it in order, 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.

[0068] 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

[0069] 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.

[0070] Figure 1 A schematic diagram of the structure of a network system provided by some embodiments of the present application is schematically shown;

[0071] Figure 2 A schematic diagram of a flattened fat tree network provided in some embodiments of the present application is shown schematically;

[0072] Figure 3 The structure diagram of a fully connected network provided in some embodiments of the present application is schematically shown;

[0073] Figure 4 The structure diagram of a broadcast message provided in some embodiments of the present application is schematically shown;

[0074] Figure 5 A transmission diagram of a data packet routing method provided by some embodiments of the present application is schematically shown;

[0075] Figure 6 A schematic diagram of a flow chart of a data packet routing method provided in some embodiments of the present application is schematically shown;

[0076] Figure 7 The structure diagram of a data packet routing device provided in some embodiments of the present application is schematically shown;

[0077] Figure 8 A block diagram schematically shows a computer device for executing the method according to some embodiments of the present application;

[0078] Fig. 9 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

[0079] 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.

[0080] Figure 1 The structure diagram of a network system provided by the present application is schematically shown, including: a flattened fat tree network 10 and a fully connected network 20.

[0081] The flattened 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.

[0082] The fully connected network 20 is used to send a broadcast message corresponding to the routing situation to the routing nodes in the flattened fat tree network when receiving the routing situation of the data packet.

[0083] 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.

[0084] 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 flattened fat tree network.

[0085] It should be noted that the flattened fat tree network refers to a network topology. Compared with the traditional tree network topology in which the bandwidth converges layer by layer and 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 flattened fat tree network is not converged. This is also the basis for the flattened fat tree network architecture to support non-blocking networks.

[0086] like Figure 2The figure shows a two-level bidirectional clos topology structure. The terminal node initiates a data transmission request to its corresponding target terminal node. When a certain starting terminal node initiates multi-packet data transmission to the same target terminal node, due to the path diversity of the topology 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 via 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 destination terminal node in the order corresponding to its starting sequence, that is, data disorder occurs, resulting in data transmission errors. For example, assuming that the input terminal node 0 sends 3 packets of data to the output terminal node 6, the order of these 3 packets of data when the input terminal node 0 initiates the transmission is data packet 1→data packet 2→data packet 3, due to the routing diversity of the topology.

[0087] Data packet 1 may choose the path: input terminal node 0 → routing node 0 → routing node 1 → routing node 3 → output terminal node 6.

[0088] Data packet 2 may choose the path: input terminal node 0 → routing node 0 → routing node 2 → routing node 3 → output terminal node 6.

[0089] Data packet 3 may choose the path: input terminal node 0 → routing node 0 → routing node 2 → routing node 3 → output terminal node 6.

[0090] Since the difference between the three paths lies in the choice of the second routing node, Data Packet 1 selects routing node 1, Data Packet 2, and Data Packet 3 select routing node 2. Due to the diversity of data routing paths in the interconnection structure, each routing node will have routing requests for different paths 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 a change in the order in which the data packets arrive at the target node. The data sent from the starting order of Data Packet 1 → Data Packet 2 → Data Packet 3 arrives at the same target node in the order of Data Packet 2 → Data Packet 3 → Data Packet 1, which will cause data disorder errors at the receiving end.

[0091] For example, Figure 2 There are 32 terminal nodes in total. We use 5 bits to represent each terminal node, such as: 00000 represents terminal node 0, 00001 represents terminal node 1, ..., 11110 represents terminal node 30, and 11111 represents terminal node 31; Figure 5 There are 16 routing nodes in total, and the first 4 bits of the 5 bits are used to represent the routing nodes, such as 0000_represents routing node 0, 0001_represents routing node 1, ..., 1110_represents terminal node 14, and 1111_represents terminal node 15.

[0092] 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 2 Each 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.

[0093] 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).

[0094] 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.

[0095] 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.

[0096] 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.

[0097] Reference Figure 2 , assuming that the source terminal node is S and the target terminal node is D, the routing algorithm is described below:

[0098] Step 1: The source terminal node S and the target terminal node D are bitwise XORed, and the result is recorded as I;

[0099] Step 2: Check the first 4 bits of I. If the first 4 bits are all 0, it proves that the source terminal node S and the target terminal node D are in the same routing node, and routing can be performed directly inside the routing node. For example, assuming that the source terminal node S is 00110 (6) and the target terminal node D is 00111 (7), after bitwise XOR, I is 00001, and the first 4 bits are all 0. These two terminal nodes are in the same routing node (routing node 7), so routing can be performed directly inside.

[0100] If the first 4 bits of I are not all 0, and the first 4 bits contain k, it means that it is necessary to pass through k+1 nodes from the source terminal node S to the target terminal node D. For example, assuming that the source terminal node S is 00010(2) and the target terminal node D is 11111(31), after bitwise XOR, I is 11101, and the first 4 bits contain 3 1s, then it is necessary to pass through 4 routing nodes from the source terminal node S: 00010(0) to the target terminal node D: 11111(31).

[0101] Step 3: Method for determining routing nodes. Still using the example of step 2 as an example, the source terminal node S is 00010(2) at the first routing node 0001_, and the target terminal node D is 11111(31) at the fifteenth routing node 1111_. The first three bits in I are 1, and the information of the first three bits of the first routing node 0001_ is changed in a random manner (the first three bits are changed from 0 to 1, and from 1 to 0). With each change in the routing node bit information, the 1 in the corresponding bit in I is also changed to 0, until all bits in I are 0, the routing between routing nodes ends, and the routing information is routed to the terminal node according to the last bit of D. In a random manner, the routing path may have the following results:

[0102] 0001_(I:1110_)->0011_(I:1100_)->0111_(I:1000_)->1111_(I:0000_)

[0103] 0001_(I:1110_)->0011_(I:1100_)->1011_(I:0100_)->1111_(I:0000_)

[0104] 0001_(I:1110_)->0101_(I:1010_)->0111_(I:1110_)->1111_(I:0000_)

[0105] 0001_(I:1110_)->0101_(I:1010_)->1101_(I:1110_)->1111_(I:0000_)

[0106] 0001_(I:1110_)->1001_(I:0110_)->1011_(I:0100_)->1111_(I:0000_)

[0107] 0001_(I:1110_)->1001_(I:0110_)->1101_(I:0010_)->1111_(I:0000_)

[0108] The random routing method in the third step is simple to implement and has path diversity.

[0109] 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.

[0110] 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.

[0111] Figure 6 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:

[0112] 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.

[0113] It should be noted that the execution subject in some embodiments of the present application may be Figure 1The 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, it is necessary to split the data into multiple data packets for transmission to ensure the transmission efficiency of the data. 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.

[0114] 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.

[0115] 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 in the form of a broadcast message to each routing node in the flattened fat tree network, so that the routing node can query the routing status of each data packet.

[0116] Step 102, based on the routing situation, determine the next routing node of the first data packet from the routing nodes passed by the second data packet.

[0117] In the embodiment of the present application, in order to avoid the situation that the order of receiving data packets received by the receiving end is inconsistent with the order of data packets due to the network delay in the routing path due to the different routing paths of the first data packet and the second data packet, the first data packet whose data packet order is after the second data packet can be routed along the routing path of the second data packet, so that the first datagram can always be routed following the routing path of the second data packet. Therefore, any routing node can be selected from the routing nodes in the path of the second data packet as the next routing node of the first data packet. It is worth mentioning that the routing node in the path of the second data packet can be the routing node that the second data packet has reached or passed, or it can be the routing node that the second data packet is about to reach or pass. For example, the next routing node can be the routing node where the second data packet is currently located, or it can be the routing node where the second data packet was sent last time, or it can be the routing node that the second data packet needs to reach next time. It can be set according to actual needs and is not limited here.

[0118] Step 103: determine a target routing path based on the next routing node and the current routing node of the first data packet.

[0119] In the embodiment of the present application, after determining the next routing node, the current routing node may randomly select any routing path from the routing paths between the next routing node and the current routing node as the target routing path.

[0120] Step 104: Send the first data packet through the target routing path, and after sending, send the routing information of the first data packet to the fully connected network.

[0121] In an embodiment of the present application, 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 in the form of a broadcast message to other routing nodes in the flattened fat tree network, so that other routing nodes in the flattened fat tree network can update the routing status of the first data packet.

[0122] 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, so that the data packet can be sent along the routing nodes along the path of the data packet that is located before the 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 arranged, and avoiding the disorder of the data packet order at the receiving end due to network delay.

[0123] Optionally, the method further comprises:

[0124] Step 201: When there is a first data packet to be sent, perform a bitwise exclusive OR operation on the numbers of the source routing node and the target routing node of the first data packet to obtain a first operation result.

[0125] Step 202: When each bit in the first operation result is not a valid value, the first data packet is routed inside the current routing node.

[0126] In the embodiment of the present application, it is assumed that the node number of the source routing node is S, and the node number of the target routing node is D, and S and D are subjected to a bitwise XOR operation. It is worth noting that the bitwise XOR operation means that the value of each bit of the operation result depends on whether the values ​​of the corresponding bits of the two numerical values ​​involved in the operation are the same. If they are the same, the corresponding bit of the operation result takes an invalid value "0", and if they are not the same, the corresponding bit of the operation result takes a valid value "1".

[0127] Furthermore, if each bit in the first operation result I obtained is 0, it proves that the source routing node and the target routing node belong to the same routing node, so there is no need to perform routing externally, and routing can be performed directly within the current routing node, that is, the current routing node is used as the next routing node of the first data packet to send the first data packet.

[0128] In the embodiment of the present application, when the source routing node and the target routing node of a data packet are the same, the first data packet is routed inside the current routing node, thereby avoiding consumption of invalid routes and saving routing resources.

[0129] Optionally, the method further comprises:

[0130] Step 203: When there is only one valid value in the first operation result, the routing path between the source routing node and the target routing node is used as the target routing path.

[0131] In an embodiment of the present application, if there is only one bit in the first operation result that has a valid value of "1", it indicates that the source routing node and the target routing node of the first data packet are directly connected, and there is only one routing path between the source routing node and the target routing node, which will not cause disorder. At this time, the first data packet can be directly sent through this unique routing path.

[0132] For example, assuming that the source routing node S is 00010(2) and the target routing node D is 00111(7), the source terminal node S and the target terminal node D are bitwise XORed to obtain 0010_. Figure 2It can be seen that routing node 1 (0001_) and routing node 3 (0011_) are directly connected and the path is unique, so the first data packet can be directly sent from routing node 1 to routing node 3, and other data packets are also directly sent according to the target routing path.

[0133] When there is only one routing path between the source routing node and the target routing node in the embodiment of the present application, the data packet is sent directly, which reduces routing consumption and improves routing efficiency.

[0134] Optionally, the method further comprises:

[0135] Step 204: when there are at least two valid values ​​in the first operation result, query the routing status of the second data packet whose corresponding data packet sequence is before the first data packet.

[0136] In an embodiment of the present application, if there are at least two valid values ​​in the first operation result, it means that there are multiple candidate routing paths between the source routing node and the target routing node. At this time, the data packet will be in the process of transmission. Due to the different delays of the routing paths, the receiving order of the receiving end will be disordered. Then, the first data packet can be sent through the steps of the data packet routing method provided in some embodiments of the present application.

[0137] Optionally, the step 102 includes:

[0138] Step 1021: Use the next routing node of the second data packet as the next routing node of the first data packet.

[0139] In an embodiment of the present application, in order to route the first data packet along the routing path of the second data packet, the next routing node of the second data packet can be selected as the next routing node of the first data packet. It can be understood that the second data packet is already in the process of being sent to the next routing node, or has reached the next routing node. At this time, sending the first data packet to the next routing node can ensure that the first data packet is always routed along the routing path of the second data packet, so that the receiving end can receive the first data packet only after receiving the second data packet, so that the receiving order of the data packets received by the receiving end is consistent with the order of the data packets.

[0140] For example, assume that for a data packet ,by To illustrate, the current routing node of the data packet at this moment is . Query the second packet before routing The broadcast message will The next routing node in the broadcast message As the next routing node for the first data packet , and according to the data packet The current routing node and XOR bit by bit to get Determine the candidate routing path. The determination method is as follows formula (1):

[0141] (1)

[0142] in, is a candidate routing path, is the current routing node, It is the next routing node.

[0143] Of course, this is just an exemplary description and can be set according to actual needs, so it is not limited here.

[0144] In the embodiment of the present application, the next routing node of the second data packet is used as the next routing node of the first data packet, so that the first data packet can be routed following the routing path of 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 of the data packets.

[0145] Optionally, the step 103 includes:

[0146] Step 1031, performing a bitwise exclusive OR operation on the node numbers of the current routing node and the next routing node of the first data packet to obtain a second operation result.

[0147] Step 1032, query the valid value bit that takes a valid value in the second operation result.

[0148] Step 1033, inverting the valid value bits in the node number of the current routing node in turn, and taking the routing path formed by the obtained node numbers as the target routing path.

[0149] 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 S, and the node number of the next routing node is D, and the first data packet is sent.

[0150] In the first step, the node numbers of the current routing node S and the next routing node D may be subjected to a bitwise XOR operation to obtain a first operation result I;

[0151] The second step is to query the most significant bit of the valid value "1" in the second operation result I. Assuming it is 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;

[0152] In the third step, for the valid bits in the first operation result I, in random order, with reference to the target value bits in I that take the valid value "1", the numerical values ​​corresponding to the current routing address S are inverted in turn, and a node number is obtained each time the inversion is performed until all the target value bits in the first operation result I are traversed, and the target routing path for sending the first data packet from the current routing node S to the next routing node D can be obtained.

[0153] For example, assume that the source terminal node S is 00010 (2), the target terminal node D is 11111 (31), and there are data packets 1, 2, and 3 that need to be kept in order.

[0154] Step 1: The current terminal node S and the next routing node D are bitwise XORed to obtain I = 1110_;

[0155] Step 2: Check the first 4 bits of I;

[0156] Step 3: If the first 3 bits in I are 1, randomly change the first 3 bits of the first routing node 0001_ (the first 3 bits are 0 and become 1, and 1 and become 0). For each bit of information change in the routing node, the 1 in the corresponding bit in I also becomes 0, until all bits in I are 0, the routing between the routing nodes ends, and the routing information is routed to the terminal node according to the last bit of D. In a random manner, the routing method may have the following results:

[0157] 0001_(I:1110_)->0011_(I:1100_)->0111_(I:1000_)->1111_(I:0000_)

[0158] 0001_(I:1110_)->0011_(I:1100_)->1011_(I:0100_)->1111_(I:0000_)

[0159] 0001_(I:1110_)->0101_(I:1010_)->0111_(I:1110_)->1111_(I:0000_)

[0160] 0001_(I:1110_)->0101_(I:1010_)->1101_(I:1110_)->1111_(I:0000_)

[0161] 0001_(I:1110_)->1001_(I:0110_)->1011_(I:0100_)->1111_(I:0000_)

[0162] 0001_(I:1110_)->1001_(I:0110_)->1101_(I:0010_)->1111_(I:0000_)

[0163] Each step of routing uses random routing to select the current routing node, and at the moment the data packet is sent out, Figure 3 The fully connected network shown sends Figure 4 The broadcast message shown .

[0164] Optionally, the method further comprises:

[0165] Step 301: When there is a first data packet to be sent, determine whether the data packet sequence of the first data packet is the first.

[0166] Step 302, when the data packet is in the first order, determine the target routing path based on the node numbers of the source routing node and the target routing node of the first data packet.

[0167] 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.

[0168] 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.

[0169] Optionally, the step 302 includes:

[0170] Step 3021, performing a bitwise exclusive OR operation on the node numbers of the source routing node and the target routing node to obtain a third operation result.

[0171] Step 3022, query the valid value bit that takes a valid value in the second operation result.

[0172] Step 3023, invert the valid value bits in the node number of the source routing node in turn, and use the routing path composed of the obtained node numbers as the target routing path.

[0173] In the embodiment of the present application, it is assumed that the node number of the source routing node of the first data packet is S, and the node number of the target routing node is D, and the first data packet is sent.

[0174] In the first step, the node numbers of the source routing node S and the target routing node D may be subjected to a bitwise XOR operation to obtain a first operation result I;

[0175] The second step is to query the most significant bit of the valid value "1" in the second operation result I. Assuming it is 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;

[0176] In the third step, for the valid bits in the first operation result I, in random order, with reference to the target value bits in I that take the valid value "1", the numerical values ​​corresponding to the current routing address S are inverted in turn, and a node number is obtained each time the inversion is performed until all the target value bits in the first operation result I are traversed, and the target routing path for sending the first data packet from the source routing node S to the target routing node D can be obtained.

[0177] For example, assume that the source terminal node S is 00010 (2), the target terminal node D is 11111 (31), and there are data packets 1, 2, and 3 that need to be kept in order.

[0178] Step 1: The current terminal node S and the target routing node D are bitwise XORed to obtain I = 1110_;

[0179] Step 2: Check the first 4 bits of I;

[0180] Step 3: If the first 3 bits in I are 1, randomly change the first 3 bits of the first routing node 0001_ (the first 3 bits are 0 and become 1, and 1 and become 0). For each bit of information change in the routing node, the 1 in the corresponding bit in I also becomes 0, until all bits in I are 0, the routing between the routing nodes ends, and the routing information is routed to the terminal node according to the last bit of D. In a random manner, the routing method may have the following results:

[0181] 0001_(I:1110_)->0011_(I:1100_)->0111_(I:1000_)->1111_(I:0000_)

[0182] 0001_(I:1110_)->0011_(I:1100_)->1011_(I:0100_)->1111_(I:0000_)

[0183] 0001_(I:1110_)->0101_(I:1010_)->0111_(I:1110_)->1111_(I:0000_)

[0184] 0001_(I:1110_)->0101_(I:1010_)->1101_(I:1110_)->1111_(I:0000_)

[0185] 0001_(I:1110_)->1001_(I:0110_)->1011_(I:0100_)->1111_(I:0000_)

[0186] 0001_(I:1110_)->1001_(I:0110_)->1101_(I:0010_)->1111_(I:0000_)

[0187] Each step of routing uses random routing to select the current routing node, and at the moment the data packet is sent out, Figure 3 The fully connected network shown sends Figure 4 The broadcast message shown Assume that data packet 1 is at routing node 0101_ and is about to be sent to routing node 1101_. At this time, routing node 0101_ will send a broadcast message.

[0188] 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.

[0189] 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.

[0190] 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.

[0191] Figure 7 The structure diagram of a data packet routing device 40 provided by the present application is schematically shown, and the device includes:

[0192] A query module 401 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;

[0193] Determine a next routing node for the first data packet from the routing nodes along which the second data packet passes based on the routing situation;

[0194] Determine a target routing path based on the next routing node and the current routing node of the first data packet;

[0195] The routing module 402 is used to send the first data packet through the target routing path, and after sending, send the routing information of the first data packet to the fully connected network.

[0196] Optionally, the query module 401 is further used to:

[0197] When there is a first data packet to be sent, performing a bitwise exclusive OR operation on the numbers of the source routing node and the target routing node of the first data packet to obtain a first operation result;

[0198] When each bit in the first operation result is not a valid value, the first data packet is routed inside the current routing node.

[0199] Optionally, the query module 401 is further used to:

[0200] When there is only one valid value in the first operation result, the routing path between the source routing node and the target routing node is used as the target routing path.

[0201] Optionally, the query module 401 is further used to:

[0202] When there are at least two valid values ​​in the first operation result, the routing status of the second data packet whose corresponding data packet order is before the first data packet is queried.

[0203] Optionally, the query module 401 is further used to:

[0204] The next routing node of the second data packet is used as the next routing node of the first data packet.

[0205] Optionally, the query module 401 is further used to:

[0206] Performing a bitwise exclusive OR operation on the node numbers of the current routing node and the next routing node of the first data packet to obtain a second operation result;

[0207] Query the valid value bit that takes a valid value in the second operation result;

[0208] The valid value bits in the node number of the current routing node are sequentially inverted, and the routing path formed by the obtained node numbers is used as the target routing path.

[0209] Optionally, the query module 401 is further used to:

[0210] When there is a first data packet to be sent, determining whether the data packet sequence of the first data packet is first;

[0211] When the data packet is in the first order, a target routing path is determined based on the node numbers of the source routing node and the target routing node of the first data packet.

[0212] Optionally, the query module 401 is further used to:

[0213] Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the target routing node to obtain a third operation result;

[0214] Query the valid value bit that takes a valid value in the second operation result;

[0215] The valid value bits in the node number of the source routing node are sequentially inverted, and the routing path formed by the obtained node numbers is used as the target routing path.

[0216] Optionally, the query module 401 is further used to:

[0217] When the routing information of the second data packet is not found, the sending process of the first data packet is suspended.

[0218] 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, so that the data packet can be sent along the routing nodes along the path of the data packet that is located before the 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 arranged, and avoiding the disorder of the data packet order at the receiving end due to network delay.

[0219] 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.

[0220] For example, Figure 8 A computer device that can implement the method according to the present application is shown. The computer device conventionally includes a processor 510 and a computer program product or a non-transitory computer-readable medium in the form of a memory 520. The memory 520 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 520 has a storage space 530 for program code, i.e., code 531, for executing any method step in the above method. For example, the storage space 530 for program code may include individual codes 531 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 described in reference Fig. 9 The portable or fixed storage unit. The storage unit may have Figure 8The memory 520 in the computer device of the present invention is similar to the storage segment, storage space, etc. arranged in a similar manner. The program code can be compressed, for example, in an appropriate form. Generally, the storage unit includes computer readable code, i.e., code 531, that is, code that can be read by a processor such as 510, which, when executed by the computer device, causes the computer device to perform the various steps in the method described above.

[0221] 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.

[0222] 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.

[0223] 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.

[0224] 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.

[0225] 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, 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; Determine a next routing node for the first data packet from the routing nodes along which the second data packet passes based on the routing situation; Determine a target routing path based on the next routing node and the current routing node of the first data packet; The first data packet is sent through the target routing path, and after sending, the routing information of the first data packet is sent to the fully connected network.

2. The method according to claim 1, characterized in that The method further comprises: When there is a first data packet to be sent, performing a bitwise exclusive OR operation on the numbers of the source routing node and the target routing node of the first data packet to obtain a first operation result; When each bit in the first operation result is not a valid value, the first data packet is routed inside the current routing node.

3. The method according to claim 2, characterized in that After performing a bitwise XOR operation on the numbers of the source routing node and the target routing node of the first data packet to obtain a first operation result, the method further includes: When there is only one valid value in the first operation result, the routing path between the source routing node and the target routing node is used as the target routing path.

4. The method according to claim 2, characterized in that: The querying of the routing status of a second data packet whose order of data packet corresponds to the query and precedes the first data packet includes: When there are at least two valid values ​​in the first operation result, the routing status of the second data packet whose corresponding data packet order is before the first data packet is queried.

5. The method according to claim 3, characterized in that: The step of determining the next routing node of the first data packet from the routing nodes along the path of the second data packet based on the routing situation comprises: The next routing node of the second data packet is used as the next routing node of the first data packet.

6. The method according to claim 5, characterized in that The determining of the target routing path based on the next routing node and the current routing node of the first data packet comprises: Performing a bitwise exclusive OR operation on the node numbers of the current routing node and the next routing node of the first data packet to obtain a second operation result; Query the valid value bit that takes a valid value in the second operation result; The valid value bits in the node number of the current routing node are sequentially inverted, and the routing path formed by the obtained node numbers is used as the target routing path.

7. The method according to claim 6, characterized in that The method further comprises: When there is a first data packet to be sent, determining whether the data packet sequence of the first data packet is first; When the data packet is in the first order, a target routing path is determined based on the node numbers of the source routing node and the target routing node of the first data packet.

8. The method according to claim 7, characterized in that The determining of the target routing path based on the node numbers of the source routing node and the target routing node of the first data packet comprises: Performing a bitwise exclusive OR operation on the node numbers of the source routing node and the target routing node to obtain a third operation result; Query the valid value bit that takes a valid value in the second operation result; The valid value bits in the node number of the source routing node are sequentially inverted, and the routing path formed by the obtained node numbers is used as the target routing path.

9. 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.

10. A network system, characterized in that: include: Flatten fat tree networks and fully connected networks; The nodes in the flattened fat tree network are used to transmit data packets through the data packet routing method described in any one of claims 1 to 9, 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 flattened fat tree network when receiving the routing situation of the data packet.

11. The network system according to claim 10, 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.

12. The network system according to claim 10, 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 flattened fat tree network.

13. 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 9.

14. 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 9 are implemented.

15. 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 9 are implemented.

Citation Information

Patent Citations

  • Network topology structure, construction method, routing algorithm, equipment and medium

    CN117135059A

  • Routing path determination method, device and equipment of bidirectional topology network and medium

    CN117354230A

  • Data packet transmission method and device, electronic equipment and storage medium

    CN118233448A