Routing method and apparatus, communication network

By employing a method of allocating two virtual channels in a target two-dimensional plane within a high-dimensional Torus network, the problem of excessive virtual channels is solved, achieving efficient routing without deadlock and improved resource utilization.

CN119182703BActive Publication Date: 2025-12-12HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310749016.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-21
Publication Date
2025-12-12
Estimated Expiration
2043-06-21

AI Technical Summary

Technical Problem

In high-dimensional Torus networks, setting two virtual channels per dimension results in an excessive number of virtual channels, which increases the forwarding latency of routing nodes, wastes physical resources, and reduces forwarding performance.

Method used

By allocating two virtual channels in the target two-dimensional plane and determining the virtual channels based on the relative positions of intermediate nodes and source or destination nodes, the number of virtual channels is reduced, thus achieving deadlock-free routing in high-dimensional networks.

Benefits of technology

The number of virtual channels is reduced, simplifying the process of routing nodes retrieving packets from the packet queue, reducing forwarding latency and improving resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182703B_ABST
    Figure CN119182703B_ABST
Patent Text Reader

Abstract

The application provides a routing method and device and a communication network. The method comprises the following steps: receiving a message; if a receiving node of the message is an intermediate node or the receiving node is a directly connected node of a source node of the message, determining a target relative position of a first node and a second node in a target two-dimensional plane; assigning a preset virtual channel corresponding to the target relative position as a virtual channel of the message; and sending the message through the virtual channel assigned to the message; wherein the intermediate node is located between the source node and a destination node of the message, the first node is the destination node and the second node is the intermediate node when the receiving node is the intermediate node; and the first node is the intermediate node and the second node is the source node when the receiving node is the directly connected node of the source node. The application can reduce the forwarding delay of the routing node and improve the forwarding performance.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, and in particular to a routing method and device, and a communication network. BACKGROUND

[0002] The topology of a torus network is widely used in network-on-chip (NoC) technology. The torus network is formed by connecting the boundary nodes in each dimension through a boundary channel on the basis of the structure of a mesh network. Compared with the mesh network, the structure of the torus network is symmetrical and the communication distance of the topology is smaller.

[0003] The physical link of the torus network is a ring structure, which causes a deadlock problem when a data packet is transmitted in the network. The reasons for the deadlock include the loopback connection of the boundary nodes and the deadlock that occurs when the forget algorithm routing mode commonly used in the torus network jumps in different dimensions. In the related art, two virtual channels (VCs) are set in each dimension of the torus network to realize the deadlock-free routing of the message in the torus network.

[0004] However, for a high-dimensional torus network, the method of setting two virtual channels in each dimension causes a large number of virtual channels, which makes it difficult to implement the method in the case of limited physical resources (such as cache) of the port of the routing node. In addition, the increase in the number of virtual channels increases the complexity of the routing node in taking a packet from the packet sending queue, thereby increasing the forwarding delay of the routing node and reducing the forwarding performance. SUMMARY

[0005] The present application provides a routing method and device, and a communication network, which solve the problem that, in the related art, for a high-dimensional torus network, the method of setting two virtual channels in each dimension causes a large number of virtual channels, reduce the forwarding delay of the routing node, and improve the forwarding performance.

[0006] In a first aspect, the present application provides a routing method, which includes: receiving a message; if a receiving node of the message is an intermediate node or the receiving node is a directly connected node of a source node of the message, determining a target relative position of a first node and a second node in a target two-dimensional plane; assigning a preset virtual channel corresponding to the target relative position as a virtual channel of the message; and sending the message through the virtual channel assigned to the message; wherein the intermediate node is located between the source node and a destination node of the message, the first node is the destination node and the second node is the intermediate node when the receiving node is the intermediate node, and the first node is the intermediate node and the second node is the source node when the receiving node is the directly connected node of the source node.

[0007] The target relative position in the target two-dimensional plane can be a difference between a coordinate of the second node in a target dimension and a coordinate of the first node in the target dimension. The target dimension belongs to the target two-dimensional plane, and can include one or two dimensions in the target two-dimensional plane.

[0008] The beneficial effect is that the corresponding virtual channel is allocated through the relative position of the intermediate node and the source node or the relative position of the destination node and the intermediate node, without allocating a virtual channel in each dimension, thereby reducing the number of virtual channels compared to the related art, and enabling routing without deadlock in a high-dimensional network by using only two preset virtual channels, being applicable to a case where physical resources of a routing node port are limited, enabling a process of taking a packet from a packet sending queue of the routing node to be simple, reducing a routing node forwarding delay, improving forwarding performance, and improving resource utilization.

[0009] In a possible implementation, the receiving node is an intermediate node, and the process of determining the target relative position of the first node and the second node in the target two-dimensional plane includes: when the last hop direction and the next hop direction of the packet both belong to the target two-dimensional plane, determining the target relative position of the first node and the second node in the target two-dimensional plane.

[0010] The last hop direction refers to a direction from a last hop node of the packet to the receiving node, and the next hop direction refers to a direction from the receiving node to a next hop node of the packet.

[0011] In a possible implementation, the method further includes: when one of the last hop direction and the next hop direction of the packet does not belong to the target two-dimensional plane, switching the virtual channel of the packet.

[0012] Since the embodiment of the application allocates the virtual channel in the target two-dimensional plane, when one of the last hop direction and the next hop direction of the packet does not belong to the target two-dimensional plane, the virtual channel needs to be switched to reduce the probability of routing deadlock in other two-dimensional planes except the target two-dimensional plane.

[0013] In a possible implementation, the method further includes: when the receiving node is connected to the next hop of the packet across a ring, switching the virtual channel of the packet.

[0014] In a possible implementation, the network in which the packet is located includes a first preset virtual channel and a second preset virtual channel, the relative position range corresponding to the first preset virtual channel is (0, k / 2] or (﹣k, ﹣k / 2], and the relative position range corresponding to the second preset virtual channel is (﹣k / 2, 0] or (k / 2, k); where the target dimension belongs to the target two-dimensional plane, and k represents the length of the target dimension.

[0015] The beneficial effect is that only two virtual channels are needed to realize the routing of the message in a high-dimensional network without deadlock, compared with the related art, the number of virtual channels is reduced, for example, in the related art, two virtual channels are allocated for each dimension, and in the embodiment of the application, only two virtual channels are needed for the entire network.

