Topological structure, routing method and device of multi-dimensional hypercube interconnection network
By dividing the molecular network in the multi-dimensional hypercube interconnection network and adjusting the node connection method, the problem of network communication delay is solved, and the effect of reducing network diameter and improving information transmission efficiency is achieved.
Patent Information
- Application Number
- CN202510494824.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-06-20
AI Technical Summary
The network communication delay of multi-dimensional hypercube interconnection networks is large, affecting the efficiency of information transmission.
The network diameter is shortened by dividing the network nodes in the multi-dimensional hypercube interconnected network into subnets and dividing the node set into a first set of ring-connected nodes and a second set of directly connected nodes in each subnet.
The network diameter of each target subnet is reduced, thereby reducing the network communication delay of the entire interconnection network and improving information transmission efficiency.
Smart Images

Figure CN120186083A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of computers, and more specifically, to a topological structure, a routing method, and a device for a multi-dimensional hypercube interconnection network. Background Art
[0002] An interconnection network is the key to constructing a high-performance large-scale parallel processing system, and its design goal is to connect a certain number of functional nodes together to form a cost-effective large-scale parallel system as reliably and efficiently as possible at a relatively low cost. Currently, a hypercube method is used to construct the topological structure in the interconnection network. However, due to the relatively large network diameter in the current multi-dimensional hypercube interconnection network, the network communication delay is relatively large, seriously affecting the transmission efficiency of information between nodes.
[0003] In view of the problem of relatively large network communication delay in the multi-dimensional hypercube interconnection network in the related art, no effective solution has been proposed yet. Summary of the Invention
[0004] Embodiments of the present application provide a topological structure, a routing method, and a device for a multi-dimensional hypercube interconnection network, so as to at least solve the problem of relatively large network communication delay in the multi-dimensional hypercube interconnection network in the related art.
[0005] According to an embodiment of the present application, a topological structure of a multi-dimensional hypercube interconnection network is provided, including:
[0006] The multi-dimensional hypercube interconnection network includes 2 N network nodes, where N is the dimension of the multi-dimensional hypercube interconnection network, and the multi-dimensional hypercube interconnection network is divided into 2 N-3 sub-networks, where N is a positive integer greater than 2;
[0007] Each of the 2 N-3 sub-networks serves as a target sub-network and includes 8 target network nodes. The 8 target network nodes included in the target sub-network are divided into a first node set and a second node set. Each of the first node set and the second node set includes 4 target network nodes, and the 4 target network nodes in the first node set are connected to the 4 target network nodes in the second node set in a one-to-one correspondence;
[0008] The 4 target network nodes in the first node set are sequentially connected in a ring. The 4 target network nodes in the second node set include a first network node, a second network node, a third network node, and a fourth network node. The first network node is connected to the third network node and the fourth network node, and the second network node is connected to the third network node and the fourth network node.
[0009] As an alternative implementation, when N is greater than 3, the multi-dimensional hypercube interconnection network is divided into at least two sub-networks, the at least two sub-networks are connected in sequence, the eight target network nodes included in the target sub-network are connected to the eight reference network nodes included in the reference sub-network in a one-to-one correspondence, and the reference sub-network is the sub-network adjacent to the target sub-network in the connection of the at least two sub-networks.
[0010] As an alternative implementation, the identifiers of the two N network nodes are N-bit binary numbers. The highest N - 3 bits of the identifiers of the network nodes on the same sub-network are the same. The lowest three bits of the identifier of the target network node are the same as those of the directly connected reference network node, and there is exactly one bit difference between the identifier of the target network node and the identifier of the directly connected reference network node.
[0011] As an alternative implementation, in each sub-network, the third bit from the right of the identifiers of the network nodes in the first node set is the same, the third bit from the right of the identifiers of the network nodes in the second node set is the same, and the third bit from the right of the identifiers of the network nodes in the first node set is different from the third bit from the right of the identifiers of the network nodes in the second node set.
[0012] As an alternative implementation, in each sub-network, the third bit from the right of the identifiers of the network nodes in the first node set is 1, and the third bit from the right of the identifiers of the network nodes in the second node set is 0.
[0013] As an alternative implementation, when N is 3, the identifiers of the two N network nodes are three-bit binary numbers, and the highest bits of the identifiers of the network nodes in the same node set are the same.
[0014] As an alternative implementation, the highest bit of the identifier of the network node in the first node set is 1, and the highest bit of the identifier of the network node in the second node set is 0.
[0015] As an alternative implementation, the results of the bitwise exclusive OR operations of the identifiers of the network nodes in the first node set with 001, 010, and 100 respectively are the identifiers of the three directly connected network nodes;
[0016] The results of the bitwise exclusive OR operations of the identifiers of the network nodes in the second node set with 011, 010, and 100 respectively are the identifiers of the three directly connected network nodes.
[0017] As an alternative implementation, the four target network nodes in the first node set include a fifth network node, a sixth network node, a seventh network node, and an eighth network node;
[0018] The fifth network node is connected to the first network node, the sixth network node is connected to the second network node, the seventh network node is connected to the third network node, and the eighth network node is connected to the fourth network node;
[0019] The fifth network node is connected to the sixth network node, the sixth network node is connected to the seventh network node, the seventh network node is connected to the eighth network node, and the eighth network node is connected to the fifth network node.
[0020] As an alternative implementation, each target network node is set to allow one-hop routing to three target network nodes connected in the target subnetwork;
[0021] Each target network node is set to allow two-hop routing to four target network nodes not connected in the target subnetwork.
[0022] According to another embodiment of the present application, a routing method for a multi-dimensional hypercube interconnection network is provided, which is applied to the topological structure of the above multi-dimensional hypercube interconnection network. The routing method is used to route from a starting routing node in the target subnetwork to a final routing node in the target subnetwork. The routing method includes:
[0023] Obtain the starting node identifier of the starting routing node and the final node identifier of the final routing node;
[0024] According to the starting node identifier, the final node identifier, and the node set where the starting routing node is located, calculate the shortest routing path from the starting routing node to the final routing node to obtain a target routing path;
[0025] Route from the starting routing node to the final routing node according to the target routing path.
[0026] As an alternative implementation, the step of calculating the shortest routing path from the starting routing node to the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located to obtain a target routing path includes:
[0027] According to the starting node identifier, the final node identifier, and the node set where the starting routing node is located, determine the connection relationship between the starting routing node and the final routing node;
[0028] Calculate the shortest routing path as the target routing path according to the connection relationship and the node set where the starting routing node is located.
[0029] As an alternative implementation, the determining the connection relationship between the starting routing node and the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located includes:
[0030] Perform a bitwise exclusive OR operation on the starting node identifier and the final node identifier to obtain an operation result;
[0031] Determine the connection relationship according to the operation result and the node set where the starting routing node is located.
[0032] As an alternative implementation, when N is 3, the highest bit of the identifier of the network nodes in the first node set is 0, and the highest bit of the identifier of the network nodes in the second node set is 1, the determining the connection relationship according to the operation result and the node set where the starting routing node is located includes:
[0033] When the starting routing node is in the first node set and the operation result is one of 001, 010, and 100, determine that the connection relationship is a direct connection between the starting routing node and the final routing node;
[0034] When the starting routing node is in the second node set and the operation result is one of 011, 010, and 100, determine that the connection relationship is a direct connection between the starting routing node and the final routing node;
[0035] When the starting routing node is in the first node set and the operation result is a value other than 001, 010, and 100, determine that the connection relationship is not a direct connection between the starting routing node and the final routing node;
[0036] When the starting routing node is in the second node set and the operation result is a value other than 011, 010, and 100, determine that the connection relationship is not a direct connection between the starting routing node and the final routing node.
[0037] As an alternative implementation, the calculating the shortest routing path as the target routing path according to the connection relationship and the node set where the starting routing node is located includes:
[0038] When the connection relationship is a direct connection between the starting routing node and the final routing node, determine that the target routing path is to directly route to the final routing node;
[0039] When the connection relationship is not a direct connection between the starting routing node and the final routing node, determine the next hop according to the operation result and the node set where the starting routing node is located; determine the final routing node as the last hop, where the target routing path includes the next hop and the last hop.
[0040] As an optional implementation manner, when N is 3, the highest bit of the identifier of the network nodes in the first node set is 0, and the highest bit of the identifier of the network nodes in the second node set is 1, the determining the next hop according to the operation result and the node set where the starting routing node is located includes:
[0041] When the starting routing node is in the first node set and the operation result is 110 or 011, or when the starting routing node is in the second node set and the operation result is 110, split the operation result into two one-hot encodings; randomly select a target one-hot encoding from the two one-hot encodings; perform a bitwise exclusive OR operation on the starting node identifier and the target one-hot encoding to obtain the identifier of the next hop;
[0042] When the starting routing node is in the first node set and the operation result is 101, split the operation result into 001 and 100; perform a bitwise exclusive OR operation on the starting node identifier and 001 to obtain the identifier of the next hop, where the result of performing a bitwise exclusive OR operation on the identifier of the next hop and 100 is the final node identifier;
[0043] When the starting routing node is in the second node set and the operation result is 101, split the operation result into 100 and 001; perform a bitwise exclusive OR operation on the starting node identifier and 100 to obtain the identifier of the next hop, where the result of performing a bitwise exclusive OR operation on the identifier of the next hop and 001 is the final node identifier;
[0044] When the starting routing node is in the second node set and the operation result is 001, split the operation result into 010 and 011; randomly select a target encoding from 010 and 011; perform a bitwise exclusive OR operation on the starting node identifier and the target encoding to obtain the identifier of the next hop;
[0045] When the starting routing node is in the first node set and the operation result is 111, split the operation result into 100 and 011; perform a bitwise exclusive OR operation on the starting node identifier and 100 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 011 is the final node identifier.
[0046] When the starting routing node is in the second node set and the operation result is 111, split the operation result into 011 and 100; perform a bitwise exclusive OR operation on the starting node identifier and 011 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 100 is the final node identifier.
[0047] According to another embodiment of the present application, there is provided a routing device for a multi-dimensional hypercube interconnection network, which is applied to the topological structure of the above-mentioned multi-dimensional hypercube interconnection network. The routing device is used to route from the target sub-network to the target sub-network or the reference sub-network. The device includes:
[0048] An acquisition module, configured to acquire the starting node identifier of the starting routing node and the final node identifier of the final routing node;
[0049] A calculation module, configured to calculate the shortest routing path from the starting routing node to the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located, to obtain a target routing path;
[0050] A routing module, configured to route from the starting routing node to the final routing node according to the target routing path.
[0051] According to another embodiment of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any one of the above method embodiments when running.
[0052] According to another embodiment of the present application, there is also provided an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0053] According to another embodiment of the present application, there is also provided a computer program product, including a computer program, which realizes the steps in any one of the above method embodiments when executed by a processor.
[0054] With this application, for each target sub-network, the eight target network nodes it includes are divided into a first node set and a second node set. Among the four target network nodes in the first node set, they are connected in sequence to form a ring. The four target network nodes in the second node set include a first network node, a second network node, a third network node, and a fourth network node. By connecting the first network node to the third network node and the fourth network node, and the second network node to the third network node and the fourth network node, the network diameter among the eight target network nodes in each target sub-network is reduced from the traditional 3 to 2 in this connection mode, thereby reducing the network diameter of each target sub-network and further reducing the network diameter of the entire interconnected network. Therefore, the technical problem of relatively large network communication delay in a multi-dimensional hypercube interconnected network can be solved, achieving the technical effect of reducing the network communication delay of the multi-dimensional hypercube interconnected network. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 is a structural block diagram of a topology structure of a multi-dimensional hypercube interconnected network according to an embodiment of the present application;
[0056] Figure 2 is a structural block of a topology structure of a three-dimensional hypercube interconnected network according to an embodiment of the present application Figure 1 ;
[0057] Figure 3 is a structural block of a topology structure of a three-dimensional hypercube interconnected network according to an embodiment of the present application Figure 2 ;
[0058] Figure 4 is a flowchart of a routing method for a multi-dimensional hypercube interconnected network according to an embodiment of the present application Figure 1 ;
[0059] Figure 5 is a schematic diagram of a routing process in a ring topology structure according to an embodiment of the present application;
[0060] Figure 6 is a flowchart of a routing method for a multi-dimensional hypercube interconnected network according to an embodiment of the present application Figure 2 ;
[0061] Figure 7 is a schematic diagram of a routing process in a ring topology structure according to an embodiment of the present application Figure 1 ;
[0062] Figure 8 is a schematic diagram of a routing process in a ring topology structure according to an embodiment of the present application Figure 2 ;
[0063] Figure 9Schematic of the routing process in a ring topology according to an embodiment of the present application Figure 3 ;
[0064] Figure 10 Flow chart of a routing method for a multi-dimensional hypercube interconnection network according to an embodiment of the present application Figure 3 ;
[0065] Figure 11 Schematic diagram of the path label of a transmission path according to an embodiment of the present application;
[0066] Figure 12 Schematic of a routing path according to an embodiment of the present application Figure 1 ;
[0067] Figure 13 Schematic of the routing process in a ring topology according to an embodiment of the present application Figure 4 ;
[0068] Figure 14 Schematic of the routing process in a ring topology according to an embodiment of the present application Figure 5 ;
[0069] Figure 15 Schematic of the routing process in a ring topology according to an embodiment of the present application Figure 6 ;
[0070] Figure 16 Schematic of a routing path according to an embodiment of the present application Figure 2 ;
[0071] Figure 17 Schematic of the routing process in a ring topology according to an embodiment of the present application Figure 7 ;
[0072] Figure 18 Schematic of the routing process in a ring topology according to an embodiment of the present application Figure 8 ;
[0073] Figure 19 Schematic of the routing process in a ring topology according to an embodiment of the present application Figure 9 ;
[0074] Figure 20 Structure block diagram of the topology of a four-dimensional hypercube interconnection network according to an embodiment of the present application;
[0075] Figure 21 Structure block diagram of an inner three-dimensional cube according to an embodiment of the present application
[0076] Figure 22It is a structural block diagram of an outer - layer three - dimensional cube according to an embodiment of the present application;
[0077] Figure 23 It is a schematic diagram of a routing method for a four - dimensional hypercube interconnection network according to an embodiment of the present application;
[0078] Figure 24 It is a structural block diagram of a topological structure of an interconnection network according to an embodiment of the present application;
[0079] Figure 25 It is a schematic of a routing method for an interconnection network according to an embodiment of the present application Figure 1 ;
[0080] Figure 26 It is a schematic of the construction process of a topological structure of an interconnection network according to an embodiment of the present application Figure 1 ;
[0081] Figure 27 It is a schematic of the construction process of a topological structure of an interconnection network according to an embodiment of the present application Figure 2 ;
[0082] Figure 28 It is a schematic of a routing method for an interconnection network according to an embodiment of the present application Figure 2 ;
[0083] Figure 29 It is a structural block diagram of a routing device for a multi - dimensional hypercube interconnection network according to an embodiment of the present application. Detailed implementation manners
[0084] In the following, embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with the embodiments.
[0085] It should be noted that the terms "first", "second", etc. in the specification, claims and the above - mentioned drawings of the present application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0086] In this embodiment, a topological structure of a multi - dimensional hypercube interconnection network is provided. Figure 1 It is a structural block diagram of a topological structure of a multi - dimensional hypercube interconnection network according to an embodiment of the present application. As Figure 1 shown, the multi - dimensional hypercube interconnection network includes 2 N network nodes, where N is the dimension of the multi - dimensional hypercube interconnection network, and the multi - dimensional hypercube interconnection network is divided into 2 N-3 sub - networks, and N is a positive integer greater than 2; 2 N-3Each sub-network in the sub-networks serves as the target sub-network 10 and includes 8 target network nodes (10-0 to 10-7). The 8 target network nodes included in the target sub-network are divided into a first node set and a second node set. The first node set and the second node set each include 4 target network nodes. The 4 target network nodes in the first node set are connected to the 4 target network nodes in the second node set in a one-to-one correspondence; the 4 target network nodes (10-4 to 10-7) in the first node set are connected in sequence to form a ring. The 4 target network nodes in the second node set include the first network node 10-0, the second network node 10-1, the third network node 10-2, and the fourth network node 10-3. The first network node 10-0 is connected to the third network node 10-2 and the fourth network node 10-3. The second network node 10-1 is connected to the third network node 10-2 and the fourth network node 10-3.
[0087] With this topology, for each target sub-network, the 8 target network nodes it includes are divided into a first node set and a second node set. The 4 target network nodes in the first node set are connected in sequence to form a ring. The 4 target network nodes in the second node set include the first network node, the second network node, the third network node, and the fourth network node. By connecting the first network node to the third network node and the fourth network node, and connecting the second network node to the third network node and the fourth network node, the network diameter between the 8 target network nodes in each target sub-network is reduced from the traditional 3 to 2 in this connection mode, thereby reducing the network diameter of each target sub-network, and further reducing the network diameter of the entire interconnected network. Therefore, the technical problem of relatively large network communication delay in the multi-dimensional hypercube interconnected network can be solved, and the technical effect of reducing the network communication delay of the multi-dimensional hypercube interconnected network can be achieved.
[0088] The interconnection network has the following aspects of information: First is the topology of the interconnection network, second is the routing algorithm and switching technology of the interconnection network, and in addition is the performance metrics of the interconnection network. The topology of the interconnection network refers to the connection structure between network nodes in the interconnection network. In a telecommunications network, a node is a connection point, representing a redistribution point or a communication endpoint (some terminal devices). Routing refers to the process at the network level that determines the end-to-end path when a packet travels from the source to the destination. The interconnection network usually has the following four main performance metrics: One is the node degree, which represents the number of channels connecting a node to its neighbor nodes, or the number of ports of the router in the node. Two is the network diameter, which represents the maximum value of the shortest distance between two nodes in the network. The smaller the network diameter, the smaller the network communication delay. Three is the number of links, which represents the number of links in the entire network. Since the topology is determined, the number of links is also determined accordingly. Four is the bisection bandwidth. The network nodes are divided into two equal subnets, and the link bandwidth corresponding to the minimum cut set is the bisection bandwidth. The higher the bisection bandwidth, the stronger the network communication ability.
[0089] In this embodiment, the network nodes may but are not limited to including terminal nodes. A terminal node is any system or a set of units with communication requirements. It can be a processor, a processor and a memory, a graphics processing unit, a storage controller, an I / O interface, etc.
[0090] In this embodiment, the multi-dimensional hypercube interconnection network may but is not limited to be applied to any network transmission system, such as: the switch chip of a server, a database, a distributed system, etc.
[0091] In this embodiment, the topology of the above multi-dimensional hypercube interconnection network has symmetry, regularity, path diversity, and scalability.
[0092] In an alternative example, when N is greater than 3, the multi-dimensional hypercube interconnection network is divided into at least 2 sub-networks. The at least 2 sub-networks are connected in sequence. The 8 target network nodes included in the target sub-network are connected to the 8 reference network nodes included in the reference sub-network in a one-to-one correspondence. The reference sub-network is the sub-network adjacent to the target sub-network in the connection of the at least 2 sub-networks.
[0093] For example: Taking N as 5 as an example, as Figure 1 shown, the multi-dimensional hypercube interconnection network includes 32 network nodes. Taking the multi-dimensional hypercube interconnection network being divided into 4 sub-networks as an example, the network nodes at the same position in adjacent sub-networks are connected to each other.
[0094] The improved multi-dimensional hypercube interconnection network described above has a shorter network diameter compared to the traditional multi-dimensional hypercube interconnection network, which can effectively reduce network transmission delay. And the routing algorithm logic applicable to the improved multi-dimensional hypercube interconnection network under this topology is simpler and easier to implement in hardware.
[0095] In an optional example, the network nodes can be, but are not limited to, identified in the following way: N The identifier of a network node is an N-bit binary number. The highest N - 3 bits of the identifiers of the network nodes on the same sub-network are the same. The lowest three bits of the identifier of the target network node are the same as those of the directly connected reference network node, and there is exactly one bit difference between the identifier of the target network node and that of the directly connected reference network node.
[0096] Optionally, in this embodiment, in each sub-network, the third bit from the bottom of the identifiers of the network nodes in the first node set is the same, the third bit from the bottom of the identifiers of the network nodes in the second node set is the same, and the third bit from the bottom of the identifiers of the network nodes in the first node set is different from the third bit from the bottom of the identifiers of the network nodes in the second node set.
[0097] Optionally, in this embodiment, in each sub-network, the third bit from the bottom of the identifiers of the network nodes in the first node set is 1, and the third bit from the bottom of the identifiers of the network nodes in the second node set is 0.
[0098] Identifying the network nodes in the above way makes the node identifiers of the network nodes in the same node set have a certain pattern, which is easy to implement the routing algorithm.
[0099] When N is 3, the multi-dimensional hypercube interconnection network includes 8 network nodes, and the 8 network nodes form 1 sub-network. Figure 2 It is a structural block diagram of the topology of a three-dimensional hypercube interconnection network according to an embodiment of the present application. Figure 1 As Figure 2 shown, 1 sub-network, as the target sub-network, includes 8 target network nodes (0 to 7). The 8 target network nodes included in the target sub-network are divided into a first node set and a second node set. The first node set and the second node set each include 4 target network nodes. The 4 target network nodes in the first node set are connected to the 4 target network nodes in the second node set in one-to-one correspondence; the 4 target network nodes (4 to 7) in the first node set are connected in sequence to form a ring. The 4 target network nodes in the second node set include a first network node 0, a second network node 1, a third network node 2, and a fourth network node 3. The first network node 0 is connected to the third network node 2 and the fourth network node 3. The second network node 1 is connected to the third network node 2 and the fourth network node 3.
[0100] In an optional example, when N is 3, 2 N identifications of network nodes are three - bit binary numbers, and the most significant bits of the identifications of network nodes in the same node set are the same.
[0101] Optionally, in this embodiment, the most significant bit of the identification of network nodes in the first node set is 1, and the most significant bit of the identification of network nodes in the second node set is 0.
[0102] Optionally, in this embodiment, the operation results of performing bit - wise exclusive - OR operations on the identifications of network nodes in the first node set with 001, 010, and 100 respectively are the identifications of 3 directly - connected network nodes; the operation results of performing bit - wise exclusive - OR operations on the identifications of network nodes in the second node set with 011, 010, and 100 respectively are the identifications of 3 directly - connected network nodes.
[0103] Optionally, in this embodiment, the 4 target network nodes in the first node set include the fifth network node, the sixth network node, the seventh network node, and the eighth network node; the fifth network node is connected to the first network node, the sixth network node is connected to the second network node, the seventh network node is connected to the third network node, and the eighth network node is connected to the fourth network node; the fifth network node is connected to the sixth network node, the sixth network node is connected to the seventh network node, the seventh network node is connected to the eighth network node, and the eighth network node is connected to the fifth network node.
[0104] Figure 3 is a structural frame of a topological structure of a three - dimensional hypercube interconnection network according to an embodiment of the present application Figure 2 , as Figure 3 shown, the 4 target network nodes (4 to 7) in the first node set are sequentially encoded as 100, 101, 110, and 111, and among the 4 target network nodes in the second node set, the first network node 0 is encoded as 000, the second network node 1 is encoded as 001, the third network node 2 is encoded as 010, and the fourth network node 3 is encoded as 011.
[0105] Optionally, in this embodiment, each target network node is set to allow one - hop routing to 3 target network nodes connected in the target sub - network; each target network node is set to allow two - hop routing to 4 target network nodes not connected in the target sub - network.
[0106] For the four routing nodes 100, 101, 110, and 111, by performing bitwise exclusive OR (XOR) of the binary numbers of each routing node with 001, 010, and 100 in sequence, the routing nodes directly connected to it can be obtained. For example, for the routing node 101, by performing bitwise XOR of its binary number with 001, 010, and 100 in sequence, 100, 111, and 001 are obtained, and these three nodes are exactly the four routing nodes directly connected to 101.
[0107] For the four routing nodes 000, 001, 010, and 011, by performing bitwise exclusive OR (XOR) of the binary numbers of each routing node with 011, 010, and 100 in sequence, the routing nodes directly connected to it can be obtained. For example, for the routing node 010, by performing bitwise XOR of its binary number with 011, 010, and 100 in sequence, 001, 000, and 110 are obtained, and these three nodes are exactly the four routing nodes directly connected to 010.
[0108] For the four routing nodes 100, 101, 110, and 111: The link relationships of each routing node with the other seven routing nodes are as follows: First, by performing XOR with 001, 010, and 100, three routing nodes directly connected to it can be obtained; three adjacent routing nodes can be directly reached in one hop. For example, for the routing node 100, by performing XOR with 001, 010, and 100, the routing nodes 101, 110, and 000 are directly connected and can be directly routed. In addition, by performing XOR with 101, 011, 110, and 111, four routing nodes can be obtained, and these four routing nodes can be reached in two hops; for example, for the routing node 100, by performing XOR with 101, 011, 110, and 111, the four routing nodes 001, 111, 010, and 011 are obtained, and these four routing nodes can be reached in two hops.
[0109] For the four routing nodes 000, 001, 010, and 011: The link relationships of each routing node with the other seven routing nodes are as follows: First, by performing XOR with 011, 010, and 100, three routing nodes directly connected to it can be obtained; three adjacent routing nodes can be directly reached in one hop. For example, for the routing node 001, by performing XOR with 011, 010, and 100, the routing nodes 010, 011, and 101 are directly connected and can be directly routed. In addition, by performing XOR with 101, 001, 110, and 111, four routing nodes can be obtained, and these four routing nodes can be reached in two hops; for example, for the routing node 001, by performing XOR with 101, 001, 110, and 111, the four routing nodes 100, 000, 111, and 110 are obtained, and these four routing nodes can be reached in two hops.
[0110] In the above improved three-dimensional hypercube interconnection network, the network diameter between routing nodes is 2.
[0111] In this embodiment, a routing method for a multi-dimensional hypercube interconnection network is further provided, which is applied to the topological structure of the above multi-dimensional hypercube interconnection network. This routing method is used to route from the starting routing node in the target sub-network to the final routing node in the target sub-network. Figure 4 It is the flow of a routing method for a multi-dimensional hypercube interconnection network according to an embodiment of the present application. Figure 1 , such as Figure 4 shown, this flow includes the following steps:
[0112] Step S402, obtain the starting node identifier of the starting routing node and the final node identifier of the final routing node;
[0113] Step S404, calculate the shortest routing path from the starting routing node to the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located, and obtain the target routing path;
[0114] Step S406, route from the starting routing node to the final routing node according to the target routing path.
[0115] Through the above steps, for each target sub-network, the 8 target network nodes included therein are divided into a first node set and a second node set. The 4 target network nodes in the first node set are connected in a ring in sequence. The 4 target network nodes in the second node set include a first network node, a second network node, a third network node, and a fourth network node. By connecting the first network node with the third network node and the fourth network node, and the second network node with the third network node and the fourth network node, the network diameter between the 8 target network nodes in each target sub-network is reduced from the traditional 3 to 2 in this connection mode, thereby reducing the network diameter of each target sub-network, and further reducing the network diameter of the entire interconnection network. When routing in each target sub-network, it is possible to route to other network nodes in at most two hops. Therefore, the technical problem of large network communication delay in the multi-dimensional hypercube interconnection network can be solved, and the technical effect of reducing the network communication delay of the multi-dimensional hypercube interconnection network can be achieved.
[0116] Optionally, in this embodiment, this routing method can be but is not limited to being deployed on each network node.
[0117] In an optional example, in the above step S404, the shortest routing path from the starting routing node to the final routing node can be calculated based on the starting node identifier, the final node identifier, and the node set where the starting routing node is located, in a manner that may include but is not limited to: determining the connection relationship between the starting routing node and the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located; calculating the shortest routing path as the target routing path according to the connection relationship and the node set where the starting routing node is located.
[0118] Optionally, in this embodiment, the connection relationship between the starting routing node and the final routing node can be determined first, and then the shortest routing path can be planned as the target routing path according to the connection relationship and the node set where the starting routing node is located.
[0119] In an optional example, the connection relationship between the starting routing node and the final routing node can be determined according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located, in a manner that may include but is not limited to: performing a bitwise exclusive OR operation on the starting node identifier and the final node identifier to obtain an operation result; determining the connection relationship according to the operation result and the node set where the starting routing node is located.
[0120] Optionally, in this embodiment, the connection relationship between the starting routing node and the final routing node can be determined according to the operation result between the node identifiers and the node set where the starting routing node is located, and the manner is not limited thereto.
[0121] In an optional example, when N is 3, the highest bit of the identifier of the network node in the first node set is 0, and the highest bit of the identifier of the network node in the second node set is 1, the connection relationship can be determined according to the operation result and the node set where the starting routing node is located, in a manner that may include but is not limited to: when the starting routing node is in the first node set and the operation result is one of 001, 010, and 100, determining that the connection relationship is a direct connection between the starting routing node and the final routing node; when the starting routing node is in the second node set and the operation result is one of 011, 010, and 100, determining that the connection relationship is a direct connection between the starting routing node and the final routing node; when the starting routing node is in the first node set and the operation result is a value other than 001, 010, and 100, determining that the connection relationship is not a direct connection between the starting routing node and the final routing node; when the starting routing node is in the second node set and the operation result is a value other than 011, 010, and 100, determining that the connection relationship is not a direct connection between the starting routing node and the final routing node.
[0122] In an optional example, but not limited to, the following method may be adopted to calculate the shortest routing path as the target routing path according to the connection relationship and the node set where the starting routing node is located: when the connection relationship is a direct connection between the starting routing node and the final routing node, determine that the target routing path is to directly route to the final routing node; when the connection relationship is that there is no direct connection between the starting routing node and the final routing node, determine the next hop according to the operation result and the node set where the starting routing node is located; determine the final routing node as the last hop, where the target routing path includes the next hop and the last hop.
[0123] Optionally, in this embodiment, if there is a direct connection between the starting routing node and the final routing node, the target routing path has only one hop, that is, the final routing node can be directly reached from the starting routing node. If there is no direct connection between the starting routing node and the final routing node, then the target routing path includes two hops. The next hop can be first determined according to the operation result and the node set where the starting routing node is located, and the final routing node is used as the last hop to obtain the target routing path.
[0124] In an optional example, when N is 3, the most significant bit of the identifier of the network nodes in the first node set is 0, and the most significant bit of the identifier of the network nodes in the second node set is 1, the following methods may be used, but are not limited to, to determine the next hop according to the operation result and the node set where the starting routing node is located: When the starting routing node is in the first node set and the operation result is 110 or 011, or when the starting routing node is in the second node set and the operation result is 110, split the operation result into two one-hot encodings; randomly select a target one-hot encoding from the two one-hot encodings; perform a bitwise exclusive OR operation on the starting node identifier and the target one-hot encoding to obtain the identifier of the next hop; When the starting routing node is in the first node set and the operation result is 101, split the operation result into 001 and 100; perform a bitwise exclusive OR operation on the starting node identifier and 001 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 100 is the identifier of the final node; When the starting routing node is in the second node set and the operation result is 101, split the operation result into 100 and 001; perform a bitwise exclusive OR operation on the starting node identifier and 100 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 001 is the identifier of the final node; When the starting routing node is in the second node set and the operation result is 001, split the operation result into 010 and 011; randomly select a target encoding from 010 and 011; perform a bitwise exclusive OR operation on the starting node identifier and the target encoding to obtain the identifier of the next hop; When the starting routing node is in the first node set and the operation result is 111, split the operation result into 100 and 011; perform a bitwise exclusive OR operation on the starting node identifier and 100 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 011 is the identifier of the final node; When the starting routing node is in the second node set and the operation result is 111, split the operation result into 011 and 100; perform a bitwise exclusive OR operation on the starting node identifier and 011 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 100 is the identifier of the final node.
[0125] Optionally, in this embodiment, one-hot encoding, also known as one-hot encoding, is a type of encoding where only one bit is 1, or in other words, only one bit is valid.
[0126] In an alternative embodiment, a routing algorithm for the topology of the three-dimensional hypercube interconnect network described above is provided. First, eight network nodes are grouped and labeled as follows: and N2 = {000, 001, 010, 011}. In this routing algorithm, for a routing request, the source routing node (i.e., the above-mentioned starting routing node) is denoted as S, and the destination routing node (i.e., the above-mentioned final routing node) is denoted as D. This routing algorithm may but is not limited to include the following steps:
[0127] Step 1: The source routing node S and the destination routing node D are bitwise XORed, and the result is denoted as I (equivalent to the above operation result).
[0128] Step 2: Determine the value of the source routing node S. If it belongs to N1, proceed to Step 3; if it belongs to N2, proceed to Step 4.
[0129] Step 3: Determine the value of I: If the value of I is one of 001, 010, 100, it means that the source routing node S and the destination routing node D are directly connected and can be directly routed.
[0130] If the value of I is one of 110, 011, split I into two one-hot encodings I = I1^I2, and then in a random manner, the two one-hot encodings are respectively XORed with the routing node S; the routing ends.
[0131] For example: If S is the routing node 100 and D is the routing node 111, after bitwise XOR, I = 011. Split I into two one-hot encodings I = I1^I2 = 001^010, and then in ascending order, the two one-hot encodings are respectively XORed with the routing node S:
[0132]
[0133] If the value of I is 101, split I, I = I1^I2 = 001^100, and I1 and I2 are sequentially XORed with the routing node S in order; the routing ends.
[0134] For example: If S is the routing node 100 and D is the routing node 001, after bitwise XOR, I = 101. Split I into two one-hot encodings I = I1^I2 = 001^100, and then in order, the two one-hot encodings are respectively XORed with the routing node S:
[0135]
[0136] If the value of I is 111, split I, I = I1^I2 = 100^011, and I1 and I2 are sequentially XORed with the routing node S in order; the routing ends.
[0137] For example: Let S be routing node 100 and D be routing node 011. After bitwise XOR, I = 111. Split I into two one-hot encodings I = I1^I2 = 001^100. Then, in sequential order, the two one-hot encodings are respectively XORed with routing node S:
[0138]
[0139] Step 4: Determine the value of I: If the value of I is one of 011, 010, 100, it means that the source routing node S is directly connected to the destination routing node D, and direct routing can be performed.
[0140] If the value of I is 110, split I into two one-hot encodings I = I1^I2 = 010^100. Then, in a random manner, the two one-hot encodings are respectively XORed with routing node S; routing ends.
[0141] For example: Let S be routing node 001 and D be routing node 111. After bitwise XOR, I = 110. Split I into two one-hot encodings I = I1^I2 = 010^100. Then, in a random manner, the two one-hot encodings are respectively XORed with routing node S:
[0142]
[0143] If the value of I is 101, split I into two one-hot encodings I = I1^I2 = 100^001. Then, in sequential order, the two one-hot encodings are respectively XORed with routing node S; routing ends.
[0144] For example: Let S be routing node 001 and D be routing node 101. After bitwise XOR, I = 101. Split I into two one-hot encodings I = I1^I2 = 100^001. Then, in sequential order, the two one-hot encodings are respectively XORed with routing node S:
[0145]
[0146] If the value of I is 001, split I into two encodings I = I1^I2 = 010^011. Then, in a random manner, the two one-hot encodings are respectively XORed with routing node S; routing ends.
[0147] For example: Let S be routing node 001 and D be routing node 000. After bitwise XOR, I = 001. Split I into two one-hot encodings I = I1^I2 = 010^011. Then, in a random manner, the two one-hot encodings are respectively XORed with routing node S:
[0148]
[0149] If the value of I is 111, split I into two encodings I = I1^I2 = 011^100, and then, in sequential order, perform exclusive OR (XOR) operations between the two one-hot encodings and the routing node S respectively; the routing process ends.
[0150] For example: If S is the routing node 001 and D is the routing node 110, after performing bitwise XOR, I = 111. Split I into two one-hot encodings I = I1^I2 = 011^100, and then, in sequential order, perform exclusive OR (XOR) operations between the two one-hot encodings and the routing node S respectively:
[0151]
[0152] In a ring topology structure, deadlock may occur during the routing process. For example: Figure 5 is a schematic diagram of the routing process in a ring topology structure according to an embodiment of the present application, as Figure 5 shown. Suppose there are four routing requests simultaneously, Request 1 to Request 4. Among them, Request 1: from network node 2 to network node 7; Request 2: from network node 3 to network node 6; Request 3: from network node 7 to network node 2; Request 4: from network node 6 to network node 3. When all these four routing requests need to pass through a network node and if all randomly select clockwise routing and have occupied the intermediate network node, a clockwise deadlock occurs. On the contrary, if all randomly select counterclockwise routing and have occupied the intermediate network node, a counterclockwise deadlock will occur.
[0153] To avoid the occurrence of the above deadlock phenomenon, in this embodiment, a routing method for a multi-dimensional hypercube interconnection network is further provided. The topology structure of the multi-dimensional hypercube interconnection network is any one of the above topology structures. This routing method is used to route from the starting routing node in the target sub-network to the final routing node in the target sub-network. Figure 6 is the flow of a routing method for a multi-dimensional hypercube interconnection network according to an embodiment of the present application Figure 2 , as Figure 6 shown. This flow includes the following steps:
[0154] Step S602: Detect the path information of the shortest routing path from the starting routing node to the final routing node according to the starting node identifier of the starting routing node, the final node identifier of the final routing node, and the node set where the starting routing node is located. Among them, the path information is used to indicate the number of routing hops of the shortest routing path;
[0155] Step S604: In the case where the path information indicates that the shortest routing path is a two-hop routing path, plan a target routing path according to the node set where the starting routing node is located and the node set where the final routing node is located. Among them, the target routing path is a routing path with at least two hops;
[0156] Step S606: Route from the starting routing node to the final routing node according to the target routing path.
[0157] Through the above steps, for each target sub-network, the 8 target network nodes included therein are divided into a first node set and a second node set. The 4 target network nodes in the first node set are connected in sequence to form a ring. The 4 target network nodes in the second node set include a first network node, a second network node, a third network node, and a fourth network node. By connecting the first network node to the third network node and the fourth network node, and connecting the second network node to the third network node and the fourth network node, the network diameter between the 8 target network nodes in each target sub-network is reduced from the traditional 3 to 2 in this connection mode. Thus, the network diameter of each target sub-network is reduced, and further the network diameter of the entire interconnected network is reduced. When routing in each target sub-network, it is possible to route to other network nodes in at most two hops. For the case where two hops are required for routing, the target routing path is planned according to the node set where the starting routing node is located and the node set where the final routing node is located. The planned target routing path is a routing path of at least two hops, thereby avoiding the phenomenon of deadlock in the planned target routing path. Therefore, the technical problem that deadlock may occur in the routing process in the related art can be solved, and the technical effect of avoiding deadlock in the routing process can be achieved.
[0158] In an optional example, in the above step S604, the target routing path can be planned according to the node set where the starting routing node is located and the node set where the final routing node is located in the following manner, but not limited to this: Determine the target set relationship between the starting routing node and the final routing node according to the node set where the starting routing node is located and the node set where the final routing node is located; Search for the target routing rule corresponding to the target set relationship from the set relationships and routing rules with corresponding relationships; Plan the target routing path according to the target routing rule.
[0159] Optionally, in this embodiment, there are different set relationships between the node set where the starting routing node is located and the node set where the final routing node is located. For example: both are in the first node set, both are in the second node set, are in different node sets respectively, and so on. Different set relationships are arranged with different routing rules, thereby avoiding the phenomenon of deadlock in the routing process.
[0160] In an optional example, the target set relationship between the starting routing node and the final routing node can be determined, but is not limited to, in the following manner based on the node set where the starting routing node is located and the node set where the final routing node is located: When the node set where the starting routing node is located is the first node set and the node set where the final routing node is located is the first node set, determine that the target set relationship is the first set relationship, where the first set relationship is used to indicate that the routing nodes are all located in the first node set; when the node set where the starting routing node is located is the second node set and the node set where the final routing node is located is the second node set, determine that the target set relationship is the second set relationship, where the second set relationship is used to indicate that the routing nodes are all located in the second node set; when the node set where the starting routing node is located is the first node set and the node set where the final routing node is located is the second node set, or when the node set where the starting routing node is located is the second node set and the node set where the final routing node is located is the first node set, determine that the target set relationship is the third set relationship, where the third set relationship is used to indicate that the routing nodes are located in different node sets.
[0161] Optionally, in this embodiment, the target routing rule corresponding to the target set relationship can be found from the set relationship and the routing rules with corresponding relationships, but is not limited to, in the following manner: When the target set relationship is the first set relationship, determine that the target routing rule is the first routing rule, where the first routing rule is used to indicate planning a routing path in the first node set according to the routing direction corresponding to the current starting routing node; when the target set relationship is the second set relationship, determine that the target routing rule is the second routing rule, where the second routing rule is used to indicate planning a routing path in the second node set according to the routing direction corresponding to the current starting routing node; when the target set relationship is the third set relationship, determine that the target routing rule is the third routing rule, where the third routing rule is used to indicate routing to the reference routing node directly connected to the starting routing node in the node set where the final routing node is located in the first hop and then using the reference routing node as the current starting routing node to plan a routing path according to the first routing rule or the second routing rule.
[0162] Optionally, in this embodiment, a routing request with a shortest path of two hops does not necessarily follow the shortest path. This routing rule can be, but is not limited to, referred to as Rule 1.
[0163] In an optional example, the target routing path can be planned according to the target routing rule in the following ways, but not limited thereto: when the target routing rule is the first routing rule, determine the target routing direction according to the starting node identifier; obtain the next-hop routing node in the first node set according to the target routing direction, and determine the final routing node as the last-hop routing node to obtain the target routing path.
[0164] Optionally, in this embodiment, when N is 3, and the identifiers of 2 N network nodes are three-bit binary numbers, and the highest bits of the identifiers of the network nodes in the first node set are all 0, and the highest bits of the identifiers of the network nodes in the second node set are all 1, the target routing direction can be determined according to the starting node identifier in the following ways, but not limited thereto: when the starting node identifier is 100 or 111, determine the target routing direction as the first routing direction; when the starting node identifier is 101 or 110, determine the target routing direction as the second routing direction, where the second routing direction is opposite to the first routing direction.
[0165] Optionally, in this embodiment, assume that the source routing node of the routing request is S (i.e., the above-mentioned starting routing node), and the destination routing node is D (i.e., the above-mentioned final routing node). Then, if both S and D are network nodes belonging to the outer layer (i.e., the above-mentioned first node set) and it takes two hops to complete the routing request, and at this time the exclusive OR operation result I of the identifiers is 011, then if S is 100 or 111, route counterclockwise, that is, the above-mentioned first routing direction can be but not limited to the counterclockwise direction. If S is 101 or 110, route clockwise, that is, the above-mentioned second routing direction can be but not limited to the clockwise direction.
[0166] The above routing rule can be but not limited to be called Rule 2. Rule 2 can ensure that there is no deadlock in the two-hop routing requests between the network nodes in the outer layer. For example, assume that there are four routing requests at the same time: Request 1: from routing node 100 to routing node 111; Request 2: from routing node 110 to routing node 101; Request 3: from routing node 111 to routing node 100; Request 4: from routing node 101 to routing node 110. Figure 7 is a schematic diagram of the routing process in a ring topology according to an embodiment of the present application Figure 1 as Figure 7 shown. When using Rule 2 for routing, when all these four routing requests need to pass through a routing node and the intermediate routing node has been occupied, no deadlock occurs.
[0167] Optionally, in this embodiment, the above-mentioned first routing direction can also be but not limited to the clockwise direction. In this case, the above-mentioned second routing direction can be but not limited to the counterclockwise direction.
[0168] In an alternative example, the target routing path can be planned according to the target routing rule in the following ways, but not limited thereto: when the target routing rule is the second routing rule, obtain the next-hop routing node from the second node set based on the starting routing node; determine the final routing node as the last-hop routing node to obtain the target routing path.
[0169] Optionally, in this embodiment, the next-hop routing node can be obtained from the second node set based on the starting routing node in the following ways, but not limited thereto: when the starting routing node is the first network node, determine the third network node as the next-hop routing node; when the starting routing node is the second network node, determine the fourth network node as the next-hop routing node; when the starting routing node is the third network node, determine the first network node as the next-hop routing node; when the starting routing node is the fourth network node, determine the second network node as the next-hop routing node.
[0170] Optionally, in this embodiment, if both S and D are four network nodes belonging to the inner layer (i.e., the above-mentioned second node set) and the routing request needs to pass through two hops to be completed, and at this time I is 001, then the first hop follows the diagonal routing first.
[0171] The above routing rule can be referred to as Rule 3, but not limited thereto. Rule 3 can ensure that no deadlock occurs in the two-hop routing requests between the network nodes in the inner layer. For example, assume there are four routing requests at the same time: Request 1: from routing node 000 to routing node 001; Request 2: from routing node 011 to routing node 010; Request 3: from routing node 010 to routing node 011; Request 4: from routing node 001 to routing node 000. Figure 8 It is a schematic diagram of the routing process in a ring topology structure according to an embodiment of the present application. Figure 2 , such as Figure 8 shown, when using Rule 3 for routing, when these four routing requests all need to pass through a routing node and all have occupied the intermediate routing node, no deadlock occurs.
[0172] In an alternative example, the target routing path can be planned according to the target routing rule in the following ways, but not limited thereto: when the target routing rule is the third routing rule, determine the reference routing node as the first-hop routing node; determine the reference routing direction in the node set where the reference routing node is located based on the reference routing node; plan the reference routing path from the reference routing node to the final routing node in the node set where the reference routing node is located according to the reference routing direction to obtain the target routing path.
[0173] Optionally, in this embodiment, when the reference routing node is located in the first node set, the reference routing direction in the node set where the reference routing node is located can be determined by, but not limited to, the following method: when the reference node identifier is 100 or 111, determine the reference routing direction as the third routing direction; when the reference node identifier is 101 or 110, determine the reference routing direction as the fourth routing direction, where the fourth routing direction is opposite to the third routing direction; where N is 3, 2 N The identifiers of the 2 network nodes are three-bit binary numbers. The highest bit of the identifiers of the network nodes in the first node set is 0, and the highest bit of the identifiers of the network nodes in the second node set is 1.
[0174] Optionally, in this embodiment, when the reference routing node is located in the second node set, the reference routing direction in the node set where the reference routing node is located can be determined by, but not limited to, the following method: when the reference routing node is the first network node, determine the direction where the third network node is located as the reference routing direction; when the reference routing node is the second network node, determine the direction where the fourth network node is located as the reference routing direction; when the reference routing node is the third network node, determine the direction where the first network node is located as the reference routing direction; when the reference routing node is the fourth network node, determine the direction where the second network node is located as the reference routing direction.
[0175] Optionally, in this embodiment, the reference routing path from the reference routing node to the final routing node can be planned in the node set where the reference routing node is located according to the reference routing direction by, but not limited to, the following method to obtain the target routing path: determine the routing node directly connected to the reference routing node in the reference routing direction as the routing node of the second hop; when the routing node of the second hop is the final routing node, determine the routing path that sequentially connects the starting routing node, the reference routing path, and the final routing node as the target routing path; when the routing node of the second hop is not the final routing node, determine the routing path that sequentially connects the starting routing node, the reference routing path, the routing node of the second hop, and the final routing node as the target routing path.
[0176] Optionally, in this embodiment, if one of S and D belongs to the outer layer nodes and the other belongs to the outer layer nodes, the first hop routes to the layer where D is located first, then updates S (that is, finds the reference routing node), and then routes according to rule 2 or 3.
[0177] The above routing rule can be, but is not limited to, referred to as Rule 4. Rule 4 can ensure that no deadlock occurs in the routing requests between the outer and inner nodes. For example, for the ring topology composed of routing nodes 110, 010, 000, and 100: Suppose there are four routing requests simultaneously: Request 1: from routing node 110 to routing node 000; Request 2: from routing node 010 to routing node 100; Request 3: from routing node 000 to routing node 110; Request 4: from routing node 100 to routing node 010. Figure 9 It is a schematic diagram of the routing process in a ring topology structure according to an embodiment of the present application. Figure 3 , such as Figure 9 shown. When using Rule 4 for routing and all these four routing requests need to pass through a routing node and have occupied the intermediate routing node, no deadlock occurs. The same applies to the ring topology composed of the routing nodes 011, 111, 101, and 001, which will not be elaborated here.
[0178] In an optional example, it can be, but is not limited to, detecting the path information of the shortest routing path from the starting routing node to the final routing node according to the starting node identifier of the starting routing node, the final node identifier of the final routing node, and the node set where the starting routing node is located in the following manner: determining the connection relationship between the starting routing node and the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located; and determining the path information according to the connection relationship.
[0179] Optionally, in this embodiment, it can be, but is not limited to, determining the connection relationship between the starting routing node and the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located in the following manner: performing a bitwise exclusive OR operation on the starting node identifier and the final node identifier to obtain an operation result; and determining the connection relationship according to the operation result and the node set where the starting routing node is located.
[0180] Optionally, in this embodiment, when N is 3, the highest bit of the identifier of the network nodes in the first node set is 0, and the highest bit of the identifier of the network nodes in the second node set is 1, the connection relationship can be determined according to the operation result and the node set where the starting routing node is located in the following ways, but not limited thereto: When the starting routing node is in the first node set and the operation result is one of 001, 010, and 100, it is determined that the connection relationship is a direct connection between the starting routing node and the final routing node; when the starting routing node is in the second node set and the operation result is one of 011, 010, and 100, it is determined that the connection relationship is a direct connection between the starting routing node and the final routing node; when the starting routing node is in the first node set and the operation result is a value other than 001, 010, and 100, it is determined that the connection relationship is not a direct connection between the starting routing node and the final routing node; when the starting routing node is in the second node set and the operation result is a value other than 011, 010, and 100, it is determined that the connection relationship is not a direct connection between the starting routing node and the final routing node.
[0181] Optionally, in this embodiment, the path information can be determined according to the connection relationship in the following ways, but not limited thereto: When the connection relationship is a direct connection between the starting routing node and the final routing node, it is determined that the path information is used to indicate that the shortest routing path is a one-hop routing path; when the connection relationship is not a direct connection between the starting routing node and the final routing node, it is determined that the path information is used to indicate that the shortest routing path is a two-hop routing path.
[0182] In an alternative embodiment, a routing algorithm applied to the topology of a three-dimensional hypercube interconnection network is provided. In this routing algorithm, the network nodes in the three-dimensional hypercube interconnection network are divided into N1 = {100, 101, 110, 111} and N2 = {000, 001, 010, 011}. For a routing request, the source routing node (i.e., the above-mentioned starting routing node) is denoted as S, and the destination routing node (i.e., the above-mentioned final routing node) is denoted as D. This routing algorithm can include the following steps, but not limited thereto:
[0183] The first step: The source routing node S and the destination routing node D are exclusive-ORed bit by bit, and the result is denoted as I.
[0184] The second step: Determine the value of the source routing node S. If it belongs to N1, go to the third step; if it belongs to N2, go to the fourth step.
[0185] The third step: Determine the value of I: If the value of I is one of 001, 010, and 100, it means that the source routing node S and the destination routing node D are directly connected and can be directly routed.
[0186] If the value of I is 011, route according to Rule 2. For example: S is the routing node 100, D is the routing node 111, after bitwise XOR, I = 011. Split I into two one-hot encodings I = I1^I2 = 001^100, and then in a counterclockwise manner, XOR the two one-hot encodings with the routing node S respectively:
[0187]
[0188] If the value of I is 101, route according to Rule 4. For example: S is the routing node 100, D is the routing node 001, after bitwise XOR, I = 101. First, route to the inner layer where D is located, and then update S:
[0189]
[0190] S new = 000;
[0191] Then update S to the routing node 000, D is the routing node 001. At this time, both S and D belong to the inner layer. After bitwise XOR, I = 001. Split I into two one-hot encodings I = I1^I2 = 010^011, and then in the manner of Rule 3, XOR the two one-hot encodings with the routing node S respectively:
[0192]
[0193] If the value of I is 110, route according to Rule 4. For example: S is the routing node 100, D is the routing node 010, after bitwise XOR, I = 110. First, route to the inner layer where D is located, and then update S:
[0194]
[0195] S new = 000;
[0196] Then update S to the routing node 000, D is the routing node 010. At this time, both S and D belong to the inner layer. After bitwise XOR, I = 010. The source routing node S is directly connected to the target routing node D and can be directly routed.
[0197] If the value of I is 111, route according to Rule 4. For example: S is the routing node 100, D is the routing node 0 11 , after bitwise XOR, I = 111. First, route to the inner layer where D is located, and then update S:
[0198]
[0199] S new = 000;
[0200] Then S is updated to routing node 000, and D is routing node 011. At this time, both S and D belong to the inner layer. After bitwise XOR, I = 011. The source routing node S and the destination routing node D are directly connected and can be directly routed.
[0201] Step 4: Determine the value of I: If the value of I is one of 011, 010, 100, it means that the source routing node S and the destination routing node D are directly connected and can be directly routed.
[0202] If the value of I is 110, route according to Rule 4. For example: S is routing node 000, D is routing node 11 0. After bitwise XOR, I = 110. First, route to the inner layer where D is located, and then update S:
[0203]
[0204] S new = 100;
[0205] Then S is updated to routing node 100, and D is routing node 110. At this time, both S and D belong to the outer layer. After bitwise XOR, I = 010. The source routing node S and the destination routing node D are directly connected and can be directly routed.
[0206] If the value of I is 101, route according to Rule 4. For example: S is routing node 000, D is routing node 101. After bitwise XOR, I = 101. First, route to the inner layer where D is located, and then update S:
[0207]
[0208] S new = 100;
[0209] Then S is updated to routing node 100, and D is routing node 101. At this time, both S and D belong to the outer layer. After bitwise XOR, I = 001. The source routing node S and the destination routing node D are directly connected and can be directly routed.
[0210] If the value of I is 001, route according to Rule 3. For example: S is routing node 000, D is routing node 001. After bitwise XOR, I = 001. Split I into two one-hot encodings I = I1^I2 = 010^011, and then, in the way of Rule 3, XOR the two one-hot encodings with the routing node S respectively:
[0211]
[0212] If the value of I is 111, route according to Rule 4. For example: S is the routing node 000, D is the routing node 11 1. After bitwise XOR, I = 111. First, route to the inner layer where D is located, and then update S:
[0213]
[0214] S new = 100;
[0215] Then S is updated to the routing node 100, D is the routing node 111. At this time, both S and D belong to the outer layer. After bitwise XOR, I = 011. Split I into two one - hot encodings I = I1^I2 = 001^010, and then according to Rule 2, the two one - hot encodings are XORed with the routing node S respectively:
[0216]
[0217] In the case where the interconnection network has a ring topology, deadlock may occur in some extreme scenarios. Once deadlock occurs, the on - chip network will be paralyzed. Therefore, for the on - chip network, the deadlock problem must be solved. The above routing method improves the traditional routing algorithm and proposes a deadlock - avoiding routing algorithm applicable to the above - mentioned multi - dimensional hypercube interconnection network. The routing algorithm is simple and easy to implement in hardware.
[0218] To avoid the occurrence of the above - mentioned deadlock phenomenon, in this embodiment, another routing method for the multi - dimensional hypercube interconnection network is also provided. The topological structure of the multi - dimensional hypercube interconnection network is any one of the above - mentioned topological structures. Among them, P transmission paths are deployed between the target network node and the directly connected network node, where P is an integer greater than 1. This routing method is used to route from the starting routing node in the target sub - network to the final routing node in the target sub - network. Figure 10 is the flow of a routing method for a multi - dimensional hypercube interconnection network according to an embodiment of the present application Figure 3 as Figure 10 shown. This flow includes the following steps:
[0219] Step S1002, calculate the shortest routing path from the starting routing node to the final routing node according to the starting node identifier of the starting routing node, the final node identifier of the final routing node, and the node set where the starting routing node is located, and obtain the initial routing path;
[0220] Step S1004, determine the target transmission path for each hop in the initial routing path from the P transmission paths according to the path characteristics of the initial routing path, and obtain the target routing path;
[0221] Step S1006: Route from the starting routing node to the final routing node according to the target routing path.
[0222] Through the above steps, for each target sub-network, the 8 target network nodes it includes are divided into a first node set and a second node set. The 4 target network nodes in the first node set are connected in a ring in sequence. The 4 target network nodes in the second node set include a first network node, a second network node, a third network node, and a fourth network node. By connecting the first network node to the third network node and the fourth network node, and the second network node to the third network node and the fourth network node, the network diameter between the 8 target network nodes in each target sub-network is reduced from the traditional 3 to 2 in this connection mode, thereby reducing the network diameter of each target sub-network, and further reducing the network diameter of the entire interconnected network. During the routing process, first, the initial routing path is planned according to the shortest routing path, and then the sending path for each hop is planned based on the path characteristics of the initial routing path to obtain the target routing path, so as to avoid the occurrence of deadlock in the planned target routing path. Therefore, the technical problem of possible deadlock in the routing process in the related art can be solved, and the technical effect of avoiding deadlock in the routing process can be achieved.
[0223] In an optional example, in the above step S1004, the target sending path for each hop in the initial routing path can be determined from the P sending paths according to the path characteristics of the initial routing path to obtain the target routing path in the following ways, but not limited to: Detect the path hop count and path quantity of the initial routing path as path characteristics, where the initial routing path includes all the shortest routing paths allowed to route from the starting routing node to the final routing node; Determine the target sending path for each hop in the initial routing path from the P sending paths according to the path hop count and path quantity to obtain the target routing path.
[0224] Optionally, in this embodiment, all routing paths follow the shortest path routing, and this routing rule can be called Rule 11, but not limited to this.
[0225] In an optional example, the target sending path for each hop in the initial routing path can be determined from the P sending paths according to the path hop count and path quantity to obtain the target routing path in the following ways, but not limited to: Screen out a candidate routing path from the initial routing path according to the path hop count and path quantity; Determine the target sending path for each hop in the candidate routing path from the P sending paths according to the path quantity to obtain the target routing path.
[0226] Optionally, in this embodiment, one candidate routing path can be filtered out from the initial routing paths according to the path hop count and the number of paths in, but not limited to, the following ways: when the path hop count is 1, directly route from the starting routing node to the final routing node according to the initial routing path; when the path hop count is greater than 1, filter out one candidate routing path from the initial routing paths according to the number of paths.
[0227] Optionally, in this embodiment, one candidate routing path can be filtered out from the initial routing paths according to the number of paths in, but not limited to, the following ways: when the number of paths is 1, determine the initial routing path as the candidate routing path; when the number of paths is greater than 1, randomly select one routing path from the initial routing paths as the candidate routing path.
[0228] Optionally, in this embodiment, the target transmission path for each hop in the candidate routing path can be determined from P transmission paths according to the number of paths in, but not limited to, the following ways to obtain the target routing path: when the number of paths is 1, randomly determine the target transmission path for each hop in the candidate routing path from the P transmission paths to obtain the target routing path; when the number of paths is 2, randomly determine the target transmission path for the next hop in the candidate routing path from the first path set and randomly determine the target transmission path for the last hop in the candidate routing path from the second path set to obtain the target routing path; where the P transmission paths are divided into the first path set and the second path set above, the first path set includes at least one of the P transmission paths, and the second path set includes at least one of the P transmission paths.
[0229] Optionally, in this embodiment, the target transmission path for each hop in the candidate routing path can be determined from P transmission paths according to the number of paths in, but not limited to, the following ways to obtain the target routing path: when the number of paths is 1, randomly determine the target transmission path for each hop in the candidate routing path from the P transmission paths to obtain the target routing path; when the number of paths is 2, randomly determine the target transmission path for the next hop in the candidate routing path from the transmission paths marked with the first label among the P transmission paths and randomly determine the target transmission path for the last hop in the candidate routing path from the transmission paths marked with the second label among the P transmission paths to obtain the target routing path; where at least one of the P transmission paths is marked with the first label and at least one of the P transmission paths is marked with the second label.
[0230] Assume that the source routing node of the routing request is S (i.e., the above-mentioned starting routing node), the destination routing node is D (i.e., the above-mentioned final routing node), the first label is "+" and the second label is "-". Figure 11It is a schematic diagram of the path label of a transmission path according to an embodiment of the present application. As Figure 11 shown, taking the example that each network node has two transmission paths, one transmission path is labeled with the label "+" and the other transmission path is labeled with the label "-".
[0231] Then, if S to D requires two hops and there are multiple routing paths for the shortest path, the first hop can only take "+", and the second hop can only take "-". For example, Figure 12 It is a schematic Figure 1 of a routing path according to an embodiment of the present application, Figure 12 as
[0232] shown. S is 110, D is 101. Since S to D requires two hops and there are multiple routing paths, the first hop can only take "+", and the second hop can only take "-". Figure 13 It is a schematic Figure 4 of the routing process in a ring topology structure according to an embodiment of the present application, Figure 14 It is a schematic Figure 5 of the routing process in a ring topology structure according to an embodiment of the present application, Figure 13 and Figure 14 as
[0233] shown. When using Rule 12 for routing, when all these four routing requests need to pass through a routing node and the intermediate routing node is already occupied, no deadlock occurs. Figure 15 It is a schematic Figure 6 of the routing process in a ring topology structure according to an embodiment of the present application, Figure 15 as
[0234] shown. When using Rule 12 for routing, when all these four routing requests need to pass through a routing node and the intermediate routing node is already occupied, no deadlock occurs. Figure 16 If S to D requires two hops and there is only one routing path for the shortest path, the two-hop "+""-" paths can be taken randomly. For example, Figure 16Schematic of a routing path according to an embodiment of the present application Figure 2 , as Figure 16 shown, S is 010, D is 101. To go from S to D requires two hops and there is only one routing path for the shortest path. Therefore, the "+" and "-" paths for the two hops can be taken arbitrarily.
[0235] The above routing rule can be called Rule 13. Rules 12 and 13 can ensure that there is no deadlock in the routing requests between the outer and inner layer nodes. For example 5, for the ring topology composed of routing nodes 110, 010, 000, and 100: Suppose there are four routing requests at the same time: Request 1: from routing node 110 to routing node 000; Request 2: from routing node 010 to routing node 100; Request 3: from routing node 000 to routing node 110; Request 4: from routing node 100 to routing node 010, Figure 17 Schematic of the routing process in a ring topology structure according to an embodiment of the present application Figure 7 , as Figure 17 shown, when using Rules 12 and 13 for routing and all four of these routing requests need to pass through a routing node and the intermediate routing node is already occupied, there is no deadlock.
[0236] For the ring topology composed of routing nodes 100, 000, 011, 001, and 101: Suppose there are five routing requests at the same time: Request 1: from routing node 100 to routing node 011; Request 2: from routing node 000 to routing node 001; Request 3: from routing node 011 to routing node 101; Request 4: from routing node 001 to routing node 100; Request 5: from routing node 101 to routing node 000, Figure 18 Schematic of the routing process in a ring topology structure according to an embodiment of the present application Figure 8 , as Figure 18 shown, when using Rules 12 and 13 for routing and all four of these routing requests need to pass through a routing node and the intermediate routing node is already occupied, there is no deadlock.
[0237] For the ring topology composed of routing nodes 100, 000, 011, 111, and 101: Suppose there are five routing requests at the same time: Request 1: from routing node 100 to routing node 011; Request 2: from routing node 000 to routing node 111; Request 3: from routing node 011 to routing node 101; Request 4: from routing node 111 to routing node 100; Request 5: from routing node 101 to routing node 000, Figure 19 Schematic of the routing process in a ring topology structure according to an embodiment of the present application Figure 9 , as Figure 19As shown, when routing is performed using Rules 12 and 13 and all four routing requests need to pass through a routing node and the intermediate routing node is already occupied, no deadlock occurs.
[0238] In an optional example, in the above step S1002, the shortest routing path from the starting routing node to the final routing node can be calculated, and the initial routing path can be obtained, but not limited to, in the following manner: based on the starting node identifier of the starting routing node, the final node identifier of the final routing node, and the node set where the starting routing node is located, determine the connection relationship between the starting routing node and the final routing node; calculate the shortest routing path as the initial routing path according to the connection relationship and the node set where the starting routing node is located.
[0239] Optionally, in this embodiment, the connection relationship between the starting routing node and the final routing node can be determined, but not limited to, in the following manner: perform a bitwise exclusive OR operation on the starting node identifier and the final node identifier to obtain the operation result; determine the connection relationship according to the operation result and the node set where the starting routing node is located.
[0240] Optionally, in this embodiment, when N is 3, the highest bit of the identifier of the network node in the first node set is 0, and the highest bit of the identifier of the network node in the second node set is 1, the connection relationship can be determined, but not limited to, in the following manner: when the starting routing node is in the first node set and the operation result is one of 001, 010, and 100, determine that the connection relationship is a direct connection between the starting routing node and the final routing node; when the starting routing node is in the second node set and the operation result is one of 011, 010, and 100, determine that the connection relationship is a direct connection between the starting routing node and the final routing node; when the starting routing node is in the first node set and the operation result is a value other than 001, 010, and 100, determine that the connection relationship is not a direct connection between the starting routing node and the final routing node; when the starting routing node is in the second node set and the operation result is a value other than 011, 010, and 100, determine that the connection relationship is not a direct connection between the starting routing node and the final routing node.
[0241] Optionally, in this embodiment, the shortest routing path can be calculated as the initial routing path according to the connection relationship and the node set where the starting routing node is located in the following ways, but not limited to: when the connection relationship is a direct connection between the starting routing node and the final routing node, determine the initial routing path as directly routing to the final routing node, where the initial routing path includes one shortest routing path; when the connection relationship is not a direct connection between the starting routing node and the final routing node, determine the next hop according to the operation result and the node set where the starting routing node is located; determine the final routing node as the last hop, where the initial routing path includes the next hop and the last hop, and the initial routing path includes at least one shortest routing path.
[0242] Optionally, in this embodiment, when N is 3, the highest bit of the identifier of the network nodes in the first node set is 0, and the highest bit of the identifier of the network nodes in the second node set is 1, the next hop can be determined according to the operation result and the node set where the starting routing node is located in the following ways, but not limited to: when the starting routing node is in the first node set and the operation result is 110 or 011, or when the starting routing node is in the second node set and the operation result is 110, split the operation result into two one-hot encodings; perform bitwise XOR operations on the two one-hot encodings with the starting node identifier respectively as the target one-hot encoding to obtain the identifiers of two next hops, where the initial routing path includes two shortest routing paths; when the starting routing node is in the first node set and the operation result is 101, split the operation result into 001 and 100; perform a bitwise XOR operation on the starting node identifier and 001 to obtain the identifier of the next hop, where the identifier of the next hop and 100 are the final node identifiers, and the initial routing path includes one shortest routing path; when the starting routing node is in the second node set and the operation result is 101, split the operation result into 100 and 001; perform a bitwise XOR operation on the starting node identifier and 100 to obtain the identifier of the next hop, where the identifier of the next hop and 001 are the final node identifiers, and the initial routing path includes one shortest routing path; when the starting routing node is in the second node set and the operation result is 001, split the operation result into 010 and 011; perform bitwise XOR operations on 010 and 011 with the starting node identifier respectively as the target encoding to obtain the identifiers of two next hops, where the initial routing path includes two shortest routing paths; when the starting routing node is in the first node set and the operation result is 111, split the operation result into 100 and 011; perform a bitwise XOR operation on the starting node identifier and 100 to obtain the identifier of the next hop, where the identifier of the next hop and 011 are the final node identifiers, and the initial routing path includes one shortest routing path; when the starting routing node is in the second node set and the operation result is 111, split the operation result into 011 and 100; perform a bitwise XOR operation on the starting node identifier and 011 to obtain the identifier of the next hop, where the identifier of the next hop and 100 are the final node identifiers, and the initial routing path includes one shortest routing path.
[0243] In an alternative example, when N is 3, the most significant bit of the identifiers of the network nodes in the first node set is 0, and the most significant bit of the identifiers of the network nodes in the second node set is 1, the connections between the network nodes in the first node set can be established in the following ways, but are not limited thereto: perform bitwise exclusive OR operations on the identifiers of the network nodes in the first node set with 001, 010, and 100 respectively to obtain the first identifiers of 3 directly connected network nodes; establish connections between the network nodes in the first node set and the network nodes with the first identifiers, and establish P sending paths in each connection.
[0244] In an alternative example, when N is 3, the most significant bit of the identifiers of the network nodes in the first node set is 0, and the most significant bit of the identifiers of the network nodes in the second node set is 1, the connections between the network nodes in the second node set can be established in the following ways, but are not limited thereto: perform bitwise exclusive OR operations on the identifiers of the network nodes in the second node set with 011, 010, and 100 respectively to obtain the second identifiers of 3 directly connected network nodes; establish connections between the network nodes in the second node set and the network nodes with the second identifiers, and establish P sending paths in each connection.
[0245] Optionally, in this embodiment, the 4 target network nodes in the first node set include the fifth network node, the sixth network node, the seventh network node, and the eighth network node. Establish the connection between the fifth network node and the first network node, the connection between the sixth network node and the second network node, the connection between the seventh network node and the third network node, and the connection between the eighth network node and the fourth network node; establish the connection between the fifth network node and the sixth network node, the connection between the sixth network node and the seventh network node, the connection between the seventh network node and the eighth network node, and the connection between the eighth network node and the fifth network node.
[0246] In an alternative example, the network nodes can be configured in the following ways, but are not limited thereto: set each target network node to allow one-hop routing to the 3 target network nodes connected in the target subnetwork; set each target network node to allow two-hop routing to the 4 target network nodes not connected in the target subnetwork.
[0247] In an alternative embodiment, a routing algorithm for a topological structure of a three-dimensional hypercube interconnection network is provided. In this routing algorithm, the network nodes in the three-dimensional hypercube interconnection network are divided into N1 = {100, 101, 110, 111} and N2 = {000, 001, 010, 011}. For a routing request, the source routing node (i.e., the above-mentioned starting routing node) is denoted as S, and the target routing node (i.e., the above-mentioned final routing node) is denoted as D. This routing algorithm can include the following steps, but is not limited thereto:
[0248] Step 1: The source routing node S and the destination routing node D are XORed bit by bit, and the result is denoted as I;
[0249] Step 2: Determine the value of the source routing node S. If it belongs to N1, go to Step 3; if it belongs to N2, go to Step 4;
[0250] Step 3: Determine the value of I: If the value of I is one of 001, 010, 100, it means that the source routing node S and the destination routing node D are directly connected and can be directly routed.
[0251] (2) If the value of I is one of 110, 011, split I into two one-hot encodings I = I1^I2, and then, in a random manner, XOR the two one-hot encodings with the routing node S respectively; the routing ends. For example: If S is the routing node 100 and D is the routing node 111, after bitwise XOR, I = 011. Split I into two one-hot encodings I = I1^I2 = 001^010, and then, in ascending order, XOR the two one-hot encodings with the routing node S respectively:
[0252]
[0253] If the value of I is 101, split I, I = I1^I2 = 001^100, and XOR I1 and I2 with the routing node S in sequence; the routing ends. For example: If S is the routing node 100 and D is the routing node 001, after bitwise XOR, I = 101. Split I into two one-hot encodings I = I1^I2 = 001^100, and then, in sequence, XOR the two one-hot encodings with the routing node S respectively:
[0254]
[0255] If the value of I is 111, split I, I = I1^I2 = 100^011, and XOR I1 and I2 with the routing node S in sequence; the routing ends. For example: If S is the routing node 100 and D is the routing node 011, after bitwise XOR, I = 111. Split I into two one-hot encodings I = I1^I2 = 001^100, and then, in sequence, XOR the two one-hot encodings with the routing node S respectively:
[0256]
[0257] Step 4: Determine the value of I: If the value of I is one of 011, 010, 100, it means that the source routing node S and the destination routing node D are directly connected and can be directly routed.
[0258] If the value of I is 110, split I into two one - hot encodings I = I1^I2 = 010^100, and then in a random manner, the two one - hot encodings are respectively exclusive - ORed with the routing node S; the routing ends. For example: S is the routing node 001, D is the routing node 111, after bit - wise exclusive - OR, I = 110, split I into two one - hot encodings I = I1^I2 = 010^100, and then in a random manner, the two one - hot encodings are respectively exclusive - ORed with the routing node S:
[0259]
[0260] If the value of I is 101, split I into two one - hot encodings I = I1^I2 = 100^001, and then in a sequential manner, the two one - hot encodings are respectively exclusive - ORed with the routing node S; the routing ends. For example: S is the routing node 001, D is the routing node 101, after bit - wise exclusive - OR, I = 101, split I into two one - hot encodings I = I1^I2 = 100^001, and then in a sequential manner, the two one - hot encodings are respectively exclusive - ORed with the routing node S:
[0261]
[0262] If the value of I is 001, split I into two encodings I = I1^I2 = 010^011, and then in a random manner, the two one - hot encodings are respectively exclusive - ORed with the routing node S; the routing ends. For example: S is the routing node 001, D is the routing node 000, after bit - wise exclusive - OR, I = 001, split I into two one - hot encodings I = I1^I2 = 010^011, and then in a random manner, the two one - hot encodings are respectively exclusive - ORed with the routing node S:
[0263]
[0264] If the value of I is 111, split I into two encodings I = I1^I2 = 011^100, and then in a sequential manner, the two one - hot encodings are respectively exclusive - ORed with the routing node S; the routing ends. For example: S is the routing node 001, D is the routing node 11, after bit - wise exclusive - OR, I = 111, split I into two one - hot encodings I = I1^I2 = 011^100, and then in a sequential manner, the two one - hot encodings are respectively exclusive - ORed with the routing node S:
[0265]
[0266] In the case where the interconnection network has a ring topology, a deadlock phenomenon may occur in some extreme scenarios. Once a deadlock occurs, the on-chip network will be paralyzed. Therefore, the deadlock problem must be solved for the on-chip network. The above routing method improves the traditional routing algorithm and proposes a deadlock-avoiding routing algorithm applicable to the above multi-dimensional hypercube interconnection network. The routing algorithm is simple and easy to implement in hardware.
[0267] In this embodiment, a topological structure of a four-dimensional hypercube interconnection network is further provided. The four-dimensional hypercube interconnection network includes 16 network nodes. The four-dimensional hypercube interconnection network is divided into a first sub-network and a second sub-network, and the first sub-network and the second sub-network each include 8 target network nodes. The 8 target network nodes included in the first sub-network are divided into a first node set and a second node set, and the first node set and the second node set each include 4 target network nodes. The 4 target network nodes in the first node set are connected to the 4 target network nodes in the second node set in one-to-one correspondence. The 4 target network nodes in the first node set are connected in sequence to form a ring. The 4 target network nodes in the second node set include a first network node, a second network node, a third network node, and a fourth network node. The first network node is connected to the third network node and the fourth network node, and the second network node is connected to the third network node and the fourth network node. The 8 target network nodes included in the second sub-network are divided into a third node set and a fourth node set, and the third node set and the fourth node set each include 4 target network nodes. The 4 target network nodes in the third node set are connected to the 4 target network nodes in the fourth node set in one-to-one correspondence. The 4 target network nodes in the third node set are connected in sequence to form a ring. The 4 target network nodes in the fourth node set include a ninth network node, a tenth network node, an eleventh network node, and a twelfth network node. The ninth network node is connected to the eleventh network node and the twelfth network node, and the tenth network node is connected to the eleventh network node and the twelfth network node. The 4 target network nodes in the first node set are connected to the 4 target network nodes in the third node set in one-to-one correspondence. The 4 target network nodes in the second node set are connected to the 4 target network nodes in the fourth node set in one-to-one correspondence.
[0268] With the above topological structure, the network diameter of the four-dimensional hypercube interconnection network is shortened to 3 in this connection mode, thereby reducing the network diameter of the entire interconnection network. Therefore, the technical problem of relatively large network communication delay in the multi-dimensional hypercube interconnection network can be solved, and the technical effect of reducing the network communication delay of the multi-dimensional hypercube interconnection network can be achieved.
[0269] Optionally, in this embodiment, the identifiers of the 16 network nodes are four-bit binary numbers. The highest bit of the identifiers of the network nodes on the same sub-network is the same. The lowest three bits of the identifier of the target network node are the same as those of the directly connected reference network node, and there is only one bit difference between the identifier of the target network node and that of the directly connected reference network node, where the reference network node and the target network node do not belong to the same sub-network.
[0270] Optionally, in this embodiment, the third bit from the right of the identifiers of the network nodes in the first node set is the same, the third bit from the right of the identifiers of the network nodes in the second node set is the same, and the third bit from the right of the identifiers of the network nodes in the first node set is different from the third bit from the right of the identifiers of the network nodes in the second node set; the third bit from the right of the identifiers of the network nodes in the third node set is the same, the third bit from the right of the identifiers of the network nodes in the fourth node set is the same, and the third bit from the right of the identifiers of the network nodes in the third node set is different from the third bit from the right of the identifiers of the network nodes in the fourth node set.
[0271] Optionally, in this embodiment, the third bit from the right of the identifiers of the network nodes in the first node set and the third bit from the right of the identifiers of the network nodes in the third node set are both 1, and the third bit from the right of the identifiers of the network nodes in the second node set and the third bit from the right of the identifiers of the network nodes in the fourth node set are both 0.
[0272] Optionally, in this embodiment, the results of the bitwise exclusive OR operations between the identifiers of the network nodes in the first node set and the third node set and 0001, 0010, 0100, and 1000 respectively are the identifiers of the 4 directly connected network nodes; the results of the bitwise exclusive OR operations between the identifiers of the network nodes in the second node set and the fourth node set and 0011, 0010, 0100, and 1000 respectively are the identifiers of the 3 directly connected network nodes.
[0273] Optionally, in this embodiment, the 4 target network nodes in the first node set include the fifth network node, the sixth network node, the seventh network node, and the eighth network node. The fifth network node is connected to the first network node, the sixth network node is connected to the second network node, the seventh network node is connected to the third network node, the eighth network node is connected to the fourth network node, the fifth network node is connected to the sixth network node, the sixth network node is connected to the seventh network node, the seventh network node is connected to the eighth network node, and the eighth network node is connected to the fifth network node;
[0274] The 4 target network nodes in the third node set include the thirteenth network node, the fourteenth network node, the fifteenth network node, and the sixteenth network node. The thirteenth network node is connected to the ninth network node, the fourteenth network node is connected to the tenth network node, the fifteenth network node is connected to the eleventh network node, and the sixteenth network node is connected to the twelfth network node. The thirteenth network node is connected to the fourteenth network node, the fourteenth network node is connected to the fifteenth network node, the fifteenth network node is connected to the sixteenth network node, and the sixteenth network node is connected to the thirteenth network node.
[0275] Optionally, in this embodiment, each target network node is set to allow one-hop routing to the 4 directly connected network nodes; each target network node is set to allow two-hop routing to the 4 network nodes not connected in its subnet; each target network node is set to allow three-hop routing to the 7 network nodes not connected in the subnet where it is not located.
[0276] In an alternative implementation, Figure 20 is a structural block diagram of a four-dimensional hypercube interconnection network topology according to an embodiment of the present application, as Figure 20 shown. The four-dimensional hypercube interconnection network has 16 network nodes; the labels are represented by binary numbers 0000 - 1110. For the 8 network nodes 0100, 0101, 0110, 0111, 1100, 1101, 1110, 1111, the binary numbers of each network node are successively XORed bit by bit with 0001, 0010, 0100, 1000 to obtain the network nodes directly connected to it. For example, for network node 0101, its binary number is successively XORed bit by bit with 0001, 0010, 0100, 1000 to obtain 0100, 0111, 0001, 1101, which are exactly the four network nodes directly connected to 0101. For the 8 network nodes 0000, 0001, 0010, 0011, 1000, 1001, 1010, 1011, the binary numbers of each network node are successively XORed bit by bit with 0011, 0010, 0100, 1000 to obtain the network nodes directly connected to it. For example, for network node 1010, its binary number is successively XORed bit by bit with 0011, 0010, 0100, 1000 to obtain 1001, 1000, 1110, 0010, which are exactly the four network nodes directly connected to 1010.
[0277] The above-mentioned topology of the four-dimensional hypercube interconnection network includes two improved three-dimensional cube structures, Figure 21 is a structural block diagram of an inner three-dimensional cube according to an embodiment of the present application, Figure 22It is a structural block diagram of an outer - layer three - dimensional cube according to an embodiment of the present application. As Figure 21 and Figure 22 shown, the highest bit of the network nodes of the inner - layer three - dimensional cube is 0, and the highest bit of the network nodes of the outer - layer three - dimensional cube is 1; for the network nodes of the inner - layer three - dimensional cube directly connected to the network nodes of the outer - layer three - dimensional cube, the result after bitwise XOR is 1000, that is, the lower two bits are equal and the highest bit is opposite.
[0278] For the 8 network nodes 0100, 0101, 0110, 0111, 1100, 1101, 1110, and 1111: For each network node, the link relationship with the other 15 network nodes is as follows: By XORing with 0001, 0010, 0100, and 1000, 4 network nodes directly connected to it can be obtained; it can directly reach 4 adjacent network nodes through one hop. For example, for network node 0100, by XORing it with 0001, 0010, 0100, and 1000, network nodes 0101, 0110, 0000, and 1100 can be obtained and are directly connected and can be directly routed. By XORing with 0101, 0011, 0110, 1001, 1100, 1010, and 0111, 7 network nodes can be reached through two hops; for example, for network node 0100, by XORing it with 0101, 0011, 0110, 1001, 1100, 1010, and 0111, 7 network nodes 0001, 0111, 0010, 1101, 1000, 1110, and 0011 can be obtained and can be reached through two hops. By XORing with 1011, 1110, 1101, and 1111, the 4 obtained network nodes can be reached through three hops; for example, for network node 0100, by XORing it with 1011, 1110, 1101, and 1111, network nodes 1111, 1010, 1001, and 1011 can be obtained and can be reached after three hops.
[0279] For the 8 network nodes 0000, 0001, 0010, 0011, 1000, 1001, 1010, and 1011: For each network node, the link relationships with the other 15 network nodes are as follows: Exclusive OR with 0011, 0010, 0100, and 1000 can obtain the 4 network nodes directly connected to it; It can directly reach 4 adjacent network nodes in one hop. For example, for network node 0001, exclusive OR with 0011, 0010, 0100, and 1000 can obtain network nodes 0010, 0011, 0101, and 1001 which are directly connected and can be directly routed; Exclusive OR with 0101, 0001, 0110, 1011, 1100, 1010, and 0111 can obtain 7 network nodes, and it can reach these 7 network nodes in two hops; For example, for network node 0001, exclusive OR with 0101, 0001, 0110, 1011, 1100, 1010, and 0111 can obtain the 7 network nodes 0100, 0000, 0111, 1010, 1101, 1011, and 0110, and it can reach them in two hops; Exclusive OR with 1001, 1110, 1101, and 1111 can obtain 4 network nodes that can be reached in three hops; For example, for network node 0001, exclusive OR with 1001, 1110, 1101, and 1111 can obtain network nodes 1000, 1111, 1100, and 1110, and it can reach them after three hops.
[0280] The network diameter between the network nodes of the above four - dimensional hypercube interconnection network is 3.
[0281] In this embodiment, a routing method for a four - dimensional hypercube interconnection network is also provided, which is applied to the topological structure of any of the above four - dimensional hypercube interconnection networks. Figure 23 It is a schematic diagram of a routing method for a four - dimensional hypercube interconnection network according to an embodiment of the present application, as Figure 23 shown. This method may but is not limited to including the following steps:
[0282] Step S2302, obtain the start node identifier of the start routing node in the four - dimensional hypercube interconnection network, and the end node identifier of the end routing node in the four - dimensional hypercube interconnection network;
[0283] Step S2304, according to the node set where the start routing node is located, split the operation result of the bit - by - bit exclusive OR operation between the start node identifier and the end node identifier into a target coding sequence;
[0284] Step S2306, according to the start node identifier and the target coding sequence, calculate the routing path from the start routing node to the end routing node to obtain the target routing path;
[0285] Step S2308, route from the starting routing node to the final routing node according to the target routing path.
[0286] Through the above steps, the network diameter of the four-dimensional hypercube interconnection network is shortened to 3 in this connection mode, thereby reducing the network diameter of the entire interconnection network. Therefore, the technical problem of relatively large network communication delay in the multi-dimensional hypercube interconnection network can be solved, and the technical effect of reducing the network communication delay in the multi-dimensional hypercube interconnection network can be achieved.
[0287] In an optional example, it is possible but not limited to splitting the operation result of the bitwise exclusive OR operation between the starting node identifier and the final node identifier into a target coding sequence according to the node set where the starting routing node is located in the following manner: determine the connection relationship between the starting routing node and the final routing node according to the operation result; in the case where the connection relationship is that the starting routing node is directly connected to the final routing node, determine the target routing path as directly routing from the starting routing node to the final routing node; in the case where the connection relationship is that the starting routing node is not directly connected to the final routing node, search for the node set where the starting routing node is located and the target coding sequence corresponding to the operation result from the node sets, exclusive OR values, and coding sequences with corresponding relationships.
[0288] In an optional example, after determining the connection relationship between the starting routing node and the final routing node according to the operation result, in the case where the connection relationship is that the starting routing node is directly connected to the final routing node, determine the target routing path as directly routing from the starting routing node to the final routing node.
[0289] In an alternative example, the node set where the starting routing node is located and the target coding sequence corresponding to the operation result can be found, but not limited to, in the following manner: from a set of nodes with corresponding relationships, XOR values, and coding sequences. When the node set where the starting routing node is located is the first node set and the operation result is 0011, 0110, 1001, 1100, 1010, or 0101, determine that the target coding sequence is the two one-hot encodings of the operation result arranged in ascending order; when the node set where the starting routing node is located is the first node set and the operation result is 0111, determine that the target coding sequence is 0100 and 0011; when the node set where the starting routing node is located is the first node set and the operation result is 1011, 1110, or 1101, determine that the target coding sequence is the three one-hot encodings of the operation result arranged in ascending order; when the node set where the starting routing node is located is the first node set and the operation result is 1111, determine that the target coding sequence is 0100, 0011, and 1000; when the node set where the starting routing node is located is the second node set and the operation result is 0101, 0110, 1100, or 1010, determine that the target coding sequence is the two one-hot encodings of the operation result arranged in descending order; when the node set where the starting routing node is located is the second node set and the operation result is 0001, determine that the target coding sequence is 0011 and 0010; when the node set where the starting routing node is located is the second node set and the operation result is 1011, determine that the target coding sequence is 0011 and 1000; when the node set where the starting routing node is located is the second node set and the operation result is 0111, determine that the target coding sequence is 0011 and 0100; when the node set where the starting routing node is located is the second node set and the operation result is 1110 or 1101, determine that the target coding sequence is the three one-hot encodings of the operation result arranged in descending order; when the node set where the starting routing node is located is the second node set and the operation result is 1001, determine that the target coding sequence is 0011, 1000, and 0010; when the node set where the starting routing node is located is the second node set and the operation result is 1111, determine that the target coding sequence is 0011, 1000, and 0100.
[0290] In an alternative example, the routing path from the starting routing node to the final routing node can be calculated based on the starting node identifier and the target coding sequence, and the target routing path can be obtained in the following manner: perform a bitwise XOR operation on the starting node identifier and the first coding in the target coding sequence to obtain the identifier of the next hop; perform a bitwise XOR operation on the identifier of the next hop and the next coding in the target coding sequence until the last coding in the target coding sequence to obtain the target routing path.
[0291] In an alternative embodiment, a routing algorithm for a topological structure applied to a four-dimensional hypercube interconnection network is provided. In this routing algorithm, the network nodes in the four-dimensional hypercube interconnection network are divided into N1 = {0100, 0101, 0110, 0111, 1100, 1101, 1110, 1111} and N2 = {0000, 0001, 0010, 0011, 1000, 1001, 1010, 1011}. For a routing request, the source routing node (i.e., the above-mentioned starting routing node) is denoted as S, and the destination routing node (i.e., the above-mentioned final routing node) is denoted as D. This routing algorithm may but is not limited to include the following steps:
[0292] Step 1: The source routing node S and the destination routing node D are bitwise XORed, and the result is denoted as I;
[0293] Step 2: Determine the value of the source routing node S. If it belongs to N1, go to Step 3; if it belongs to N2, go to Step 4;
[0294] Step 3: Determine the value of I: If the value of I is one of 0001, 0010, 0100, 1000, it means that the source routing node S and the destination routing node D are directly connected and can be directly routed.
[0295] If the value of I is one of 0011, 0110, 1001, 1100, 1010, 0101, split I into two one-hot encodings μ = I1^I2 = 0001^0100, and then in ascending order, the two one-hot encodings are XORed with the routing node S respectively; the routing ends. For example: S is the routing node 0100, D is the routing node 0001, after bitwise XOR, I = 0101, split I into two one-hot encodings μ = I1^I2 = 0001^0100, and then in ascending order, the two one-hot encodings are XORed with the routing node S respectively:
[0296]
[0297] If the value of I is 0111, split I, μ = I1^I2 = 0100^0011, and I1 and I2 are XORed with the routing node S in sequence; the routing ends. For example: S is the routing node 0100, D is the routing node 0011, after bitwise XOR, I = 0111, split I into two one-hot encodings μ = I1^μ2 = 0100^0011, and then in sequence, the two one-hot encodings are XORed with the routing node S respectively:
[0298]
[0299] If the value of I is one of 1011, 1110, 1101, split I into three one-hot encodings, and then, in ascending order, perform exclusive OR (XOR) operations between the three one-hot encodings and the routing node S respectively; the routing ends. For example: S is the routing node 0100, D is the routing node 1111, after bitwise XOR, I = 1011. Split I into three one-hot encodings I = I1^I2^I3 = 0001^0010^1000, and then, in ascending order, perform exclusive OR (XOR) operations between the three one-hot encodings and the routing node S respectively:
[0300]
[0301] If the value of I is 1111, split I, I = I1^I2^I3 = 0100^0011^1000, and perform exclusive OR (XOR) operations with the routing node S in the order of I1, I2, I3; the routing ends. For example: S is the routing node 0100, D is the routing node 1011, after bitwise XOR, I = 1111. Split I into three one-hot encodings I = I1^I2^I3 = 0100^0011^1000, and then perform exclusive OR (XOR) operations with the routing node S in the order of I1, I2, I3:
[0302]
[0303] Step 4: Determine the value of I: If the value of I is one of 0011, 0010, 0100, 1000, it means that the source routing node S is directly connected to the destination routing node D, and direct routing can be performed.
[0304] If the value of I is one of 0101, 0110, 1100, 1010, split I into two one-hot encodings, and then, in descending order, perform exclusive OR (XOR) operations between the two one-hot encodings and the routing node S respectively; the routing ends. Example: S is the routing node 0001, D is the routing node 0100, after bitwise XOR, I = 0101. Split I into two one-hot encodings I = I1^I2 = 0001^0100, and then, in ascending order, perform exclusive OR (XOR) operations between the two one-hot encodings and the routing node S respectively:
[0305]
[0306] If the value of I is 0001, split I, I = I1^I2 = 0011^0010, and perform exclusive OR (XOR) operations between I1 and I2 with the routing node S in sequence; the routing ends. For example: S is the routing node 0001, D is the routing node 0000, after bitwise XOR, I = 0001. Split I into two one-hot encodings I = I1^I2 = 0011^0010, and then perform exclusive OR (XOR) operations between I1 and I2 with the routing node S in sequence:
[0307]
[0308] If the value of I is 1011, split I, I = I1^I2 = 0011^1000, and I1 and I2 are sequentially exclusive-ORed with the routing node S; the routing ends. For example: S is the routing node 0001, D is the routing node 1010, after bitwise exclusive-OR, I = 1011, split I into two one-hot encodings I = I1^I2 = 0011^1000, then I1 and I2 are in order, and the two one-hot encodings are respectively exclusive-ORed with the routing node S:
[0309]
[0310] If the value of I is 0111, split I, I = I1^I2 = 0011^0100, and I1 and I2 are sequentially exclusive-ORed with the routing node S; the routing ends. For example: S is the routing node 0001, D is the routing node 0110, after bitwise exclusive-OR, I = 0111, split I into two one-hot encodings I = I1^I2 = 0011^0100, then I1 and I2 are in order, and the two one-hot encodings are respectively exclusive-ORed with the routing node S:
[0311]
[0312] If the value of I is one of 1110 and 1101, split I into three one-hot encodings, and then in the order of I1, I2, I3, exclusive-OR with the routing node S. For example: S is the routing node 0001, D is the routing node 1100, after bitwise exclusive-OR, I = 1101, split I into three one-hot encodings I = I1^I2^I3 = 1000^0100^0001, and then in the order of I1, I2, I3, exclusive-OR with the routing node S:
[0313]
[0314] If the value of I is 1001, split I, I = I1^I2^I3 = 0011^1000^0010, and then in the order of I1, I2, I3, exclusive-OR with the routing node S. For example: S is the routing node 0001, D is the routing node 1000, after bitwise exclusive-OR, I = 1001, split I into three one-hot encodings I = I1^I2^I3 = 0011^1000^0010, and then in the order of I1, I2, I3, exclusive-OR with the routing node S:
[0315]
[0316] If the value of I is 1111, split I. I = I1^I2^I3 = 0011^1000^0100, and then perform exclusive OR with the routing node S in the order of I1, I2, I3. For example: S is the routing node 0001, D is the routing node 1110, after performing bitwise exclusive OR, I = 1111. Split I into three one-hot encodings I = I1^I2^I3 = 0011^1000^0100, and then perform exclusive OR with the routing node S in the order of I1, I2, I3:
[0317]
[0318] Compared with the traditional four-dimensional hypercube structure network, the above four-dimensional hypercube interconnection network has a shorter network diameter, which can effectively reduce the network transmission delay. The routing algorithm of this four-dimensional hypercube interconnection network is simple and easy to implement in hardware.
[0319] In this embodiment, a topological structure of an interconnection network is further provided. The interconnection network includes 2 N node sets. Each node set includes N network nodes. The interconnection network is divided into 2 N-3 sub-networks, where N is a positive integer greater than 2; each of the 2 N-3 sub-networks is used as a target sub-network and includes 8 node sets. The 8 node sets included in the target sub-network are divided into a first group of sets and a second group of sets. The first group of sets and the second group of sets respectively include 4 node sets. The 4 node sets in the first group of sets are connected to the 4 node sets in the second group of sets in one-to-one correspondence; the 4 node sets in the first group of sets are sequentially connected in a ring. The 4 node sets in the second group of sets include a first node set, a second node set, a third node set, and a fourth node set. The first node set is connected to the third node set and the fourth node set, and the second node set is connected to the third node set and the fourth node set; each node set is connected to a node set with a connection relationship through one of the N network nodes included in it, and the N network nodes included in each node set are connected to each other pairwise.
[0320] Through the above topological structure, a topological structure of an interconnection network with a mismatch between the number of network nodes and the number of network nodes that can be provided in a multi-dimensional hypercube interconnection network can be established, avoiding or reducing the appearance of idle network nodes. Therefore, the technical problem that the topological structure of the interconnection network will cause a large amount of resource waste can be solved, and the technical effect of reducing the resource waste of the topological structure of the interconnection network can be achieved.
[0321] Optionally, in this embodiment, when N is greater than 3, the interconnection network is divided into at least two sub-networks, the at least two sub-networks are connected in sequence, and the eight node sets included in the target sub-network are connected in one-to-one correspondence with the eight node sets included in the reference sub-network, where the reference sub-network is the sub-network adjacent to the target sub-network in the connection of the at least two sub-networks.
[0322] Optionally, in this embodiment, each node set has a set identifier; the node identifier of each network node includes a set identifier field and a connection identifier field, where the set identifier field is used to record the set identifier of the target node set where each network node is located, and the connection identifier field is used to record the set identifier of the reference node set connected through each network node by the target node set.
[0323] Optionally, in this embodiment, 2 N the set identifiers of the node sets are integers from 0 to 2 N-1 inclusive.
[0324] Optionally, in this embodiment, the four target node sets in the first group of sets include the fifth node set, the sixth node set, the seventh node set, and the eighth node set; the fifth node set is connected to the first node set, the sixth node set is connected to the second node set, the seventh node set is connected to the third node set, and the eighth node set is connected to the fourth node set; the fifth node set is connected to the sixth node set, the sixth node set is connected to the seventh node set, the seventh node set is connected to the eighth node set, and the eighth node set is connected to the fifth node set.
[0325] In an alternative embodiment, taking N as 3 as an example, the interconnection network includes eight node sets, each node set includes three network nodes, the interconnection network is divided into one sub-network, and the eight node sets included in this sub-network as the target sub-network are divided into a first group of sets and a second group of sets. The first group of sets and the second group of sets each include four node sets, and the four node sets in the first group of sets are connected in one-to-one correspondence with the four node sets in the second group of sets; the four node sets in the first group of sets are connected in sequence to form a ring, and the four node sets in the second group of sets include the first node set, the second node set, the third node set, and the fourth node set. The first node set is connected to the third node set and the fourth node set, and the second node set is connected to the third node set and the fourth node set; each node set is connected to a node set with a connection relationship through one of the three network nodes included in it, and the three network nodes included in each node set are connected to each other pairwise.
[0326] Figure 24 is a structural block diagram of a topological structure of an interconnection network according to an embodiment of the present application, asFigure 24 As shown, each node set can be, but is not limited to, regarded as a triangular structure, and the target sub-network can be, but is not limited to, regarded as a three-dimensional hypercube structure. Each network node is numbered as (i, j), where i represents the number of the triangle, 0 ≤ i ≤ 7; j represents that the network node is connected to the j-th triangular structure. It can be known that the network node numbered (i, j) is connected to the network node numbered (j, i). For example, the network node (3, 1) is located in the 3rd triangular structure and is connected to the network node (1, 3) of the 1st triangular structure.
[0327] There are 24 network nodes in this interconnected network. The network diameter between the network nodes within the same triangle is 1, the diameter of the entire topological network is 5, and the out-degree and in-degree of each network node are 3.
[0328] In this embodiment, a routing method for an interconnected network is also provided, which is applied to the topological structure of any of the above-mentioned interconnected networks. This routing method is used to route from the starting routing node in the target sub-network to the final routing node in the target sub-network. Figure 25 It is a schematic diagram of a routing method for an interconnected network according to an embodiment of the present application. Figure 1 As Figure 25 shown, this method can, but is not limited to, include the following steps:
[0329] Step S2502, detecting the positional relationship between the starting routing node and the final routing node;
[0330] Step S2504, calculating the shortest routing path from the starting routing node to the final routing node according to the positional relationship to obtain the target routing path;
[0331] Step S2506, routing from the starting routing node to the final routing node according to the target routing path.
[0332] Through the above steps, a topological structure of an interconnected network with the number of network nodes not matching the number of network nodes that can be provided in a multi-dimensional hypercube interconnected network is established, avoiding or reducing the appearance of idle network nodes. Therefore, the technical problem that the topological structure of the interconnected network will cause a large amount of resource waste can be solved, and the technical effect of reducing the resource waste of the topological structure of the interconnected network can be achieved.
[0333] Optionally, in this embodiment, the positional relationship between the starting routing node and the final routing node can be detected, but is not limited to, in the following manner: obtaining the starting node identifier of the starting routing node and the final node identifier of the final routing node; determining the positional relationship according to the starting node identifier and the final node identifier.
[0334] Optionally, in this embodiment, each node set has a set identifier. The node identifier of each network node includes a set identifier field and a connection identifier field. The set identifier field is used to record the set identifier of the target node set where each network node is located, and the connection identifier field is used to record the set identifier of the reference node set connected by the target node set through each network node. The position relationship can be determined according to the start node identifier and the end node identifier in, but not limited to, the following ways: detecting whether the start set identifier in the start node identifier is equal to the end set identifier in the end node identifier; in the case where the start set identifier is equal to the end set identifier, determining that the position relationship is that the start routing node and the end routing node are in the same node set; in the case where the start set identifier is not equal to the end set identifier, detecting whether the start connection identifier in the start node identifier is equal to the end set identifier; in the case where the start connection identifier is equal to the end set identifier, determining that the position relationship is that the start routing node and the end routing node are in different node sets, but the end node sets where the start routing node and the end routing node are located are directly connected; in the case where the start connection identifier is not equal to the end set identifier, determining that the position relationship is that the start routing node and the end routing node are in different node sets, and the end node sets where the start routing node and the end routing node are located are not directly connected.
[0335] Optionally, in this embodiment, the shortest routing path from the start routing node to the end routing node can be calculated according to the position relationship in, but not limited to, the following ways to obtain the target routing path: in the case where the position relationship is that the start routing node and the end routing node are in the same node set, determining that the shortest routing path is to directly route from the start routing node to the end routing node; in the case where the position relationship is that the start routing node and the end routing node are in different node sets, calculating the shortest routing path from the start routing node to the end routing node according to the start node identifier of the start routing node and the end node identifier of the end routing node to obtain the target routing path.
[0336] Optionally, in this embodiment, it is possible but not limited to calculate the shortest routing path from the starting routing node to the final routing node based on the starting node identifier of the starting routing node and the final node identifier of the final routing node in the following manner to obtain the target routing path: When the positional relationship also indicates that the starting routing node is directly connected to the final node set where the final routing node is located, determine the next hop as the first routing node in the final node set that is connected to the starting node set where the starting routing node is located. Wherein, when the first routing node is the final routing node, determine that the shortest routing path is from the starting routing node to the final routing node; when the first routing node is not the final routing node, determine that the shortest routing path includes the starting routing node, the first routing node, and the final routing node; when the positional relationship also indicates that the starting routing node is not directly connected to the final node set where the final routing node is located, detect whether there is a second routing node in the starting node set where the starting routing node is located that is directly connected to the final node set where the final routing node is located; when there is a second routing node in the starting node set, determine the next hop as the second routing node and the second hop as the third routing node in the final node set that is directly connected to the second routing node; when the third routing node is the final routing node, determine that the shortest routing path includes the starting routing node, the second routing node, and the final routing node; when the third routing node is not the final routing node, determine that the shortest routing path includes the starting routing node, the second routing node, the third routing node, and the final routing node; when there is no second routing node in the starting node set, calculate the shortest routing path from the starting routing node to the final routing node based on the binary numbers of the starting node identifier and the final node identifier to obtain the target routing path.
[0337] Optionally, in this embodiment, each node set has a set identifier, and the node identifier of each network node includes a set identifier field and a connection identifier field. The set identifier field is used to record the set identifier of the target node set where each network node is located, and the connection identifier field is used to record the set identifier of the reference node set connected by the target node set through each network node. N The set identifiers of 2 N-1an integer; when N is 3, it is possible but not limited to calculate the shortest routing path from the starting routing node to the final routing node according to the binary number of the starting node identifier and the binary number of the final node identifier in the following way to obtain the target routing path: perform a bitwise exclusive OR operation on the binary number of the starting set identifier in the starting node identifier and the binary number of the final set identifier in the final node identifier to obtain the operation result; when the operation result is 111 and the starting set identifier belongs to the target identifier set, determine that the shortest routing path is to route from the starting routing node to the intermediate node set of the first set identifier, and then route from the intermediate node set of the first set identifier to the final routing node, where the first set identifier is the bitwise exclusive OR result of the binary number of the starting set identifier and 011, and the target identifier set includes 0, 1, 2, and 3; when the operation result is 111 and the starting set identifier does not belong to the target identifier set, determine that the shortest routing path is to route from the starting routing node to the intermediate node set of the second set identifier, and then route from the intermediate node set of the second set identifier to the final routing node, where the second set identifier is the bitwise exclusive OR result of the binary number of the starting set identifier and 010, and the target identifier set includes 0, 1, 2, and 3; when the operation result is 101, determine that the shortest routing path is to route from the starting routing node to the intermediate node set of the third set identifier, and then route from the intermediate node set of the third set identifier to the final routing node, where the third set identifier is the bitwise exclusive OR result of the binary number of the starting set identifier and 100; when the operation result is other operation results except 111 and 101, determine that the shortest routing path is to route from the starting routing node to the intermediate node set of the fourth set identifier, and then route from the intermediate node set of the fourth set identifier to the final routing node, where the fourth set identifier is the bitwise exclusive OR result of the binary number of the starting set identifier and 010.
[0338] In an alternative embodiment, taking N equal to 3, that is, the combination of a triangular structure and a three-dimensional hypercube structure as an example, a routing method for an interconnection network is provided. The source routing node S = (i S , j S ) is the above-mentioned starting routing node, and the target routing node D = (i D , j D ) is the above-mentioned final routing node. This routing method includes the following steps:
[0339] The first step: Determine whether i S and i D are equal: If i S = i D , it indicates that S and D are in the same triangular structure, and S can reach D by performing one-step routing inside the triangle, and the routing ends; if i S ≠ i D, indicating that S and D are not in the same triangular structure, proceed to the second step.
[0340] Second step: Determine j S and i D Are they equal: If j S = i D , indicating that the triangular structures where S and D are located are directly connected, proceed to the fourth step; If j S ≠i D , indicating that S is not directly connected to the triangular structure where D is located, proceed to the third step.
[0341] Third step: Determine whether there is a node in the triangle where S is located that is directly connected to the triangular structure where D is located. If there is, perform routing inside the triangle where S is located to the node directly connected to the triangular structure where D is located, update S, and proceed to the fourth step; If not, proceed to the sixth step.
[0342] Fourth step: At this time, the triangular structures where S and D are located are directly connected, so route directly from S to the triangular structure where D is located. Routing method: (i S , i D ) → (i D , i S ), update the value of S: S = (i D , i S ), proceed to the fifth step.
[0343] Fifth step: Determine whether i S and j D are equal: If i S = j D is equal, the routing ends; If i S ≠j D , perform routing (i D , i S ) → (i D , j D ), that is, perform routing inside the triangular structure where D is located to D, and the routing ends.
[0344] Sixth step: Perform bitwise XOR on the binary of i S and the binary of i D . Denote the result as I. If I = 111, proceed to the seventh step; If I = 101, proceed to the eighth step; Otherwise, proceed to the ninth step.
[0345] Seventh step: I = 111: Determine whether i S belongs to {0, 1, 2, 3}. If it does, proceed to 7.1; Otherwise, proceed to 7.2.
[0346] 7.1 Calculate bin(i S)^011, the triangle where S is located is connected to the S )^011th triangle, and the S )^011th triangle is connected to the triangle where D is located. S needs to first route to the S )^011th triangle, and the routing method is the same as above; then route from the S )^011th triangle to D, and the routing method is the same as above; the routing ends.
[0347] 7.2 Calculate bin(i S )^010, the triangle where S is located is connected to the S )^010th triangle, and the S )^010th triangle is connected to the triangle where D is located. S needs to first route to the S )^010th triangle, and the routing method is the same as above; then route from the S )^010th triangle to D, and the routing method is the same as above; the routing ends.
[0348] Eighth step: Calculate bin(i S )^100, the triangle where S is located is connected to the S )^100th triangle, and the S )^100th triangle is connected to the triangle where D is located. S needs to first route to the S )^100th triangle, and the routing method is the same as above; then route from the S )^100th triangle to D, and the routing method is the same as above; the routing ends.
[0349] Ninth step: Calculate bin(i S )^010, the triangle where S is located is connected to the s )^010th triangle, and the s )^010th triangle is connected to the triangle where D is located. S needs to first route to the s )^010th triangle, and the routing method is the same as above; then route from the S )^010th triangle to D, and the routing method is the same as above; the routing ends.
[0350] Taking the source routing node S = (i S , j S ) = (1, 2) and the target routing node D = (i D , j D ) = (3, 0) as an example, the routing method includes the following steps:
[0351] Step 1: Determine whether i S and i D are equal: i S ≠i D , indicating that S and D are not in the same triangular structure, and proceed to Step 2.
[0352] Step 2: Determine whether j S and i D are equal: j S ≠i D , indicating that S is not directly connected to the triangular structure where D is located, and proceed to Step 3.
[0353] Step 3: Determine whether there is a node in the triangle where S is located that is directly connected to the s triangular structure where D is located. If so, perform routing within the triangle where S is located, routing to the node that is directly connected to the s triangular structure where D is located, and perform routing: (i S , j S ) → (i S , i D ): (1, 2) → (1, 3), that is, perform routing within the triangular structure where S is located, routing to the routing node (1, 3) that is directly connected to the triangular structure where D is located, and update the value of S: S = (1, 3), and proceed to Step 4.
[0354] Step 4: At this time, the triangular structures where S and D are located are directly connected, so route directly from S to the triangular structure where D is located. The routing method is: (i S , i D ) → (i D , i S ): (1, 3) → (3, 11, update the value of S: S = (i D , i S ) = (3, 1), and proceed to Step 5.
[0355] Step 5: Determine whether i S and j D are equal: i S ≠j D , perform routing (i D , i S ) → (i D , j D ): (3, 1) → (3, 0), that is, perform routing within the triangular structure where D is located, routing to D, and the routing ends.
[0356] With the source routing node S = (i S , j S ) = (1, 31, the target routing node D = (i D , j D) = (6, 7) as an example, the routing method includes the following steps:
[0357] The first step: Determine whether i S and i D are equal: i S ≠i D , indicating that S and D are not in the same triangular structure, enter the second step.
[0358] The second step: Determine whether j S and i D are equal: j S ≠i D , indicating that S is not directly connected to the triangular structure where D is located, enter the third step.
[0359] The third step: Determine whether there is a node directly connected to the s triangular structure where D is located inside the triangle where S is located. If not, enter the sixth step.
[0360] The sixth step: The binary of i S is XORed with the binary of i D by bit, and the result is denoted as I. I = 111 enters the seventh step.
[0361] The seventh step: I = 111: Determine whether i S belongs to {0, 1, 2, 3}. If it belongs, enter 7.1.
[0362] 7.1 Calculate bin(i S ) ^ 011 = 001 ^ 011 = 010. The triangle where S is located is connected to the 010th (i.e., the 2nd) triangle, and the 010th triangle is connected to the triangle where D is located. S needs to first route to the 010th triangle, and the routing method is the same as above; then route from the 010th triangle to D, and the routing method is the same as above, which will not be elaborated here; the routing ends.
[0363] Taking the source routing node S = (i S , j S ) = (0, 2) and the target routing node D = (i D , j D ) = (1, 3) as an example, the routing method includes the following steps:
[0364] The first step: Determine whether i S and i D are equal: i S ≠i D , indicating that S and D are not in the same triangular structure, enter the second step.
[0365] The second step: Determine whether j S and i D are equal: jS ≠i D , indicating that S is not directly connected to the triangular structure where D is located, proceed to the third step.
[0366] Third step: Determine whether there is a node directly connected to the s triangular structure where D is located inside the triangle where S is located. If not, proceed to the sixth step.
[0367] Sixth step: i S The binary of and i D The binary of is XORed with the binary of bit by bit, and the result is denoted as I. If I≠111 and I≠101, proceed to the ninth step.
[0368] Ninth step: Calculate bin(i S )^010 = 000^010 = 010. The triangle where S is located is connected to the 010th (i.e., the second) triangle, and the 010th triangle is connected to the triangle where D is located. S needs to be routed to the 010th triangle first, and the routing method is the same as above; then it is routed from the 010th triangle to D, and the routing method is the same as above, which will not be elaborated here; the routing ends.
[0369] In a network that requires 24 routing nodes, the four-dimensional cube contains 16 nodes. Therefore, a five-dimensional cube network topology needs to be adopted. The five-dimensional cube contains 32 routing nodes, the network diameter is 5, the out-degree and in-degree of each routing node are 5, and there are 8 routing nodes idle, resulting in a waste of resources. Therefore, in order to save resources, the above-mentioned topological structure combining a triangle and a three-dimensional hypercube is proposed. This topological structure contains 24 routing nodes, the network diameter is still 5, but the out-degree and in-degree of each routing node are 3, which is more conducive to the backend layout and wiring. And a specific routing algorithm is given, and the algorithm scheme is simple and easy to be implemented in hardware.
[0370] In this embodiment, another topological structure of an interconnection network is also provided. The interconnection network includes N node sets, each node set includes 8 network nodes, and N is a positive integer greater than 2; the 8 network nodes included in each node set are divided into a first node set and a second node set, and the first node set and the second node set respectively include 4 network nodes. The 4 network nodes in the first node set are connected to the 4 network nodes in the second node set in one-to-one correspondence; the 4 network nodes in the first node set are sequentially connected in a ring. The 4 network nodes in the second node set include a first network node, a second network node, a third network node, and a fourth network node. The first network node is connected to the third network node and the fourth network node, and the second network node is connected to the third network node and the fourth network node; the target network nodes included in each node set are connected to the reference network nodes at the same positions in the other N-1 node sets.
[0371] With this topology structure, while expanding the number of network nodes, the growth of the network diameter is controlled, thereby controlling the growth of network latency. Therefore, the technical problem of relatively large network communication latency in the multi-dimensional hypercube interconnection network can be solved, achieving the technical effect of reducing the network communication latency of the multi-dimensional hypercube interconnection network.
[0372] Optionally, in this embodiment, the four network nodes in the first node set include the fifth network node, the sixth network node, the seventh network node, and the eighth network node; the fifth network node is connected to the first network node, the sixth network node is connected to the second network node, the seventh network node is connected to the third network node, and the eighth network node is connected to the fourth network node; the fifth network node is connected to the sixth network node, the sixth network node is connected to the seventh network node, the seventh network node is connected to the eighth network node, and the eighth network node is connected to the fifth network node.
[0373] In an alternative embodiment, when N is 3, the topology structure of the interconnection network can be regarded as a combination of a three-dimensional hypercube structure and a triangular structure. Figure 26 It is a schematic diagram of the construction process of a topology structure of an interconnection network according to an embodiment of the present application. Figure 1 , such as Figure 26 shown, the construction process of the topology structure of the interconnection network may but is not limited to include: First, construct 3 three-dimensional hypercube structures. Then, each three-dimensional hypercube structure is encoded in the manner of 3-bit binary numbers, and the three three-dimensional hypercube structures are numbered 0, 1, and 2 respectively. Finally, the network nodes with the same encoding (i.e., the network nodes in the same position) in the three structures are connected according to the connection method of the triangular network. For example, the routing nodes with the encoding of 000 in the three three-dimensional hypercube structures numbered 0, 1, and 2 are connected according to the connection method of the triangular network. After all the nodes are connected according to the connection method of the triangular network, the topology structure of the interconnection network is obtained. In the topology structure of this interconnection network, there are 24 network nodes, the network diameter between the network nodes within the same three-dimensional hypercube is 2, the diameter of the entire topology network is 3, and the out-degree and in-degree of each network node are 5.
[0374] In another alternative embodiment, when N is 4, the topology structure of the interconnection network can be regarded as a combination of a three-dimensional hypercube structure and a triangular pyramid structure. Figure 27 It is a schematic diagram of the construction process of a topology structure of an interconnection network according to an embodiment of the present application. Figure 2 , such as Figure 27As shown in the figure, the construction process of the topology structure of the interconnection network may but is not limited to include: First, construct 4 three-dimensional hypercube structures. Then, the network nodes in each three-dimensional hypercube structure are encoded as three-bit binary numbers, and the 4 three-dimensional hypercube structures are numbered 0, 1, 2, and 3 respectively. Finally, the network nodes with the same encoding in the four structures are connected according to the connection method of the triangular pyramid network. For example, the routing nodes with the encoding of 000 in the four three-dimensional hypercube structures numbered 0, 1, 2, and 3 are connected according to the connection method of the triangular pyramid network. After all the nodes are connected according to the connection method of the triangular pyramid network, the topology structure of the interconnection network is obtained. There are 32 network nodes in the topology structure of the interconnection network. The network diameter between the network nodes within the same three-dimensional hypercube is 2, the diameter of the entire topology network is 3, and the out-degree and in-degree of each network node are 6.
[0375] Optionally, in this embodiment, each node set has a set identifier; the node identifier of each network node includes a set identifier field and a node identifier field, where the set identifier field is used to record the set identifier of the target node set where each network node is located, and the node identifier in the node identifier field is a 3-bit binary number.
[0376] Optionally, in this embodiment, the network nodes with the same node identifier field among the respective node sets are connected to each other.
[0377] Optionally, in this embodiment, the highest bit of the identifier of the network nodes in the first node set is 1, and the highest bit of the identifier of the network nodes in the second node set is 0; the operation results of the identifiers of the network nodes in the first node set respectively performing bitwise exclusive OR operations with 001, 010, and 100 are the identifiers of the 3 directly connected network nodes; the operation results of the identifiers of the network nodes in the second node set respectively performing bitwise exclusive OR operations with 011, 010, and 100 are the identifiers of the 3 directly connected network nodes.
[0378] In this embodiment, a routing method for an interconnection network is also provided, which is applied to the topology structure of any of the above interconnection networks. This routing method is used to route from the starting routing node in the target sub-network to the final routing node in the target sub-network. Figure 28 It is a schematic diagram of a routing method for an interconnection network according to an embodiment of the present application. Figure 2 As Figure 28 shown, this method may but is not limited to include the following steps:
[0379] Step S2802, according to the starting node set where the starting routing node is located and the final node set where the final routing node is located, detect the set relationship between the starting node set and the final node set;
[0380] Step S2804, when the set relationship is used to indicate that the start node set and the end node set are the same node set, calculate the shortest routing path from the start routing node to the end routing node to obtain the target routing path; when the set relationship is used to indicate that the start node set and the end node set are different node sets, determine that the target routing path includes a first-stage routing path and a second-stage routing path, where the first-stage routing path is to route from the start routing node to an intermediate routing node, and the intermediate routing node is a network node in the end node set that is connected to the start routing node, and the second-stage routing path is the shortest routing path from the intermediate routing node to the end routing node;
[0381] Step S2806, route from the start routing node to the end routing node according to the target routing path.
[0382] Through the above steps, while expanding the number of network nodes, the growth of the network diameter is controlled, thereby controlling the growth of network latency. Therefore, the technical problem of relatively large network communication latency in a multi-dimensional hypercube interconnection network can be solved, and the technical effect of reducing the network communication latency of the multi-dimensional hypercube interconnection network can be achieved.
[0383] Optionally, in this embodiment, before determining that the target routing path includes a first-stage routing path and a second-stage routing path, the second-stage routing path can be planned but not limited to by the following methods: obtain the intermediate node identifier of the intermediate routing node and the end node identifier of the end routing node; calculate the shortest routing path from the intermediate routing node to the end routing node according to the intermediate node identifier, the end node identifier, and the node set where the intermediate routing node is located to obtain the second-stage routing path.
[0384] Optionally, in this embodiment, the shortest routing path from the intermediate routing node to the end routing node can be calculated but not limited to by the following methods according to the intermediate node identifier, the end node identifier, and the node set where the intermediate routing node is located to obtain the second-stage routing path: determine the connection relationship between the intermediate routing node and the end routing node according to the intermediate node identifier, the end node identifier, and the node set where the intermediate routing node is located; calculate the shortest routing path as the second-stage routing path according to the connection relationship and the node set where the intermediate routing node is located.
[0385] Optionally, in this embodiment, when the highest bit of the identifier of the network node in the first node set is 0 and the highest bit of the identifier of the network node in the second node set is 1, the following methods may be used, but are not limited to, to determine the connection relationship between the intermediate routing node and the final routing node based on the intermediate node identifier, the final node identifier, and the node set where the intermediate routing node is located: When the intermediate routing node is in the first node set and the result of the bitwise XOR operation between the intermediate node identifier and the final node identifier is one of 001, 010, and 100, determine that the connection relationship is a direct connection between the intermediate routing node and the final routing node; when the intermediate routing node is in the second node set and the result of the bitwise XOR operation between the intermediate node identifier and the final node identifier is one of 011, 010, and 100, determine that the connection relationship is a direct connection between the intermediate routing node and the final routing node; when the intermediate routing node is in the first node set and the result of the bitwise XOR operation between the intermediate node identifier and the final node identifier is a value other than 001, 010, and 100, determine that the connection relationship is not a direct connection between the intermediate routing node and the final routing node; when the intermediate routing node is in the second node set and the result of the bitwise XOR operation between the intermediate node identifier and the final node identifier is a value other than 011, 010, and 100, determine that the connection relationship is not a direct connection between the intermediate routing node and the final routing node.
[0386] Optionally, in this embodiment, the following methods may be used, but are not limited to, to calculate the shortest routing path as the second-segment routing path based on the connection relationship and the node set where the intermediate routing node is located: When the connection relationship is a direct connection between the intermediate routing node and the final routing node, determine that the second-segment routing path is a direct route to the final routing node; when the connection relationship is not a direct connection between the intermediate routing node and the final routing node, determine the next hop according to the result of the bitwise XOR operation between the intermediate node identifier and the final node identifier and the node set where the intermediate routing node is located; determine the final routing node as the last hop, where the second-segment routing path includes the next hop and the last hop.
[0387] Optionally, in this embodiment, when the highest bit of the identifier of the network node in the first node set is 0 and the highest bit of the identifier of the network node in the second node set is 1, the following method can be used but is not limited to determining the next hop according to the operation result of the bitwise exclusive OR operation between the intermediate node identifier and the final node identifier and the node set where the intermediate routing node is located: when the intermediate routing node is in the first node set and the operation result is 110 or 011, or when the intermediate routing node is in the second node set and the operation result is 110, split the operation result into two one-hot encodings; randomly select a target one-hot encoding from the two one-hot encodings; perform a bitwise exclusive OR operation between the intermediate node identifier and the target one-hot encoding to obtain the identifier of the next hop; when the intermediate routing node is in the first node set and the operation result is 101, split the operation result into 001 and 100; perform a bitwise exclusive OR operation between the intermediate node identifier and 001 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 100 is the final node identifier; when the intermediate routing node is in the second node set and the operation result is 101, split the operation result into 100 and 001; perform a bitwise exclusive OR operation between the intermediate node identifier and 100 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 001 is the final node identifier; when the intermediate routing node is in the second node set and the operation result is 001, split the operation result into 010 and 011; randomly select a target encoding from 010 and 011; perform a bitwise exclusive OR operation between the intermediate node identifier and the target encoding to obtain the identifier of the next hop; when the intermediate routing node is in the first node set and the operation result is 111, split the operation result into 100 and 011; perform a bitwise exclusive OR operation between the intermediate node identifier and 100 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 011 is the final node identifier; when the intermediate routing node is in the second node set and the operation result is 111, split the operation result into 011 and 100; perform a bitwise exclusive OR operation between the intermediate node identifier and 011 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 100 is the final node identifier.
[0388] In an alternative embodiment, taking N as 3 as an example, a routing method under the topological structure of the above-mentioned interconnected network is provided. Each network node is represented as (i, j), where i is the number of the three-dimensional cube to which the network node belongs, and j is the binary number of the network node; assume the source routing node S = (i S , j S ), and the target routing node D = (i D , j D ). This routing method includes the following steps:
[0389] The first step: Determine iS and i D is equal to: If i S = i D , it indicates that S and D are in the same improved three-dimensional cube. S can reach D by performing one-step routing inside the improved three-dimensional cube. The routing method adopts the routing method in the above three-dimensional cube, and the routing ends; If i S ≠ i D , it indicates that S and D are not in the same triangle, and enter the second step.
[0390] The second step: i S ≠ i D is not equal: S first routes to the improved three-dimensional cube where D is located. The routing method adopts the routing method in the above three-dimensional cube, and the routing ends.
[0391] In another alternative embodiment, taking N as 4 as an example, another routing method under the topology of the above interconnection network is provided. Each network node is represented as (i, j), where i is the number of the three-dimensional cube to which the network node belongs, and j is the binary number of the network node; Assume the source routing node S = (i S , j S ), and the destination routing node D = (i D , j D ). This routing method includes the following steps:
[0392] The first step: Determine whether i S and i D are equal: If i S = i D , it indicates that S and D are in the same improved three-dimensional cube. S can reach D by performing one-step routing inside the three-dimensional cube. The routing method adopts the routing method in the above three-dimensional cube, and the routing ends; If i S ≠ i D , it indicates that S and D are not in the same triangle, and enter the second step.
[0393] The second step: i S ≠ i D is not equal: S first routes to the improved three-dimensional cube where D is located. The routing method adopts the routing method in the above three-dimensional cube, and the routing ends.
[0394] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application.
[0395] In this embodiment, a routing device for a multi-dimensional hypercube interconnection network is further provided, which is applied to the topological structure of the above multi-dimensional hypercube interconnection network. The routing device is used to route from the starting routing node in the target sub-network to the final routing node in the target sub-network. The device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0396] Figure 29 is a structural block diagram of a routing device for a multi-dimensional hypercube interconnection network according to an embodiment of the present application. As Figure 29 shown, the device includes:
[0397] An acquisition module 2902, configured to acquire the starting node identifier of the starting routing node and the final node identifier of the final routing node;
[0398] A calculation module 2904, configured to calculate the shortest routing path from the starting routing node to the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located, to obtain a target routing path;
[0399] A routing module 2906, configured to route from the starting routing node to the final routing node according to the target routing path.
[0400] Through the above steps, for each target sub-network, the 8 target network nodes it includes are divided into a first node set and a second node set. The 4 target network nodes in the first node set are connected in sequence to form a ring. The 4 target network nodes in the second node set include a first network node, a second network node, a third network node, and a fourth network node. By connecting the first network node to the third network node and the fourth network node, and connecting the second network node to the third network node and the fourth network node, the network diameter between the 8 target network nodes in each target sub-network is reduced from the traditional 3 to 2 in this connection mode, thereby reducing the network diameter of each target sub-network, and further reducing the network diameter of the entire interconnected network. When routing in each target sub-network, it is possible to route to other network nodes with at most two hops. Therefore, the technical problem of large network communication delay in the multi-dimensional hypercube interconnected network can be solved, and the technical effect of reducing the network communication delay of the multi-dimensional hypercube interconnected network can be achieved.
[0401] As an alternative implementation, the device is further configured to:
[0402] Determine the connection relationship between the starting routing node and the ending routing node according to the starting node identifier, the ending node identifier, and the node set where the starting routing node is located;
[0403] Calculate the shortest routing path according to the connection relationship and the node set where the starting routing node is located as the target routing path.
[0404] As an alternative implementation, the device is further configured to: perform an exclusive OR operation on the starting node identifier and the ending node identifier to obtain an operation result;
[0405] Determine the connection relationship according to the operation result and the node set where the starting routing node is located.
[0406] As an alternative implementation, when N is 3, the highest bit of the identifier of the network nodes in the first node set is 0, and the highest bit of the identifier of the network nodes in the second node set is 1, the device is further configured to: when the starting routing node is in the first node set and the operation result is one of 001, 010, and 100, determine that the connection relationship is a direct connection between the starting routing node and the ending routing node;
[0407] When the starting routing node is in the second node set and the operation result is one of 011, 010, and 100, determine that the connection relationship is a direct connection between the starting routing node and the ending routing node;
[0408] In the case where the starting routing node is in the first node set and the operation result is a value other than 001, 010, and 100, determine that the connection relationship is that there is no direct connection between the starting routing node and the final routing node;
[0409] In the case where the starting routing node is in the second node set and the operation result is a value other than 011, 010, and 100, determine that the connection relationship is that there is no direct connection between the starting routing node and the final routing node.
[0410] As an optional implementation manner, the device is further configured to:
[0411] In the case where the connection relationship is that there is a direct connection between the starting routing node and the final routing node, determine that the target routing path is to directly route to the final routing node;
[0412] In the case where the connection relationship is that there is no direct connection between the starting routing node and the final routing node, determine the next hop according to the operation result and the node set where the starting routing node is located; determine the final routing node as the last hop, where the target routing path includes the next hop and the last hop.
[0413] As an optional implementation manner, when N is 3, the highest bit of the identifier of the network node in the first node set is 0, and the highest bit of the identifier of the network node in the second node set is 1, the device is further configured to:
[0414] In the case where the starting routing node is in the first node set and the operation result is 110 or 011, or the starting routing node is in the second node set and the operation result is 110, split the operation result into two one-hot encodings; randomly select a target one-hot encoding from the two one-hot encodings; perform a bitwise exclusive OR operation on the starting node identifier and the target one-hot encoding to obtain the identifier of the next hop;
[0415] In the case where the starting routing node is in the first node set and the operation result is 101, split the operation result into 001 and 100; perform a bitwise exclusive OR operation on the starting node identifier and 001 to obtain the identifier of the next hop, where the result of performing a bitwise exclusive OR operation on the identifier of the next hop and 100 is the identifier of the final node;
[0416] When the starting routing node is in the second node set and the operation result is 101, split the operation result into 100 and 001; perform a bitwise exclusive OR operation on the starting node identifier and 100 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 001 is the final node identifier.
[0417] When the starting routing node is in the second node set and the operation result is 001, split the operation result into 010 and 011; randomly select a target code from 010 and 011; perform a bitwise exclusive OR operation on the starting node identifier and the target code to obtain the identifier of the next hop.
[0418] When the starting routing node is in the first node set and the operation result is 111, split the operation result into 100 and 011; perform a bitwise exclusive OR operation on the starting node identifier and 100 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 011 is the final node identifier.
[0419] When the starting routing node is in the second node set and the operation result is 111, split the operation result into 011 and 100; perform a bitwise exclusive OR operation on the starting node identifier and 011 to obtain the identifier of the next hop, where the result of the bitwise exclusive OR operation between the identifier of the next hop and 100 is the final node identifier.
[0420] It should be noted that the above-mentioned modules can be implemented by software or hardware. For the latter, it can be achieved in the following ways, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are respectively located in different processors in any combination form.
[0421] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0422] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drive, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disk, magnetic disk or optical disc, etc., various media that can store computer programs.
[0423] Embodiments of the present application also provide an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0424] In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device. The transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0425] Embodiments of the present application also provide a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0426] Embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0427] Embodiments of the present application also provide a computer program. The computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any one of the above method embodiments.
[0428] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.
[0429] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.
[0430] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included in the protection scope of the present application.
Claims
1. A topological structure of a multidimensional hypercube interconnection network, characterized in that: include: The multidimensional hypercube interconnection network includes 2 N network nodes, N is the dimension of the multi-dimensional hypercube interconnection network, and the multi-dimensional hypercube interconnection network is divided into 2 N-3 sub-networks, N is a positive integer greater than 2; 2 N-3 Each subnetwork in the subnetworks includes 8 target network nodes as a target subnetwork, and the 8 target network nodes included in the target subnetwork are divided into a first node set and a second node set, the first node set and the second node set respectively include 4 target network nodes, and the 4 target network nodes in the first node set are connected to the 4 target network nodes in the second node set in a one-to-one correspondence; The four target network nodes in the first node set are connected in sequence to form a ring, and the four target network nodes in the second node set include a first network node, a second network node, a third network node and a fourth network node, the first network node is connected to the third network node and the fourth network node, and the second network node is connected to the third network node and the fourth network node.
2. The topological structure according to claim 1, characterized in that: When N is greater than 3, the multidimensional hypercube interconnection network is divided into at least 2 sub-networks, the at least 2 sub-networks are connected in sequence, the 8 target network nodes included in the target sub-network are connected one-to-one with the 8 reference network nodes included in the reference sub-network, and the reference sub-network is a sub-network adjacent to the target sub-network in the connection of the at least 2 sub-networks.
3. The topological structure according to claim 2, characterized in that: 2 N The identifier of a network node is an N-bit binary number, the highest N-3 bits of the identifiers of the network nodes on the same subnetwork are the same, the identifier of the target network node is the same as the lowest three bits of the identifier of the directly connected reference network node, and the identifier of the target network node is different from the identifier of the directly connected reference network node by only 1 bit.
4. The topological structure according to claim 3, characterized in that: In each subnetwork, the third to last digit of the identifiers of the network nodes in the first node set is the same, the third to last digit of the identifiers of the network nodes in the second node set is the same, and the third to last digit of the identifiers of the network nodes in the first node set is different from the third to last digit of the identifiers of the network nodes in the second node set.
5. The topological structure according to claim 4, characterized in that: In each sub-network, the third last digit of the identifier of the network node in the first node set is 1, and the third last digit of the identifier of the network node in the second node set is 0.
6. The topological structure according to claim 1, characterized in that: When N is 3, the 2 N The identifier of each network node is a three-digit binary number, and the highest bit of the identifiers of the network nodes in the same node set is the same.
7. The topological structure according to claim 6, characterized in that: The highest bit of the identifiers of the network nodes in the first node set is 1, and the highest bit of the identifiers of the network nodes in the second node set is 0.
8. The topological structure according to claim 7, characterized in that: The identifiers of the network nodes in the first node set are subjected to a bitwise exclusive OR operation with 001, 010, and 100, respectively, and the results are the identifiers of three directly connected network nodes; The results of bitwise exclusive OR operations of the identifiers of the network nodes in the second node set with 011, 010, and 100 are the identifiers of three directly connected network nodes.
9. The topological structure according to claim 1, characterized in that: The four target network nodes in the first node set include a fifth network node, a sixth network node, a seventh network node and an eighth network node; The fifth network node is connected to the first network node, the sixth network node is connected to the second network node, the seventh network node is connected to the third network node, and the eighth network node is connected to the fourth network node; The fifth network node is connected to the sixth network node, the sixth network node is connected to the seventh network node, the seventh network node is connected to the eighth network node, and the eighth network node is connected to the fifth network node.
10. The topological structure according to claim 1, characterized in that: Each target network node is configured to allow one-hop routing to three target network nodes connected in the target subnetwork; Each target network node is configured to allow two-hop routing to four target network nodes that are not connected in the target sub-network.
11. A routing method for a multi-dimensional hypercube interconnection network, characterized in that: The topological structure of the multidimensional hypercube interconnection network applied to any one of claims 1 to 10, wherein the routing method is used to route from a starting routing node in the target subnetwork to a final routing node in the target subnetwork, and the routing method comprises: Obtaining a starting node identifier of the starting routing node and a final node identifier of the final routing node; Calculate the shortest routing path from the starting routing node to the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located, to obtain a target routing path; Routing from the starting routing node to the final routing node according to the target routing path.
12. The method according to claim 11, characterized in that The step of calculating the shortest routing path from the starting routing node to the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located, to obtain a target routing path includes: Determine a connection relationship between the starting routing node and the final routing node according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located; The shortest routing path is calculated according to the connection relationship and the node set where the starting routing node is located as the target routing path.
13. The method according to claim 12, characterized in that The determining, according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located, a connection relationship between the starting routing node and the final routing node includes: Performing a bitwise XOR operation on the starting node identifier and the final node identifier to obtain an operation result; The connection relationship is determined according to the calculation result and the node set where the starting routing node is located.
14. The method according to claim 13, characterized in that When N is 3, the highest bit of the identifier of the network node in the first node set is 0, and the highest bit of the identifier of the network node in the second node set is 1, determining the connection relationship according to the calculation result and the node set where the starting routing node is located includes: When the starting routing node is in the first node set and the operation result is one of 001, 010, and 100, determining that the connection relationship is a direct connection between the starting routing node and the final routing node; When the starting routing node is in the second node set and the operation result is one of 011, 010, and 100, determining that the connection relationship is a direct connection between the starting routing node and the final routing node; When the starting routing node is in the first node set and the operation result is a value other than 001, 010 and 100, determining that the connection relationship is that the starting routing node and the final routing node are not directly connected; When the starting routing node is in the second node set and the calculation result is a value other than 011, 010, and 100, it is determined that the connection relationship is that the starting routing node and the final routing node are not directly connected.
15. The method according to claim 12, characterized in that The calculating the shortest routing path as the target routing path according to the connection relationship and the node set where the starting routing node is located includes: In the case where the connection relationship is a direct connection between the starting routing node and the final routing node, determining the target routing path to be a direct route to the final routing node; In the case where the connection relationship is that there is no direct connection between the starting routing node and the final routing node, the next hop is determined according to the calculation result and the node set where the starting routing node is located; the final routing node is determined as the last hop, wherein the target routing path includes the next hop and the last hop.
16. The method according to claim 15, characterized in that When N is 3, the highest bit of the identifier of the network node in the first node set is 0, and the highest bit of the identifier of the network node in the second node set is 1, determining the next hop according to the calculation result and the node set where the starting routing node is located includes: When the starting routing node is in the first node set and the operation result is 110 or 011, or when the starting routing node is in the second node set and the operation result is 110, split the operation result into two one-hot codes; randomly select a target one-hot code from the two one-hot codes; perform a bitwise XOR operation on the starting node identifier and the target one-hot code to obtain an identifier of the next hop; When the starting routing node is in the first node set and the operation result is 101, split the operation result into 001 and 100; perform a bitwise XOR operation on the starting node identifier and 001 to obtain the identifier of the next hop, wherein the result of the bitwise XOR operation of the identifier of the next hop and 100 is the final node identifier; When the starting routing node is in the second node set and the operation result is 101, split the operation result into 100 and 001; perform a bitwise XOR operation on the starting node identifier and 100 to obtain the identifier of the next hop, wherein the result of the bitwise XOR operation of the identifier of the next hop and 001 is the final node identifier; When the starting routing node is in the second node set and the operation result is 001, split the operation result into 010 and 011; randomly select a target code from 010 and 011; perform a bitwise XOR operation on the starting node identifier and the target code to obtain a next hop identifier; When the starting routing node is in the first node set and the operation result is 111, split the operation result into 100 and 011; perform a bitwise XOR operation on the starting node identifier and 100 to obtain the identifier of the next hop, wherein the result of the bitwise XOR operation of the identifier of the next hop and 011 is the final node identifier; When the starting routing node is in the second node set and the operation result is 111, the operation result is split into 011 and 100; the starting node identifier is bitwise XORed with 011 to obtain the identifier of the next hop, wherein the result of the bitwise XOR operation of the identifier of the next hop and 100 is the final node identifier.
17. A routing device for a multi-dimensional hypercube interconnection network, characterized in that: The topological structure of the multidimensional hypercube interconnection network applied to any one of claims 1 to 10, wherein the routing device is used to route from the target subnetwork to the target subnetwork or the reference subnetwork, and the device comprises: An acquisition module is used to acquire a starting node identifier of a starting routing node and a final node identifier of a final routing node; a calculation module is used to calculate the shortest routing path from the starting routing node to the final routing node according to the starting node identifier, the final node identifier and the node set where the starting routing node is located, and obtain a target routing path; a routing module is used to route from the starting routing node to the final routing node according to the target routing path.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 11 to 17 when executed by a processor.
19. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 11 to 17 are implemented.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 11 to 17 are implemented.
Citation Information
Cited By
Construction method of three-dimensional hypercube network structure, network structure, routing method, equipment, medium and product
CN120750836A