[0016] In a possible implementation, the network in which the message is located is a torus network. The dimension of the network can be two-dimensional, three-dimensional, or higher-dimensional.

[0017] In a possible implementation, the process of allocating the preset virtual channel corresponding to the target relative position as the virtual channel of the message includes: allocating the preset virtual channel corresponding to the target relative position in the allocation rule as the virtual channel of the message; the allocation rule includes: a relative position range corresponding to each preset virtual channel.

[0018] In a second aspect, the application provides a routing device, which includes: a transceiver module configured to receive a message; a processing module configured to determine a target relative position of a first node and a second node in a target two-dimensional plane if a receiving node of the message is an intermediate node or the receiving node is a directly connected node of a source node of the message; the processing module is further configured to allocate a preset virtual channel corresponding to the target relative position as a virtual channel of the message; the transceiver module is further configured to send the message through the virtual channel allocated to the message; wherein the intermediate node is located between the source node and a destination node of the message, when the receiving node is the intermediate node, the first node is the destination node, and the second node is the intermediate node; when the receiving node is the directly connected node of the source node, the first node is the intermediate node, and the second node is the source node.

[0019] In a possible implementation, the receiving node is the intermediate node, and the processing module is specifically configured to determine the target relative position of the first node and the second node in the target two-dimensional plane when both a previous hop direction and a next hop direction of the message belong to the target two-dimensional plane.

[0020] In a possible implementation, the processing module is further configured to switch the virtual channel of the message when one of the previous hop direction and the next hop direction of the message does not belong to the target two-dimensional plane.

[0021] In a possible implementation, the processing module is further configured to switch the virtual channel of the message when the receiving node is connected to the next hop of the message across a ring.

[0022] In a possible implementation, the network in which the packet is located includes a first preset virtual channel and a second preset virtual channel, the relative position range corresponding to the first preset virtual channel is (0, k / 2] or (-k, -k / 2], and the relative position range corresponding to the second preset virtual channel is (-k / 2, 0] or (k / 2, k); wherein the target dimension belongs to a target two-dimensional plane, and k represents the length of the target dimension.

[0023] In a possible implementation, the network in which the packet is located is a torus network.

[0024] In a possible implementation, the processing module is specifically configured to assign, as the virtual channel of the packet, the preset virtual channel corresponding to the target relative position in the assignment rule; and the assignment rule includes a relative position range corresponding to each preset virtual channel.

[0025] In a third aspect, the present application provides a routing device, comprising: one or more processors; a memory for storing one or more computer programs or instructions; when the one or more computer programs or instructions are executed by the one or more processors, the one or more processors implement the method of any one of the first aspect.

[0026] In a fourth aspect, the present application provides a routing device, comprising a processor for executing the method of any one of the first aspect.

[0027] In a fifth aspect, the present application provides a device, comprising: a processing circuit and an interface circuit; wherein the interface circuit is configured to be coupled with a memory outside the routing device and provide a communication interface for the processing circuit to access the memory; and the processing circuit is configured to execute program instructions in the memory to implement the method of any one of the first aspect.

[0028] In the specific implementation process, the device can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a flip-flop, and various logic circuits, etc. The input signal received by the input circuit can be received and input by, for example but not limited to, a receiver, the output signal output by the output circuit can be output to and transmitted by, for example but not limited to, a transmitter, and the input circuit and the output circuit can be the same circuit which is used as the input circuit and the output circuit at different times. The present application does not limit the specific implementation of the processor and various circuits.

[0029] In an implementation, the routing device can be a wireless communication device, i.e., a computer device supporting wireless communication function. Specifically, the wireless communication device can be a terminal such as a smartphone, or a wireless access network device such as a base station. The system chip can also be referred to as a system on chip (SoC), or simply SoC chip. The communication chip can include a baseband processing chip and a radio frequency processing chip. The baseband processing chip is also sometimes referred to as a modem or baseband chip. The radio frequency processing chip is also sometimes referred to as a radio frequency transceiver or radio frequency chip. In physical implementation, part or all of the chips in the communication chip can be integrated inside the SoC chip. For example, the baseband processing chip is integrated in the SoC chip, and the radio frequency processing chip is not integrated with the SoC chip. The interface circuit can be a radio frequency processing chip in the wireless communication device, and the processing circuit can be a baseband processing chip in the wireless communication device.

[0030] In yet another implementation, the routing device can be part of an integrated circuit product in a wireless communication device, such as a system chip or a communication chip. The interface circuit can be an input / output interface, interface circuit, output circuit, input circuit, pin, or related circuit on the chip or chip system. The processor can also be embodied as a processing circuit or logic circuit.

[0031] In a sixth aspect, the present application provides a communication network, comprising: a sending node, a receiving node, and at least one routing node; the sending node is configured to send a packet to the routing node; the routing node is configured to perform the method of any one of the first aspect; and the receiving node is configured to receive the packet sent by the routing node.

[0032] In a seventh aspect, the present application provides a computer readable storage medium, which stores program codes. When the program codes are executed by a processor, the method of any one of the first aspect is implemented.

[0033] In an eighth aspect, the present application provides a chip, comprising: at least one processor. The at least one processor is configured to perform the method of any one of the first aspect.

[0034] Optionally, the chip further comprises a memory. The at least one processor is configured to execute the codes in the memory, so that the chip implements the method of any one of the first aspect when the at least one processor executes the codes.

[0035] Optionally, the chip can also be an integrated circuit.

[0036] In a ninth aspect, the present application provides a computer program product comprising instructions which, when executed on a computer, cause the computer to implement the method of any one of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 A structure diagram of a three-dimensional torus network provided for an embodiment of the present application;

[0038] Figure 2 A structure diagram of a 6D torus network provided for an embodiment of the present application;

[0039] Figure 3 A process diagram of a forgetful routing algorithm provided for an embodiment of the present application;

[0040] Figure 4 A diagram of a deadlock provided for an embodiment of the present application;

[0041] Figure 5 Another diagram of a deadlock provided for an embodiment of the present application;

[0042] Figure 6 A flow diagram of a routing method provided for an embodiment of the present application;

[0043] Figure 7 A diagram of an allocation rule provided for an embodiment of the present application;

[0044] Figure 8 A diagram of an allocation virtual channel provided for an embodiment of the present application;

[0045] Figure 9 Another flow diagram of a routing method provided for an embodiment of the present application;

[0046] Figure 10 A flow diagram of a routing method provided for an embodiment of the present application;

[0047] Figure 11 A structure diagram of a network layer message of a RoCEV2 protocol provided for an embodiment of the present application;

[0048] Figure 12 A block diagram of a routing device provided for an embodiment of the present application;

[0049] Figure 13 A structure diagram of an electronic device provided for an embodiment of the present application;

[0050] Figure 14 A structure diagram of a routing device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions will be described clearly and completely in the present application with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0052] The terms "first", "second", etc. in the description embodiments of the present application and claims and drawings are only used for distinguishing the purposes of description, and cannot be understood as indicating or implying relative importance, and cannot be understood as indicating or implying sequence. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, comprising a series of steps or units. The method, system, product or device is not necessarily limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0053] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the association between the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases of only A, only B and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b and c can be single or multiple.

[0054] A torus network is formed by connecting boundary nodes in each dimension through a boundary channel on the basis of the structure of a mesh network. The mesh topology is a network interconnection method in a computer cluster, in which all computers form a mesh-like structure. The torus network is suitable for stencil computation and can provide locally optimal communication performance in stencil computation. Stencil computation is a common loop operation mode in numerical simulation programs, in which the calculation process traverses all calculation regions, and each position performs the same calculation operation.

[0055] For example, refer to Figure 1 , Figure 1 A structure diagram of a three-dimensional (3-dimension, 3D) torus network provided by the embodiments of the present application is shown in the figure.Figure 1 Each dimension has 3 nodes, and the boundary nodes of each dimension are connected by a boundary channel.

[0056] The high-dimensional torus network is a torus network nested on the basis of the structure of a 3D torus network. For example, refer to Figure 2 , Figure 2 A structure diagram of a 6D torus network provided by an embodiment of the present application is shown in the figure. The 6D torus network is formed by nesting a 2x3x2 3D torus network on the basis of the structure of a 3D torus network.

[0057] The torus network usually adopts a dimension order routing (DOR) algorithm for routing of a message. The DOR algorithm process includes: first, determining the hop count of each dimension according to the source coordinates and destination coordinates of each dimension of the message, and then determining the shortest / preferred direction of each dimension path. Then, according to the determined direction, the message is transmitted to the destination node of each dimension in sequence according to the dimension order.

[0058] The process of determining the hop count of each dimension can be implemented by the following formula: m i =(d i -s i )mod k, i represents a dimension, d i represents the destination coordinates of the i-th dimension of the message, s i represents the source coordinates of the i-th dimension of the message, k represents the length of the i-th dimension (for example, it can be represented by the hop count of the i-th dimension), and m i represents the hop count of the i-th dimension.

[0059] Then, the shortest / preferred direction of each dimension path is obtained by the following formula:

[0060]

[0061]

[0062] Wherein, DT,i represents the shortest / preferred direction of the i-th dimension path.

[0063] The routing path of a packet in the DOR algorithm is only related to the source node and the destination node of the packet. When the source node and the destination node are unchanged, the routing path is also fixed and unique, which may cause load imbalance. Currently, an oblivious routing algorithm (ORA) is proposed on the basis of the DOR algorithm. The process of the oblivious routing algorithm includes the following steps: first, an intermediate node of a packet is selected; then, the packet is routed from the source node to the intermediate node by using the DOR algorithm, and the packet is routed from the intermediate node to the destination node by using the DOR algorithm.

[0064] For example, refer to Figure 3 , Figure 3 A process schematic diagram of an oblivious routing algorithm provided by an embodiment of the present application is shown in Figure 3 A 5*5 two-dimensional torus network is shown. It is assumed that the source node coordinate of a packet is 00, and the destination node coordinate is 12. First, a node with a coordinate of 31 is selected as an intermediate node. Then, the packet is routed from 00 to 31 by using the DOR algorithm, and the packet is routed from 31 to 12 by using the DOR algorithm.

[0065] When a packet is transmitted in a network, a wormhole switching mode is usually used for data exchange at a routing node. The wormhole switching mode refers to that a packet is divided into multiple flits, and each flit of a packet is transmitted in a pipeline manner in the network. When a head flit reaches a routing node, the routing node determines a path, and the subsequent flits keep the same path as the head flit. When the head flit is blocked, the current routing node only needs to store the head flit, and the subsequent flits are scattered in the subsequent nodes.

[0066] In a torus network, the following two deadlock situations usually occur: a loopback connection of a boundary node in a dimension causes a deadlock, and a jump between different dimensions in the oblivious routing algorithm may form a loop and cause a deadlock.

[0067] For example, refer to Figure 4 , Figure 4 A schematic diagram of a deadlock provided by an embodiment of the present application is shown in Figure 4 Four routing nodes A1, B1, C1 and D1 and four packets P10, P11, P12 and P13 in a torus network are shown. P10 is sent from A1 to C1, P11 is sent from B1 to D1, P12 is sent from C1 to A1, and P13 is sent from D1 to B1. It is assumed that the routing path of P10 is A1-C1, the routing path of P11 is B1-D1, the routing path of P12 is C1-A1, and the routing path of P13 is D1-B1. Figure 4It can be seen that after the micro-fragment of P11 on C1 is dequeued from the receive queue to the transmit queue, the header micro-fragment of P10 on B1 can be sent to C1. That is, the header micro-fragment of P10 on B1 depends on the micro-fragment of P11. After the micro-fragment of P12 on D1 is dequeued from the receive queue to the transmit queue, the header micro-fragment of P11 on C1 can be sent to D1. That is, the header micro-fragment of P11 on C1 depends on the micro-fragment of P12. Similarly, the header micro-fragment of P12 on D1 depends on the micro-fragment of P13, and the header micro-fragment of P13 on A1 depends on the micro-fragment of P10. Therefore, the micro-fragments of the four packets create a cycle in their forwarding dependencies, forming a cyclic buffer dependency (CBD), which causes a deadlock.

[0068] Please refer to Figure 5 , Figure 5 This is a schematic diagram illustrating another deadlock provided in an embodiment of this application. Figure 5 This diagram illustrates four routing nodes A2, B2, C2, and D2, and four messages P20, P21, P22, and P23. Routing node G is connected near A2, routing node H near B2, routing node F near C2, and routing node E near D3. P20 is sent from A2 to E, P21 from B2 to F, P22 from D2 to G, and P23 from C2 to H. Figure 5 It can be seen that only after the micro-pie of P21 on D2 is dequeued from the receive queue and moved to the transmit queue can the header micro-pie of P20 on B2 be sent to D2. That is, the header micro-pie of P20 on B2 depends on the micro-pie of P21. Similarly, the header micro-pie of P21 on D2 depends on the micro-pie of P22, the header micro-pie of P22 on C2 depends on the micro-pie of P23, and the header micro-pie of P23 on A2 depends on the micro-pie of P20.

[0069] Therefore, it can be seen that during the transmission of P20 and P22, routing occurs first in the x-dimensional direction and then in the y-dimensional direction, while during the transmission of P21 and P23, routing occurs first in the y-dimensional direction and then in the x-dimensional direction. This failure to follow a fixed dimensional order in routing causes a loop in the forwarding dependencies of the four packet fragments, forming a circular buffer dependency and resulting in a deadlock. As mentioned above... Figure 3 For example, in the path 01→31→32, there exists a dimensional order of x→y→x. The superposition of multiple such flows may result in… Figure 5 Deadlock situations in [the context of the game].

[0070] In related technologies, virtual channels are partitioned on the ports of routing nodes to resolve deadlock issues, with two virtual channels allocated to each dimension. Figure 4 Taking the Torus network shown as an example, two virtual channels are set up, and the virtual channel is switched when a packet passes through the ring connection of the boundary node. Figure 5As shown in the torus network, a virtual channel is set in each of the x and y directions (dimension) Figure 4 The cross-ring connection of the boundary node is not involved in the embodiment, and therefore a virtual channel can be allocated in each dimension. P20 switches to another virtual channel when forwarding from B2 to D2, and P22 switches to another virtual channel when forwarding from C2 to A2. P21 and P23 are initially in the upper virtual channel because they are initially routed in the y direction, and P21 switches to the lower virtual channel when forwarding from D2 to C2, and P23 switches to the lower virtual channel when forwarding from A2 to B2.

[0071] However, in a high-dimensional torus network, the related art causes a large number of virtual channels, which reduces the forwarding performance of the routing node. Each virtual channel occupies physical resources, and when the number of virtual channels is large, the traffic transmitted by each virtual channel is different. In this way, the physical resources of the virtual channel with large traffic may not be enough, and the physical resources of the virtual channel with small traffic are wasted, thereby reducing the resource utilization.

[0072] Embodiments of the present application provide a routing method, which can reduce the number of virtual channels while realizing routing without deadlock. The method can be applied to a computing cluster in a torus network for high performance computing (HPC) and artificial intelligence (AI) tasks.

[0073] Please refer to Figure 6 , Figure 6 A flowchart of a routing method provided by an embodiment of the present application is shown. The method can be applied to a routing node in a network, which can be a torus network or a mesh network. The network can have two dimensions, three dimensions, or higher dimensions, which are not limited by the embodiments of the present application. A high-dimensional network is usually formed by nesting multiple 3D networks or low-dimensional networks, and the routing method provided by the embodiments of the present application can be used in the 3D network or low-dimensional network. As shown in the figure, the method can include the following processes: Figure 6

[0074] 101、Receiving a packet.

[0075] The receiving node of the packet first determines whether the receiving node is a directly connected node (also referred to as the last hop) of the destination node of the packet according to the destination address of the packet. If the receiving node is the last hop, the packet is directly transmitted to the destination node.

[0076] ​If the receiving node is not a directly connected node to the destination node of the message, then determine whether the receiving node is a directly connected node to the source node of the message (i.e., the first hop). If the receiving node is a directly connected node to the source node of the message, then an intermediate node is selected, and subsequent procedures 102 to 104 are executed. The intermediate node is located between the source node and the destination node of the message.

[0077] If the receiving node is not a directly connected node to the source node of the message, then determine whether the message has passed through an intermediate node. If the message has not passed through an intermediate node, then determine whether the receiving node is an intermediate node. If the receiving node is an intermediate node, then execute subsequent procedures 102 to 104. If the receiving node is not an intermediate node, then route the message from the receiving node to the intermediate node, for example, using a DOR algorithm. If the message has passed through an intermediate node, then route the message from the receiving node to the destination node, for example, using a DOR algorithm.

[0078] 102. If the receiving node of the message is an intermediate node or a direct connection node of the source node of the message, then determine the relative positions of the first node and the second node in the target two-dimensional plane.

[0079] When the receiving node is an intermediate node, the first node is the destination node and the second node is an intermediate node. When the receiving node is a directly connected node of the source node, the first node is an intermediate node and the second node is the source node.

[0080] When the Torus network is a two-dimensional Torus network, the target two-dimensional plane is the two-dimensional plane in which the Torus network resides. When the Torus network is a three-dimensional Torus network, the target two-dimensional plane can be any two-dimensional plane within the Torus network. For example, if the Torus network has three dimensions (x, y, and z), the target two-dimensional plane can be the xy plane, the xz plane, or the yz plane.

[0081] The relative position of the target in the target two-dimensional plane can be the difference between the coordinates of the second node in the target dimension and the coordinates of the first node in the target dimension. The target dimension belongs to the target two-dimensional plane and can include one or two dimensions of the target two-dimensional plane.

[0082] For example, suppose the target two-dimensional plane is the xy plane, and the target dimension includes the y dimension. If the receiving node is a directly connected node to the source node, the coordinates of the source node are represented as (s... x s y s z The coordinates of the intermediate nodes are represented as (m x m y m z The relative positions d of the first and second nodes in the y-axis. ys =m y -sy If the receiving node is an intermediate node, the coordinates of the destination node are represented as (d x , d y , d z ), the relative position of the first node and the second node in the y dimension is d ym = d y - m y .

[0083] 103. Assign the preset virtual channel corresponding to the target relative position as the virtual channel of the message.

[0084] Optionally, the preset virtual channel corresponding to the target relative position in the assignment rule can be assigned as the virtual channel of the message, and the assignment rule includes: a relative position range corresponding to each preset virtual channel.

[0085] The message is transmitted through the currently determined virtual channel. For example, taking a network in which the message is located as including a first preset virtual channel and a second preset virtual channel, the relative position range corresponding to the first preset virtual channel can be (0, k / 2] or (﹣k, ﹣k / 2], and the relative position range corresponding to the second preset virtual channel can be (﹣k / 2, 0] or (k / 2, k). k represents the length of the target dimension (for example, can be the number of target dimension nodes).

[0086] The embodiments of the present application only need two virtual channels to realize the routing without deadlock in a high-dimensional network, and the number of virtual channels is reduced compared with related technologies, for example, two virtual channels are assigned to each dimension in related technologies, and only two virtual channels are needed in the entire network in the embodiments of the present application.

[0087] It is assumed that the target two-dimensional plane is the xy plane, and the target dimension includes the y dimension, and the relative position range refers to the relative position range of two nodes in the y dimension. For example, please refer to Figure 7 , Figure 7 a schematic diagram of an assignment rule provided by the embodiments of the present application, Figure 7 out of the three-dimensional coordinate system with the second node as the origin, the first preset virtual channel is represented as VC0, and the second preset virtual channel is represented as VC1. As Figure 7 indicated, the relative position range (0, k / 2] or (﹣k, ﹣k / 2] corresponds to VC0, and the relative position range (﹣k / 2, 0] or (k / 2, k) corresponds to VC1.

[0088] Still taking the example in process 102, if the receiving node is a directly connected node of the source node, when 0 < d ys ≤ k / 2 or ﹣k < d ys ≤ ﹣k / 2, VC0 is assigned as the virtual channel of the message. When ﹣k / 2 < d ys≤ 0 or k / 2 < d ys When < k, VC1 is assigned as the virtual channel of the packet. If the receiving node is an intermediate node, when 0 < d ym ≤ k / 2 or -k < d ym ≤ -k / 2, VC0 is assigned as the virtual channel of the packet. When -k / 2 < d ym ≤ 0 or k / 2 < d ym < k, VC1 is assigned as the virtual channel of the packet.

[0089] Please refer to Figure 8 , Figure 8 A schematic diagram of assigning a virtual channel provided by an embodiment of the present application, Figure 8 to assign a virtual channel for a packet in a ring network, Figure 5 is described by way of example. Figure 8 In the ring network, the virtual frame group in each routing node constitutes VC0, and the solid frame constitutes VC1. One frame in the routing node represents one queue. Figure 5 In the ring network, P20 and P22 are assigned different virtual channels, and P21 and P23 are assigned different virtual channels, which can break the ring buffer dependency and avoid deadlock. Taking the assignment rule shown in FIG. 2 as an example, VC1 is assigned to P20 and P21, and VC0 is assigned to P22 and P23. Figure 7

[0090] 104. Transmitting the packet through the virtual channel assigned to the packet.

[0091] Optionally, in the routing process of the packet in the entire network, when the receiving node of the packet is connected to the next hop (i.e., the next hop node) of the packet in a cross-ring manner, the virtual channel of the packet needs to be switched.

[0092] ​In summary, the routing method provided by the embodiments of the present application, after receiving a packet, if the receiving node of the packet is an intermediate node or the receiving node is a directly connected node of the source node of the packet, the target relative position of the first node and the second node in the target two-dimensional plane is determined, and then the preset virtual channel corresponding to the target relative position is allocated as the virtual channel of the packet, and the packet is sent through the virtual channel allocated to the packet. When the receiving node is an intermediate node, the first node is a destination node, and the second node is an intermediate node. When the receiving node is a directly connected node of the source node, the first node is an intermediate node, and the second node is a source node. The corresponding virtual channel is allocated through the relative position of the intermediate node and the source node, or the relative position of the destination node and the intermediate node. Without allocating a virtual channel in each dimension, compared with related technologies, the number of virtual channels is reduced, and routing without deadlock in a high-dimensional network can be achieved with only two preset virtual channels. It can be applied to the case where the physical resources of the routing node port are limited, the process of the routing node taking packets from the packet queue is simple, the forwarding delay of the routing node is reduced, the forwarding performance is improved, and the resource utilization is improved.

[0093] The following describes the two cases of the receiving node being a directly connected node of the source node of the packet and the receiving node being an intermediate node separately. Please refer to Figure 9 , Figure 9 The flowchart of another routing method provided by the embodiments of the present application is shown. The method can be applied to a routing node in a network. The network can be a torus network or a mesh network. The dimension of the network can be two-dimensional, three-dimensional, or higher-dimensional, which is not limited by the embodiments of the present application. A high-dimensional network is usually formed by nesting multiple 3D networks or low-dimensional networks. The routing method provided by the embodiments of the present application can be used in the 3D network or low-dimensional network. The method can include the following processes:

[0094] 201, receiving a packet.

[0095] The process can refer to the foregoing process 101, and the embodiments of the present application will not be described here.

[0096] 202, if the receiving node of the packet is a directly connected node of the source node of the packet, an intermediate node is selected and the target relative position of the intermediate node and the receiving node in the target two-dimensional plane is determined.

[0097] Optionally, the intermediate node can be selected by using a Valiant random selection algorithm (Valiant’s randomized algorithm, VAL) or a randomized, oblivious, multi-phase, minimal routing algorithm (ROMM).

[0098] After selecting an intermediate node, intermediate node information can be added to the message, indicating the coordinates of the intermediate node. For example, a 4-byte network header can be added to the message, carrying the intermediate node information.

[0099] The process of determining the relative positions of the intermediate node and the receiving node in the target two-dimensional plane can refer to the aforementioned process 102, and will not be repeated here in the embodiments of this application.

[0100] 203. If the receiving node is an intermediate node, when both the previous hop direction and the next hop direction of the message belong to the target two-dimensional plane, determine the target relative position of the destination node and the intermediate node in the target two-dimensional plane. When one of the previous hop direction and the next hop direction of the message does not belong to the target two-dimensional plane, switch the virtual channel of the message.

[0101] The previous hop direction refers to the direction from the previous hop node of the message to the receiving node, and the next hop direction refers to the direction from the receiving node to the next hop node of the message.

[0102] Assuming the network is a three-dimensional network with x, y, and z axes, and the target two-dimensional plane is the xy plane. If the previous hop direction of the packet is in the x or y dimension, and the next hop direction is also in the x or y dimension, then the relative positions of the destination node and intermediate nodes in the target two-dimensional plane are determined. If the previous hop direction of the packet is in the z dimension, and the next hop direction is in the x or y dimension, then the packet's virtual channel is switched to another virtual channel, for example, switching the packet's virtual channel from VC0 to VC1, and then the packet is transmitted through the switched virtual channel (e.g., VC1). If the previous hop direction of the packet is in the x or y dimension, and the next hop direction is in the z dimension, then the packet's virtual channel is again switched to another virtual channel, for example, switching the packet's virtual channel from VC0 to VC1, and then the packet is transmitted through the switched virtual channel (e.g., VC1). If both the previous hop direction and the next hop direction of the packet are in the z dimension, then the packet continues to be routed according to the original virtual channel, for example, using the DOR algorithm.

[0103] Since the virtual channel allocation in this embodiment is performed on the target two-dimensional plane, when one of the previous hop direction and the next hop direction of the packet does not belong to the target two-dimensional plane, it is necessary to switch virtual channels to reduce the probability of routing deadlock in other two-dimensional planes (such as the yz plane and the xz plane).

[0104] 204. Assign the preset virtual channel corresponding to the relative position of the target as the virtual channel of the message.

[0105] This process can refer to the aforementioned process 103, and will not be repeated here in the embodiments of this application.

[0106] 205. transmitting the packet through the virtual channel assigned to the packet.

[0107] In the embodiments of the present application, if the situation of the receiving node does not belong to the situations of the foregoing processes 201 to 205, the packet is routed directly according to a routing algorithm (for example, the DOR algorithm). During the entire routing process, the virtual channel of the packet needs to be switched when the packet passes through the cross-ring connection of the boundary node of each dimension, and the packet is routed through the switched virtual channel.

[0108] The routing method provided by the embodiments of the present application is further described below through a flowchart. Please refer to Figure 10 Figure 10 The flowchart of a routing method provided by the embodiments of the present application. First, a packet is received, then it is judged whether it is the last hop. If it is the last hop, the packet is directly transmitted to the destination node through the current virtual channel. If it is not the last hop, it is judged whether it is the first hop. If it is the first hop, an intermediate node is selected, the information of the intermediate node is added in the packet header, and the virtual channel of the packet is assigned according to the relative position of the intermediate node and the source node in the target two-dimensional plane, and the packet is routed through the assigned virtual channel. If it is not the first hop, it is judged whether the packet has passed through the intermediate node.

[0109] If the packet has passed through the intermediate node, the packet is routed to the destination node through the current virtual channel, the virtual channel is switched when the packet passes through the cross-ring connection of the boundary node during the routing process, and the packet is routed through the switched virtual channel, and finally the routing is ended. If the packet has not passed through the intermediate node, it is judged whether it is the intermediate node.

[0110] If it is the intermediate node, if the direction of the previous hop and the direction of the next hop both belong to the target two-dimensional plane, the virtual channel of the packet is assigned according to the relative position of the destination node and the intermediate node in the target two-dimensional plane, and the packet is routed through the assigned virtual channel; if one of the direction of the previous hop and the direction of the next hop does not belong to the target two-dimensional plane, the virtual channel is directly switched, and the packet is routed through the switched virtual channel. Then the packet is routed to the destination node through the current virtual channel, the virtual channel is switched when the packet passes through the cross-ring connection of the boundary node during the routing process, and the packet is routed through the switched virtual channel, and finally the routing is ended.

[0111] ​If the non-intermediate node, the packet is routed to the intermediate node through the current virtual channel, the virtual channel is switched when the border node cross-loop connection is passed in the routing process, and the packet is routed through the switched virtual channel. Then if the last hop direction and the next hop direction both belong to the target two-dimensional plane, the virtual channel of the packet is allocated according to the relative position of the destination node and the intermediate node in the target two-dimensional plane, and the packet is routed through the allocated virtual channel; if one of the last hop direction and the next hop direction does not belong to the target two-dimensional plane, the virtual channel is directly switched, and the packet is routed through the switched virtual channel. Then the packet is routed to the destination node through the current virtual channel, the virtual channel is switched when the border node cross-loop connection is passed in the routing process, and the packet is routed through the switched virtual channel, and finally the routing is ended.

[0112] In the embodiment of the present application, the quality of service (QoS) of the end side and the routing node side supports grabbing virtual channel information in the packet, and the virtual channel information indicates all virtual channels passed by the packet before the current time.

[0113] For example, in the network layer packet of the remote direct memory access over converged ethernet (RoCE) V2 protocol based on the converged Ethernet, the virtual channel information can be carried in the type of service (ToS) field. Please refer to Figure 11 , Figure 11 A structure diagram of a network layer packet of the RoCE V2 protocol is provided in the embodiment of the present application, Figure 11 The virtual link (VL) field, the ToS field, the length (Len) field and the identity document (ID) field in the network layer packet of the RoCE V2 protocol are shown. The 0-1 bits in the ToS field are the explicit congestion notification (ECN) field, and the 2-7 bits are the differentiated services codepoint (DSCP) field. The DSCP field represents the virtual channel information.

[0114] In the embodiment of the present application, the intermediate node information and the virtual channel information of the packet can determine the virtual channels passed in the routing process of the packet.

[0115] In summary, the routing method provided by the embodiments of the present application, after receiving the packet, if the receiving node of the packet is the directly connected node of the source node of the packet, the intermediate node is selected and the target relative position of the intermediate node and the receiving node in the target two-dimensional plane is determined, if the receiving node of the packet is the intermediate node, when the last hop direction and the next hop direction of the packet both belong to the target two-dimensional plane, the target relative position of the destination node and the intermediate node in the target two-dimensional plane is determined, when one of the last hop direction and the next hop direction of the packet does not belong to the target two-dimensional plane, the virtual channel of the packet is switched, then the preset virtual channel corresponding to the target relative position is allocated as the virtual channel of the packet, and the packet is sent through the virtual channel allocated to the packet, the corresponding virtual channel is allocated through the relative position of the intermediate node and the source node, or the relative position of the destination node and the intermediate node, without allocating the virtual channel in each dimension, compared with the related art, the number of virtual channels is reduced, the routing without deadlock in the high-dimensional network can be realized only by two preset virtual channels, the routing node can be applied to the case that the physical resources of the port of the routing node are limited, the process of the routing node taking the packet from the packet sending queue is simple, the forwarding delay of the routing node is reduced, the forwarding performance is improved, and the resource utilization rate is improved.

[0116] The sequence of the method provided by the embodiments of the present application can be adjusted appropriately, and the process can also be increased or decreased accordingly according to the situation. Any person skilled in the art can easily think of the method within the technical range disclosed in the present application, which should be covered in the protection scope of the present application, and the embodiments of the present application do not limit this.

[0117] The routing method provided by the embodiments of the present application is mainly introduced from the perspective of the device. It can be understood that the device includes the corresponding hardware structure and / or software module for executing each function in order to realize the above functions. Those skilled in the art should easily realize that the algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0118] The embodiments of the present application can divide the functions of the device according to the above method examples, for example, each function module can be divided according to each function, or two or more functions can be integrated in one processing module. The above integrated module can be realized in the form of hardware or in the form of a software function module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical function division. When actually implemented, there can be another division manner.

[0119] Figure 12 A block diagram of a routing device provided by the embodiments of the present application is shown in the case of dividing each function module according to each function. The routing device 300 can include a transceiver module 301 and a processing module 302. Illustratively, the routing device can be a routing node, or a chip or other combination device or component having the above routing device function. When the routing device 300 is a routing node, the transceiver module 301 can be a transceiver, which can include an antenna and a radio frequency circuit, etc. The processing module 302 can be a processor (or processing circuit), for example, a baseband processor, which can include one or more central processing units (CPUs). When the routing device 300 is a device or component having the above function, the transceiver module 301 can be a radio frequency unit. The processing module 302 can be a processor (or processing circuit), for example, a baseband processor. When the routing device 300 is a chip system, the transceiver module 301 can be an input / output interface of a chip (for example, a baseband chip). The processing module 302 can be a processor (or processing circuit) of the chip system, which can include one or more central processing units. It should be understood that the transceiver module 301 in the embodiments of the present application can be realized by a transceiver or a transceiver related circuit component. The processing module 302 can be realized by a processor or a processor related circuit component (or processing circuit).

[0120] The transceiver module 301 can be configured to perform all the transceiving operations in the embodiments shown in Figure 6 or Figure 9 , and / or other processes for supporting the technologies described herein. The processing module 302 can be configured to perform all the operations in the embodiments shown in Figure 6 or Figure 9 , other than the transceiving operations, and / or other processes for supporting the technologies described herein.

[0121] The transceiver module 301 can include a sending module and / or a receiving module, which are respectively configured to perform the sending and receiving operations in the embodiments shown in Figure 6 or Figure 9 . The routing device includes:

[0122] The transceiver module is used to receive messages;

[0123] The processing module is used to determine the target relative position of the first node and the second node in the target two-dimensional plane if the receiving node of the message is an intermediate node or a directly connected node of the source node of the message.

[0124] The processing module is also used to allocate the preset virtual channel corresponding to the relative position of the target as the virtual channel of the message; the transceiver module is also used to send the message through the virtual channel allocated to the message.

[0125] The transceiver module is also used to send messages through a virtual channel allocated to the message;

[0126] In this context, the intermediate node is located between the source node and the destination node of the message. When the receiving node is an intermediate node, the first node is the destination node and the second node is an intermediate node. When the receiving node is a directly connected node of the source node, the first node is an intermediate node and the second node is the source node.

[0127] In combination with the above scheme, the receiving node is an intermediate node, and the processing module is specifically used to determine the target relative position of the first node and the second node in the target two-dimensional plane when both the previous hop direction and the next hop direction of the message belong to the target two-dimensional plane.

[0128] In conjunction with the above scheme, the processing module is also used to switch the virtual channel of the message when one of the previous hop direction and the next hop direction of the message does not belong to the target two-dimensional plane.

[0129] In conjunction with the above scheme, the processing module is also used to switch the virtual channel of the message when the receiving node connects to the next hop of the message across the ring.

[0130] In combination with the above scheme, the network in which the message is located includes a first preset virtual channel and a second preset virtual channel. The relative position range corresponding to the first preset virtual channel is (0, k / 2] or (-k, -k / 2], and the relative position range corresponding to the second preset virtual channel is (-k / 2, 0] or (k / 2, k). Here, the target dimension belongs to the target two-dimensional plane, and k represents the length of the target dimension.

[0131] Based on the above scheme, the network where the message is located is the Torus network.

[0132] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 400 can be a routing node or a chip or functional module within a routing node. Figure 13 As shown, the electronic device 400 includes a processor 401, a transceiver 402, and a communication line 403.

[0133] The processor 401 is configured to perform any one of the steps in the method embodiments shown in Figure 6 and Figure 9 When performing a process such as sending a packet, the transceiver 402 and the communication line 403 can be selectively invoked to complete the corresponding operation.

[0134] Further, the electronic device 400 can further include a memory 404. The processor 401, the memory 404 and the transceiver 402 can be connected through the communication line 403.

[0135] The transceiver 402 is configured to communicate with other devices or other communication networks, which can be an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The transceiver 402 can be a module, a circuit, a transceiver or any device capable of communication.

[0136] The transceiver 402 is mainly used for the transceiving of packets, etc., and can include a transmitter and a receiver for transmitting and receiving packets, respectively. Operations other than packet transceiving are implemented by the processor, such as determining the relative position of the first node and the second node on the target two-dimensional plane.

[0137] The communication line 403 is configured to transmit information between the components included in the electronic device 400.

[0138] In one design, the processor can be regarded as a logic circuit, and the transceiver can be regarded as an interface circuit.

[0139] The memory 404 is configured to store instructions. The instructions can be a computer program.

[0140] It should be noted that the memory 404 can exist independently of the processor 401, or can be integrated with the processor 401. The memory 404 can be used to store instructions or program codes or some data, etc. The memory 404 can be located in the electronic device 400 or outside the electronic device 400, which is not limited. The processor 401 is configured to execute the instructions stored in the memory 404 to implement the method provided in the above embodiments of the present application.

[0141] In one example, the processor 401 can include one or more processors, such as the processor 0 and the processor 1 in Figure 13 .

[0142] As an optional implementation, the electronic device 400 includes multiple processors, for example, in addition to the processor 401 in Figure 13 , the processor 407 can also be included.

[0143] As an optional implementation, the electronic device 400 also includes an output device 405 and an input device 406. For example, the input device 406 is a device such as a keyboard, mouse, microphone, or joystick, and the output device 405 is a device such as a display screen or speaker.

[0144] It should be noted that the electronic device 400 can be a chip system or... Figure 13 Devices with similar structures. The chip system can be composed of chips or include chips and other discrete components. Actions, terminology, etc., involved in the various embodiments of this application can be referenced interchangeably without limitation. The message names or parameter names in the messages used for interaction between devices in the embodiments of this application are merely examples; other names can be used in specific implementations without limitation. Furthermore, Figure 13 The structural composition shown does not constitute a limitation on the electronic device 400, except... Figure 13 In addition to the components shown, the electronic device 400 may include more than Figure 13 This may indicate more or fewer components, or a combination of certain components, or a different arrangement of components.

[0145] The processor and transceiver described in this application can be implemented on integrated circuits (ICs), analog ICs, radio frequency integrated circuits, mixed-signal ICs, application-specific integrated circuits (ASICs), printed circuit boards (PCBs), electronic devices, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal-oxide semiconductors (CMOS), n-metal-oxide-semiconductor (NMOS), positive-channel metal-oxide semiconductors (PMOS), bipolar junction transistors (BJTs), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.

[0146] Figure 14 This is a schematic diagram of a routing device provided in an embodiment of this application. This routing device is applicable to the scenarios shown in the above method embodiments. For ease of explanation, Figure 14Only the main components of the routing device are shown, including a processor, a memory, a control circuit, and input and output devices. The processor is mainly used for processing communication protocols and communication data, executing software programs, and processing data of the software programs. The memory is mainly used for storing software programs and data. The control circuit is mainly used for power supply and transmission of various electrical signals. The input and output devices are mainly used for receiving user input data and outputting data to the user.

[0147] When the routing device is a routing node, the control circuit can be a mainboard, the memory includes a hard disk, a RAM, a ROM, and other storage media, the processor can include a baseband processor and a central processor, the baseband processor is mainly used for processing communication protocols and communication data, and the central processor is mainly used for controlling the entire routing device, executing software programs, and processing data of the software programs. The input and output devices include a display screen, a keyboard, a mouse, and the like. The control circuit can further include or be connected to a transceiver circuit or a transceiver, such as a network interface, for transmitting or receiving data or signals, such as data transmission and communication with other devices. Further, an antenna can be included for wireless signal transmission and reception, for data / signal transmission with other devices.

[0148] According to the method provided in the embodiments of the present application, the present application also provides a computer program product, which includes computer program codes, and when the computer program codes run on a computer, the computer executes the method provided in any of the embodiments of the present application.

[0149] The embodiments of the present application also provide a computer readable storage medium. All or part of the processes of the above method embodiments can be executed by a computer or a device with routing capability to control relevant hardware to complete the processes. The computer program or the set of instructions can be stored in the computer readable storage medium, and when executed, the computer program or the set of instructions can include the processes of the above method embodiments. The computer readable storage medium can be an internal storage unit of the routing node, such as a hard disk or a memory of the routing node. The computer readable storage medium can also be an external storage device of the routing node, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. Further, the computer readable storage medium can include both the internal storage unit and the external storage device of the routing node. The computer readable storage medium is used to store the computer program or the instructions and other programs and data required by the routing node. The computer readable storage medium can also be used to temporarily store data that has been output or will be output.

[0150] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0151] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the device described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0152] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0153] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0154] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit.

[0155] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, and various media that can store program codes.

[0156] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A routing method characterized by, The method comprises: receiving a packet; if a receiving node of the packet is an intermediate node or the receiving node is a directly connected node of a source node of the packet, determining a target relative position of a first node and a second node in a target two-dimensional plane; allocating a preset virtual channel corresponding to the target relative position as a virtual channel of the packet; sending the packet through the virtual channel allocated to the packet; wherein the intermediate node is located between the source node and a destination node of the packet, when the receiving node is the intermediate node, the first node is the destination node, and the second node is the intermediate node; when the receiving node is a directly connected node of the source node, the first node is the intermediate node, and the second node is the source node.

2. The method of claim 1, wherein, When the receiving node is the intermediate node, the determination of the target relative position of the first node and the second node in the target two-dimensional plane comprises: when both a previous hop direction and a next hop direction of the packet belong to the target two-dimensional plane, determining the target relative position of the first node and the second node in the target two-dimensional plane.

3. The method of claim 2, wherein, The method further comprises: when one of the previous hop direction and the next hop direction of the packet does not belong to the target two-dimensional plane, switching the virtual channel of the packet.

4. The method according to claim 2 or 3, characterized in that, The method further comprises: when the receiving node is connected to the next hop of the packet across a ring, switching the virtual channel of the packet.

5. The method according to any one of claims 1 to 4, characterized in that, The network in which the packet is located comprises a first preset virtual channel and a second preset virtual channel, the relative position range corresponding to the first preset virtual channel is (0, k / 2] or (﹣k, ﹣k / 2], and the relative position range corresponding to the second preset virtual channel is (﹣k / 2, 0] or (k / 2, k); wherein a target dimension belongs to the target two-dimensional plane, and k represents the length of the target dimension.

6. The method according to any one of claims 1 to 5, characterized in that, The network in which the packet is located is a torus network.

7. The method according to any one of claims 1 to 6, characterized in that, The allocation of the preset virtual channel corresponding to the target relative position as the virtual channel of the packet comprises: allocating the preset virtual channel corresponding to the target relative position in an allocation rule as the virtual channel of the packet; The allocation rule comprises a relative position range corresponding to each preset virtual channel.

8. A routing device, characterized by The apparatus comprises: a transceiver module for receiving a packet; a processing module for determining a target relative position of a first node and a second node in a target two-dimensional plane if a receiving node of the packet is an intermediate node or the receiving node is a directly connected node of a source node of the packet; the processing module is further configured to allocate a preset virtual channel corresponding to the target relative position as a virtual channel of the packet; the transceiver module is further configured to send the packet through the virtual channel allocated to the packet; The intermediate node is located between the source node and a destination node of the packet, the first node is the destination node and the second node is the intermediate node when the receiving node is the intermediate node; the first node is the intermediate node and the second node is the source node when the receiving node is a directly connected node of the source node.

9. A routing device, characterized by The apparatus comprises: one or more processors; a memory for storing one or more computer programs or instructions; when the one or more computer programs or instructions are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 7.

10. A communications network, characterized by The communication network comprises: a sending node, a receiving node and at least one routing node; the sending node is configured to send a packet to the routing node; the routing node is configured to implement the method of any one of claims 1 to 7; the receiving node is configured to receive the packet sent by the routing node.

11. A computer readable storage medium, characterized in that, the computer readable storage medium stores a program code, and the program code is executed by a processor to implement the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Self-adaptive routing method for data packets in two-dimensional Mesh network and electronic equipment

    CN110048947A

  • Method, apparatus and computer storage medium for deadlock-free adaptive routing in two-dimensional mesh network based on the overlapping virtual network partitioning scheme

    US11303559B1