Routing method and device for multi-dimensional hypercube interconnection network
By dividing node sets in a multi-dimensional hypercube interconnect network and adjusting the network topology, the problem of deadlock during routing is solved, and more efficient data transmission and network reliability are achieved.
Patent Information
- Application Number
- CN202510494551.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-06-13
AI Technical Summary
Multi-dimensional hypercube interconnected networks are prone to deadlocks during routing, resulting in network paralysis and affecting data transmission.
By dividing the network nodes in the multi-dimensional hypercube interconnection network into a first node set and a second node set, and connecting the four target network nodes in the first node set into a ring in sequence in each target subnet, the four target network nodes in the second node set shorten the network diameter through a specific connection method, thereby calculating the shortest routing path during the routing process and determining the target sending path according to the path characteristics to avoid deadlocks.
It effectively avoids deadlock during routing, improves network reliability and data transmission efficiency, and reduces network communication delay.
Smart Images

Figure CN120151273A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a routing method and apparatus for a multi-dimensional hypercube interconnection network. Background Art
[0002] With the rapid popularization and development of the Internet and the continuous deployment of the satellite Internet constellation plan, more user terminals are accessing the network, giving rise to Internet applications covering all fields of people's production and life. The traffic on the Internet has shown an explosive growth trend. In order to improve the performance of the information exchange network and meet the emerging new application and service requirements, it is necessary to study switching networks with larger capacities and better performance and the high-performance scheduling algorithms adapted thereto.
[0003] The interconnection network is the key to constructing a high-performance large-scale parallel processing system. 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 the lowest possible cost. Currently, the hypercube method is used to construct the topology structure in the interconnection network. However, the routing algorithm used in the current multi-dimensional hypercube interconnection network is prone to deadlock when routing a routing request that forms a loop. Once deadlock occurs, it may lead to the paralysis of the interconnection network and affect data transmission.
[0004] In view of the problem that deadlock occurs during the routing process of the multi-dimensional hypercube interconnection network in the related art, no effective solution has been proposed yet. Summary of the Invention
[0005] The embodiments of the present application provide a routing method and apparatus for a multi-dimensional hypercube interconnection network, so as to at least solve the problem that deadlock may occur during the routing process in the related art.
[0006] According to an embodiment of the present application, a routing method for a multi-dimensional hypercube interconnection network is provided. The multi-dimensional hypercube interconnection network includes 2 N network nodes, where N is the dimension of the multi-dimensional hypercube interconnection network. The multi-dimensional hypercube interconnection network is divided into 2 N-3 sub-networks, and N is a positive integer greater than 2; the 2 N-3Each sub-network in the 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. 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 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. The second network node is connected to the third network node and the fourth network node. P transmission paths are deployed between the target network node and the directly connected network node, where P is an integer greater than 1;
[0007] The routing method is used to route from a starting routing node in the target sub-network to a final routing node in the target sub-network. The routing method includes:
[0008] 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, to obtain an initial routing path;
[0009] 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, to obtain a target routing path;
[0010] Route from the starting routing node to the final routing node according to the target routing path.
[0011] As an optional implementation manner, the determining 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, to obtain a target routing path includes:
[0012] Detect the path hop count and path quantity of the initial routing path as the path characteristics, where the initial routing path includes all the shortest routing paths that are allowed to route from the starting routing node to the final routing node;
[0013] Determine the target transmission path for each hop in the initial routing path from the P transmission paths according to the path hop count and path quantity, to obtain a target routing path.
[0014] As an alternative implementation manner, determining, according to the path hop count and the path quantity, a target transmission path for each hop in the initial routing path from the P transmission paths to obtain a target routing path includes:
[0015] Filtering out a candidate routing path from the initial routing path according to the path hop count and the path quantity;
[0016] Determining, according to the path quantity, a target transmission path for each hop in the candidate routing path from the P transmission paths to obtain a target routing path.
[0017] As an alternative implementation manner, filtering out a candidate routing path from the initial routing path according to the path hop count and the path quantity includes:
[0018] When the path hop count is 1, directly routing from the starting routing node to the final routing node according to the initial routing path;
[0019] When the path hop count is greater than 1, filtering out a candidate routing path from the initial routing path according to the path quantity.
[0020] As an alternative implementation manner, filtering out a candidate routing path from the initial routing path according to the path quantity includes:
[0021] When the path quantity is 1, determining the initial routing path as the candidate routing path;
[0022] When the path quantity is greater than 1, randomly selecting a routing path from the initial routing path as the candidate routing path.
[0023] As an alternative implementation manner, determining, according to the path quantity, a target transmission path for each hop in the candidate routing path from the P transmission paths to obtain a target routing path includes:
[0024] When the path quantity is 1, randomly determining, for each hop in the candidate routing path, the target transmission path from the P transmission paths to obtain the target routing path;
[0025] When the path quantity is 2, randomly determining, for the next hop in the candidate routing path, the target transmission path from the first path set and randomly determining, for the last hop in the candidate routing path, the target transmission path from the second path set to obtain the target routing path;
[0026] Among them, the P transmission paths are divided into the first path set and the second path set. 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.
[0027] As an alternative implementation, the determining, according to the number of paths, a target transmission path for each hop in the candidate routing path from the P transmission paths to obtain a target routing path includes:
[0028] 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;
[0029] 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;
[0030] Among them, 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.
[0031] As an alternative implementation, the calculating, according to the start node identifier of the start routing node, the end node identifier of the end routing node, and the node set where the start routing node is located, the shortest routing path from the start routing node to the end routing node to obtain an initial routing path includes:
[0032] Determine the connection relationship between the start routing node and the end routing node according to the start node identifier, the end node identifier, and the node set where the start routing node is located;
[0033] Calculate the shortest routing path according to the connection relationship and the node set where the start routing node is located as the initial routing path.
[0034] As an alternative implementation, the determining, according to the start node identifier, the end node identifier, and the node set where the start routing node is located, the connection relationship between the start routing node and the end routing node includes:
[0035] Perform a bitwise exclusive OR operation on the start node identifier and the end node identifier to obtain an operation result;
[0036] Determine the connection relationship according to the operation result and the node set where the starting routing node is located.
[0037] 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:
[0038] 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;
[0039] 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;
[0040] 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;
[0041] 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.
[0042] As an alternative implementation, the calculating 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 includes:
[0043] When the connection relationship is a direct connection between the starting routing node and the final routing node, determine that the initial routing path is a direct route to the final routing node, where the initial routing path includes a shortest routing path;
[0044] 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.
[0045] As an alternative implementation, 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, determining the next hop according to the operation result and the node set where the starting routing node is located includes:
[0046] 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 and 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;
[0047] 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;
[0048] 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;
[0049] 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 and 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;
[0050] 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;
[0051] 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 identifier of the next hop and 100 are the final node identifiers, and the initial routing path includes a shortest routing path.
[0052] 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 method further includes:
[0053] Perform a bitwise exclusive OR operation 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;
[0054] Establish connections between the network nodes in the first node set and the network nodes with the first identifiers, and establish the P sending paths in each connection.
[0055] 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 method further includes:
[0056] Perform a bitwise exclusive OR operation 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;
[0057] Establish connections between the network nodes in the second node set and the network nodes with the second identifiers, and establish the P sending paths in each connection.
[0058] As an alternative implementation, 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, and the method further includes;
[0059] 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;
[0060] 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.
[0061] As an alternative implementation, the method further includes:
[0062] Set each target network node to allow one-hop routing to 3 target network nodes connected in the target subnetwork;
[0063] Set each target network node to allow two-hop routing to 4 target network nodes not connected in the target subnetwork.
[0064] According to another embodiment of the present application, there is provided a routing device for a multi-dimensional hypercube interconnection network. The multi-dimensional hypercube interconnection network includes 2 N network nodes, where N is the dimension of the multi-dimensional hypercube interconnection network. The multi-dimensional hypercube interconnection network is divided into 2 N-3 subnetworks, and N is a positive integer greater than 2; each of the 2 N-3 subnetworks serves as a target subnetwork and includes 8 target network nodes. 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 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 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. The second network node is connected to the third network node and the fourth network node. P transmission paths are deployed between the target network node and the directly connected network node, and P is an integer greater than 1;
[0065] The routing device is used to route from a starting routing node in the target subnetwork to a final routing node in the target subnetwork. The routing device includes:
[0066] 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 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, to obtain an initial routing path;
[0067] A determination module, configured to 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, to obtain a target routing path;
[0068] A routing module, configured to route from the starting routing node to the final routing node according to the target routing path.
[0069] According to another embodiment of the present application, there is also provided a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0070] According to another embodiment of the present application, there is also provided an electronic device including a memory and a processor, where the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0071] According to another embodiment of the present application, there is also provided a computer program product including a computer program, and the computer program implements the steps in any one of the above method embodiments when executed by a processor.
[0072] Through the present application, through the above steps, for each target sub-network, the eight target network nodes included therein are divided into a first node set and a second node set. The four target network nodes in the first node set are sequentially connected in 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 between 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. During the routing process, first, an initial routing path is planned according to the shortest routing path, and then the transmission path of each hop is planned according to the path characteristics of the initial routing path to obtain the target routing path, so that the planned target routing path can avoid the phenomenon of deadlock. Therefore, the technical problem that the routing process may have a deadlock phenomenon in the related art can be solved, and the technical effect of avoiding the deadlock phenomenon in the routing process can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 is a structural block diagram of a topological structure of a multi-dimensional hypercube interconnected network according to an embodiment of the present application;
[0074] Figure 2 is a structural block of a topological structure of a three-dimensional hypercube interconnected network according to an embodiment of the present application Figure 1 ;
[0075] Figure 3 is a structural block of a topological structure of a three-dimensional hypercube interconnected network according to an embodiment of the present application Figure 2 ;
[0076] Figure 4 is the process flow of a routing method for a multi - dimensional hypercube interconnection network according to an embodiment of the present application Figure 1 ;
[0077] Figure 5 is a schematic diagram of the routing process in a ring topology structure according to an embodiment of the present application;
[0078] Figure 6 is the process flow of a routing method for a multi - dimensional hypercube interconnection network according to an embodiment of the present application Figure 2 ;
[0079] Figure 7 is a schematic of the routing process in a ring topology structure according to an embodiment of the present application Figure 1 ;
[0080] Figure 8 is a schematic of the routing process in a ring topology structure according to an embodiment of the present application Figure 2 ;
[0081] Figure 9 is a schematic of the routing process in a ring topology structure according to an embodiment of the present application Figure 3 ;
[0082] Figure 10 is the process flow of a routing method for a multi - dimensional hypercube interconnection network according to an embodiment of the present application Figure 3 ;
[0083] Figure 11 is a schematic diagram of the path label of a sending path according to an embodiment of the present application;
[0084] Figure 12 is a schematic of a routing path according to an embodiment of the present application Figure 1 ;
[0085] Figure 13 is a schematic of the routing process in a ring topology structure according to an embodiment of the present application Figure 4 ;
[0086] Figure 14 is a schematic of the routing process in a ring topology structure according to an embodiment of the present application Figure 5 ;
[0087] Figure 15 is a schematic of the routing process in a ring topology structure according to an embodiment of the present application Figure 6 ;
[0088] Figure 16 is a schematic of a routing path according to an embodiment of the present application Figure 2 ;
[0089] Figure 17 It is a schematic diagram of the routing process in a ring topology structure according to an embodiment of the present application Figure 7 ;
[0090] Figure 18 It is a schematic diagram of the routing process in a ring topology structure according to an embodiment of the present application Figure 8 ;
[0091] Figure 19 It is a schematic diagram of the routing process in a ring topology structure according to an embodiment of the present application Figure 9 ;
[0092] Figure 20 It is a structural block diagram of the topology structure of a four-dimensional hypercube interconnection network according to an embodiment of the present application; Figure 21 It is a structural block diagram of an inner three-dimensional cube according to an embodiment of the present application;
[0093] Figure 22 It is a structural block diagram of an outer three-dimensional cube according to an embodiment of the present application;
[0094] 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;
[0095] Figure 24 It is a structural block diagram of the topology structure of an interconnection network according to an embodiment of the present application;
[0096] Figure 25 It is a schematic diagram of a routing method for an interconnection network according to an embodiment of the present application Figure 1 ;
[0097] Figure 26 It is a schematic diagram of the construction process of the topology structure of an interconnection network according to an embodiment of the present application Figure 1 ;
[0098] Figure 27 It is a schematic diagram of the construction process of the topology structure of an interconnection network according to an embodiment of the present application Figure 2 ;
[0099] 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 ;
[0100] 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. Specific embodiments
[0101] In the following, embodiments of the present application will be described in detail with reference to the drawings and in conjunction with the embodiments.
[0102] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0103] 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 this 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; each of the 2 N-3 sub-networks serves as a 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 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 a first network node 10-0, a second network node 10-1, a third network node 10-2, and a 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.
[0104] Through this topological structure, 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 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.
[0105] 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 network-wide process of determining 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.
[0106] In this embodiment, the network node may but is not limited to including a terminal node. A terminal node is any system or a group 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.
[0107] 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.
[0108] In this embodiment, the topology of the above multi-dimensional hypercube interconnection network has symmetry, regularity, path diversity, and scalability.
[0109] 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 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.
[0110] 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 in the same position in adjacent sub-networks are connected to each other.
[0111] The improved multi - dimensional hypercube interconnection network described above has a shorter network diameter compared with the traditional multi - dimensional hypercube interconnection network, which can effectively reduce the network transmission delay. And the routing algorithm logic applicable to the improved multi - dimensional hypercube interconnection network under this topological structure is simpler and easier to be implemented in hardware.
[0112] In an optional example, the network nodes can be but are not limited to being 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.
[0113] Optionally, in this embodiment, in each sub - network, the third - last bit of the identifiers of the network nodes in the first node set is the same, the third - last bit of the identifiers of the network nodes in the second node set is the same, and the third - last bit of the identifiers of the network nodes in the first node set is different from the third - last bit of the identifiers of the network nodes in the second node set.
[0114] Optionally, in this embodiment, in each sub - network, the third - last bit of the identifiers of the network nodes in the first node set is 1, and the third - last bit of the identifiers of the network nodes in the second node set is 0.
[0115] Identifying the network nodes in the above - mentioned way makes the node identifiers of the network nodes in the same node set have certain rules, which is easy to implement the routing algorithm.
[0116] 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 topological structure of a three - dimensional hypercube interconnection network according to an embodiment of the present application. Figure 1 As Figure 2 shown, 1 sub - network is used as the target sub - network and 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. Each of the first node set and the second node set includes 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 the first network node 0, the second network node 1, the third network node 2, and the 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.
[0117] 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.
[0118] Optionally, in this embodiment, the most significant bit of the identification of the network nodes in the first node set is 1, and the most significant bit of the identification of the network nodes in the second node set is 0.
[0119] Optionally, in this embodiment, the operation results of performing bit - wise exclusive - OR operations on the identifications of the 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 the network nodes in the second node set with 011, 010, and 100 respectively are the identifications of 3 directly - connected network nodes.
[0120] 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.
[0121] Figure 3 is a structural frame of a three - dimensional hypercube interconnection network topology 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 encoded as 100, 101, 110, and 111 in sequence, 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.
[0122] 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.
[0123] For the four routing nodes 100, 101, 110, and 111, the binary numbers of each routing node are successively XORed with 001, 010, and 100 bit by bit to obtain the routing nodes directly connected to it; for example, for the routing node 101, its binary number is successively XORed with 001, 010, and 100 bit by bit to obtain 100, 111, and 001, and these three nodes are exactly the four routing nodes directly connected to 101.
[0124] For the four routing nodes 000, 001, 010, and 011, the binary numbers of each routing node are successively XORed with 011, 010, and 100 bit by bit to obtain the routing nodes directly connected to it; for example, for the routing node 010, its binary number is successively XORed with 011, 010, and 100 bit by bit to obtain 001, 000, and 110, and these three nodes are exactly the four routing nodes directly connected to 010.
[0125] 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, XORing with 001, 010, and 100 can obtain the three routing nodes directly connected to it; three adjacent routing nodes can be directly reached in one hop. For example, for the routing node 100, XORing it with 001, 010, and 100 can obtain the directly connected routing nodes 101, 110, and 000, and can be directly routed. In addition, XORing with 101, 011, 110, and 111 obtains four routing nodes, and these four routing nodes can be reached in two hops; for example, for the routing node 100, XORing it with 101, 011, 110, and 111 obtains the four routing nodes 001, 111, 010, and 011, and can be reached in two hops.
[0126] 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, XORing with 011, 010, and 100 can obtain the three routing nodes directly connected to it; three adjacent routing nodes can be directly reached in one hop. For example, for the routing node 001, XORing it with 011, 010, and 100 can obtain the directly connected routing nodes 010, 011, and 101, and can be directly routed. In addition, XORing with 101, 001, 110, and 111 obtains four routing nodes, and these four routing nodes can be reached in two hops; for example, for the routing node 001, XORing it with 101, 001, 110, and 111 obtains the four routing nodes 100, 000, 111, and 110, and can be reached in two hops.
[0127] In the above improved three-dimensional hypercube interconnection network, the network diameter between routing nodes is 2.
[0128] 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 a flowchart of a routing method for a multi-dimensional hypercube interconnection network according to an embodiment of the present application. Figure 1 , as Figure 4 shown, this process includes the following steps:
[0129] Step S402, obtain the starting node identifier of the starting routing node and the final node identifier of the final routing node;
[0130] 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;
[0131] Step S406, route from the starting routing node to the final routing node according to the target routing path.
[0132] 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 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. 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 interconnection network. When routing in each target sub-network, it is possible to route to other network nodes within at most two hops. 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.
[0133] Optionally, in this embodiment, this routing method can be but is not limited to being deployed on each network node.
[0134] In an optional example, in step S404 above, the shortest routing path from the starting routing node to the final routing node can be calculated, but is not limited to the following methods, based on the starting node identifier, the final node identifier, and the node set where the starting routing node is located, to obtain the target routing path: Determine 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; 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.
[0135] 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 based on the connection relationship and the node set where the starting routing node is located.
[0136] In an optional example, the connection relationship between the starting routing node and the final routing node can be determined, but is not limited to the following methods, based on the starting node identifier, the final node identifier, and the node set where the starting routing node is located: 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.
[0137] Optionally, in this embodiment, the connection relationship between the starting routing node and the final routing node can be determined, but is not limited to being determined according to the operation result between the node identifiers and the node set where the starting routing node is located.
[0138] 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, but is not limited to the following methods, based on 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 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.
[0139] In an optional example, the shortest routing path can be calculated as the target routing path according to the connection relationship and the node set where the starting routing node is located, but not limited to the following method: when the connection relationship is a direct connection between the starting routing node and the final routing node, determine the target routing path as directly routing to the final routing node; 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.
[0140] 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. First, the next hop can be determined according to the operation result and the node set where the starting routing node is located, and the target routing path can be obtained by taking the final routing node as the last hop.
[0141] In an optional example, when N is 3, the highest bit of the identification of the network nodes in the first node set is 0, and the highest bit of the identification of the network nodes in the second node set is 1, the following method can be used, but is 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 identification and the target one-hot encoding to obtain the identification 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 identification and 001 to obtain the identification of the next hop, where the result of the bitwise exclusive OR operation of the identification of the next hop and 100 is the identification 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 identification and 100 to obtain the identification of the next hop, where the result of the bitwise exclusive OR operation of the identification of the next hop and 001 is the identification 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 identification and the target encoding to obtain the identification 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 identification and 100 to obtain the identification of the next hop, where the result of the bitwise exclusive OR operation of the identification of the next hop and 011 is the identification 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 identification and 011 to obtain the identification of the next hop, where the result of the bitwise exclusive OR operation of the identification of the next hop and 100 is the identification of the final node.
[0142] Optionally, in this embodiment, one-hot encoding, also known as one-hot encoding, has only one bit as 1, or only one bit is valid.
[0143] In an optional implementation manner, a routing algorithm applied to the topological structure of the above three-dimensional hypercube interconnection network is provided. First, 8 network nodes are grouped and marked as follows: N 1 ={100, 101, 110, 111} and N 2= {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:
[0144] 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).
[0145] Step 2: Determine the value of the source routing node S. If it belongs to N 1 , proceed to Step 3; if it belongs to N 2 , proceed to Step 4.
[0146] 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.
[0147] If the value of I is one of 110, 011, split I into two one-hot encodings I = I 1 ^I 2 , and then in a random manner, the two one-hot encodings are respectively XORed with the routing node S; the routing ends.
[0148] 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 = I 1 ^I 2 = 001^010, and then in ascending order, the two one-hot encodings are respectively XORed with the routing node S:
[0149]
[0150] If the value of I is 101, split I, I = I 1 ^I 2 = 001^100, I 1 , I 2 are sequentially XORed with the routing node S in order; the routing ends.
[0151] For example: S is the routing node 100, D is the routing node 001. After bitwise XOR, I = 101. Split I into two one-hot encodings I = I 1 ^I 2 = 001^100, and then in order, the two one-hot encodings are respectively XORed with the routing node S:
[0152]
[0153] If the value of I is 111, split I, I = I 1 ^I 2 = 100^011, I 1 , I 2 Perform exclusive OR with the routing node S in sequence; the routing ends.
[0154] For example: S is the routing node 100, D is the routing node 011, after bitwise exclusive OR, I = 111, split I into two one-hot encodings I = I 1 ^I 2 = 001^100, and then in sequential order, the two one-hot encodings are respectively exclusive ORed with the routing node S:
[0155]
[0156] Fourth step: Judge 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 can be directly routed.
[0157] If the value of I is 110, split I into two one-hot encodings I = I 1 ^I 2 = 010^100, and then in a random way, the two one-hot encodings are respectively exclusive ORed with the routing node S; the routing ends.
[0158] For example: S is the routing node 001, D is the routing node 111, after bitwise exclusive OR, I = 110, split I into two one-hot encodings I = I 1 ^I 2 = 010^100, and then in a random way, the two one-hot encodings are respectively exclusive ORed with the routing node S:
[0159]
[0160] If the value of I is 101, split I into two one-hot encodings I = I 1 ^I 2 = 100^001, and then in sequential order, the two one-hot encodings are respectively exclusive ORed with the routing node S; the routing ends.
[0161] For example: S is the routing node 001, D is the routing node 101, after bitwise exclusive OR, I = 101, split I into two one-hot encodings I = I 1 ^I 2 = 100^001, and then in sequential order, the two one-hot encodings are respectively exclusive ORed with the routing node S:
[0162]
[0163] If the value of I is 001, split I into two encodings I = I 1 ^I 2 = 010^011, and then in a random manner, the two one - hot encodings are respectively XORed with the routing node S; the routing ends.
[0164] For example: S is the routing node 001, D is the routing node 000, after bit - wise XOR, I = 001, split I into two one - hot encodings I = I 1 ^I 2 = 010^011, and then in a random manner, the two one - hot encodings are respectively XORed with the routing node S:
[0165]
[0166] If the value of I is 111, split I into two encodings I = I 1 ^I 2 = 011^100, and then in a sequential manner, the two one - hot encodings are respectively XORed with the routing node S; the routing ends.
[0167] For example: S is the routing node 001, D is the routing node 110, after bit - wise XOR, I = 111, split I into two one - hot encodings I = I 1 ^I 2 = 011^100, and then in a sequential manner, the two one - hot encodings are respectively XORed with the routing node S:
[0168]
[0169] For a ring - shaped topology, deadlock may occur during the routing process. For example: Figure 5 is a schematic diagram of the routing process in a ring - shaped topology according to an embodiment of the present application, as Figure 5 shown. Suppose there are four routing requests at the same time, request 1 to request 4, where 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 the clockwise routing and have occupied the intermediate network node, a clockwise deadlock occurs. On the contrary, if all randomly select the counter - clockwise routing and have occupied the intermediate network node, a counter - clockwise deadlock will occur.
[0170] 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 topological structure of the multi-dimensional hypercube interconnection network is any one of the above topological 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 It is the flowchart 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 process includes the following steps:
[0171] Step S602, 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, detect the path information of the shortest routing path from the starting routing node to the final routing node. Among them, the path information is used to indicate the number of routing hops of the shortest routing path.
[0172] Step S604, when the path information is used to indicate 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.
[0173] Step S606, route from the starting routing node to the final routing node according to the target routing path.
[0174] 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 connecting 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. For the case where two hops are required for routing, a 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 with at least two hops, so as to avoid the occurrence 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 the occurrence of deadlock in the routing process can be achieved.
[0175] In an alternative 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, but not limited to, the following manner: determining 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; searching for the target routing rule corresponding to the target set relationship from the set relationships and routing rules with corresponding relationships; and planning the target routing path according to the target routing rule.
[0176] 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, such as: both are in the first node set, both are in the second node set, respectively in different node sets, etc. Different set relationships are arranged with different routing rules, so as to avoid deadlock phenomena during the routing process.
[0177] In an alternative example, the target set relationship between the starting routing node and the final routing node can be determined according to the node set where the starting routing node is located and the node set where the final routing node is located in, but not limited to, the following manner: 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, determining the target set relationship as 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, determining the target set relationship as 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, determining the target set relationship as the third set relationship, where the third set relationship is used to indicate that the routing nodes are located in different node sets.
[0178] In an optional example, the target routing rule corresponding to the target set relationship can be found from the set relationship and routing rules with corresponding relationships in the following ways, but not limited thereto: when the target set relationship is the first set relationship, determine the target routing rule as 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 the target routing rule as 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 the target routing rule as the third routing rule, where the third routing rule is used to indicate routing to a 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.
[0179] Optionally, in this embodiment, a routing request with two hops for the shortest path does not necessarily follow the shortest path. This routing rule can be referred to as Rule 1, but not limited thereto.
[0180] 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.
[0181] Optionally, in this embodiment, when N is 3, 2 N the identifiers of the 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.
[0182] 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 the exclusive OR operation result I of the identifier is 011 at this time, then if S is 100 or 111, the routing is performed counterclockwise, that is, the above-mentioned first routing direction can be but is not limited to the counterclockwise direction. If S is 101 or 110, the routing is performed clockwise, that is, the above-mentioned second routing direction can be but is not limited to the clockwise direction.
[0183] The above routing rule can be but is not limited to being called Rule 2. Rule 2 can ensure that there is no deadlock in the routing requests between two hops of 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 It is a schematic diagram of the routing process in a ring topology structure according to an embodiment of the present application. Figure 1 , such as Figure 7 shown, when using Rule 2 for routing, when all these four routing requests need to pass through a routing node and all have occupied the intermediate routing node, no deadlock occurs.
[0184] Optionally, in this embodiment, the above-mentioned first routing direction can also be but is not limited to the clockwise direction. In this case, the above-mentioned second routing direction can be but is not limited to the counterclockwise direction.
[0185] In an optional example, the target routing path can be planned according to the target routing rule in the following way but is not limited thereto: when the target routing rule is the second routing rule, obtain the next-hop routing node according to the starting routing node in the second node set; determine the final routing node as the last-hop routing node to obtain the target routing path.
[0186] Optionally, in this embodiment, the next-hop routing node can be obtained according to the starting routing node in the second node set in the following way but is 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.
[0187] 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 two hops are required to complete the routing request, and at this time I is 001, the first hop is along the diagonal routing first.
[0188] The above routing rule can be but is not limited to being called Rule 3. Rule 3 can ensure that there is no deadlock in the two-hop routing requests between the network nodes in the inner layer. For example, assume that 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 and all four routing requests need to pass through a routing node and the intermediate routing node is already occupied, no deadlock occurs.
[0189] In an optional example, the target routing path can be planned according to the target routing rule in the following ways but is not limited thereto: when the target routing rule is the third routing rule, determine the reference routing node as the routing node for the first hop; determine the reference routing direction in the node set where the reference routing node is located according to 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.
[0190] 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 in the following ways but is not limited thereto: 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 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.
[0191] 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, the direction where the third network node is located is determined as the reference routing direction; when the reference routing node is the second network node, the direction where the fourth network node is located is determined as the reference routing direction; when the reference routing node is the third network node, the direction where the first network node is located is determined as the reference routing direction; when the reference routing node is the fourth network node, the direction where the second network node is located is determined as the reference routing direction.
[0192] 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: the routing node directly connected to the reference routing node in the reference routing direction is determined as the routing node of the second hop; when the routing node of the second hop is the final routing node, the routing path connecting the starting routing node, the reference routing path and the final routing node in sequence is determined as the target routing path; when the routing node of the second hop is not the final routing node, the routing path connecting the starting routing node, the reference routing path, the routing node of the second hop and the final routing node in sequence is determined as the target routing path.
[0193] 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 first routes to the layer where D is located, then updates S (that is, finds the reference routing node), and then routes according to Rule 2 or 3.
[0194] The above routing rule can be, but not limited to, called Rule 4. Rule 4 can ensure that no deadlock occurs in the routing requests between the outer layer and the inner layer nodes. For example, for the ring topology composed of routing nodes 110, 010, 000, and 100: assume that 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 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 , as Figure 9 shown, when using Rule 4 for routing, when all these four routing requests need to pass through a routing node and the intermediate routing nodes are all occupied, no deadlock occurs. The same is true for the ring topology composed of routing nodes 011, 111, 101, and 001, which will not be elaborated here.
[0195] In an optional example, the path information of the shortest routing path from the starting routing node to the final routing node can be detected, but not limited to, by the following method: 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; determine the path information according to the connection relationship.
[0196] Optionally, in this embodiment, the connection relationship between the starting routing node and the final routing node can be determined, but not limited to, by the following method: perform a bitwise exclusive OR operation on the starting node identifier and the final node identifier to obtain an operation result; determine the connection relationship according to the operation result and the node set where the starting routing node is located.
[0197] 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, by the following method 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 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.
[0198] Optionally, in this embodiment, the path information can be determined, but not limited to, by the following method according to the connection relationship: when the connection relationship is a direct connection between the starting routing node and the final routing node, determine 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, determine that the path information is used to indicate that the shortest routing path is a two-hop routing path.
[0199] In an alternative embodiment, a routing algorithm for a topological structure applied to 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 N 1 ={100, 101, 110, 111} and N 2 ={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 may but is not limited to include the following steps:
[0200] Step 1: The source routing node S and the destination routing node D are bitwise XORed, and the result is denoted as I.
[0201] Step 2: Determine the value of the source routing node S. If it belongs to N 1 , proceed to Step 3; if it belongs to N 2 , proceed to Step 4.
[0202] 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.
[0203] 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 = I 1 ^I 2 = 001^100, and then in a counterclockwise manner, the two one-hot encodings are respectively XORed with the routing node S:
[0204]
[0205] 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:
[0206]
[0207] S new = 000.
[0208] Then S is updated to the routing node 000, and 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 = I 1 ^I 2 = 010^011, and then in the manner of Rule 3, the two one-hot encodings are respectively XORed with the routing node S:
[0209]
[0210] 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:
[0211]
[0212] S new = 000,
[0213] Then S is updated 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, and the source routing node S is directly connected to the target routing node D, and can be directly routed.
[0214] 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 011, after bitwise XOR, I = 111. First, route to the inner layer where D is located, and then update S:
[0215]
[0216] S new = 000,
[0217] Then S is updated to the routing node 000, D is the routing node 011. At this time, both S and D belong to the inner layer. After bitwise XOR, I = 011, and the source routing node S is directly connected to the target routing node D, and can be directly routed.
[0218] Step 4: Judge 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 target routing node D and can be directly routed.
[0219] If the value of I is 110, route according to Rule 4. For example: S is the routing node 000, D is the routing node 110, after bitwise XOR, I = 110. First, route to the inner layer where D is located, and then update S:
[0220]
[0221] S new = 100,
[0222] Then S is updated to the routing node 100, D is the routing node 110. At this time, both S and D belong to the outer layer. After bitwise XOR, I = 010, and the source routing node S is directly connected to the target routing node D, and can be directly routed.
[0223] If the value of I is 101, route according to Rule 4. For example: S is the routing node 000, D is the routing node 101, after bitwise XOR, I = 101, first route to the inner layer where D is located, and then update S:
[0224]
[0225] S new = 100,
[0226] Then S is updated to the routing node 100, D is the routing node 101. At this time, both S and D belong to the outer layer. After bitwise XOR, I = 001, and the source routing node S is directly connected to the destination routing node D, and can be directly routed.
[0227] If the value of I is 001, route according to Rule 3. For example: S is the routing node 000, D is the routing node 001, after bitwise XOR, I = 001, split I into two one-hot encodings I = I 1 ^I 2 = 010^011, and then in the way of Rule 3, the two one-hot encodings are XORed with the routing node S respectively:
[0228]
[0229] 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 111, after bitwise XOR, I = 111, first route to the inner layer where D is located, and then update S:
[0230]
[0231] S new = 100,
[0232] 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 = I 1 ^I 2 = 001^010, and then in the way of Rule 2, the two one-hot encodings are XORed with the routing node S respectively:
[0233]
[0234] In the case of a ring topology in the interconnection network, 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 suitable for the above multi-dimensional hypercube interconnection network. The routing algorithm is simple and easy to be implemented in hardware.
[0235] To avoid the occurrence of the above deadlock phenomenon, in this embodiment, another routing method for a multi-dimensional hypercube interconnection network is also provided. The topological structure of the multi-dimensional hypercube interconnection network is any one of the above 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 It is a flowchart of a routing method for a multi-dimensional hypercube interconnection network according to an embodiment of the present application. Figure 3 , such as Figure 10 shown, this process includes the following steps:
[0236] 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, to obtain the initial routing path;
[0237] 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, to obtain the target routing path;
[0238] Step S1006, route from the starting routing node to the final routing node according to the target routing path.
[0239] 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 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. During the routing process, first, the initial routing path is planned according to the shortest routing path, and then the transmission path for each hop is planned according to 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 that deadlock may occur during the routing process in the related art can be solved, and the technical effect of avoiding the occurrence of deadlock during the routing process can be achieved.
[0240] In an optional example, in the above step S1004, the target transmission path for each hop in the initial routing path can be determined from the P transmission paths according to the path characteristics of the initial routing path in, but not limited to, the following manner to obtain the target routing path: Detect the path hop count and the number of paths of the initial routing path as path characteristics, where the initial routing path includes all the shortest routing paths that are allowed to route from the starting routing node to the final routing node; Determine the target transmission path for each hop in the initial routing path from the P transmission paths according to the path hop count and the number of paths to obtain the target routing path.
[0241] Optionally, in this embodiment, all routing paths follow the shortest path routing, and this routing rule can be, but not limited to, referred to as Rule 11.
[0242] In an optional example, the target transmission path for each hop in the initial routing path can be determined from the P transmission paths according to the path hop count and the number of paths in, but not limited to, the following manner to obtain the target routing path: Screen out a candidate routing path from the initial routing path according to the path hop count and the number of paths; Determine the target transmission path for each hop in the candidate routing path from the P transmission paths according to the number of paths to obtain the target routing path.
[0243] Optionally, in this embodiment, a candidate routing path can be screened out from the initial routing path according to the path hop count and the number of paths in, but not limited to, the following manner: 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, screen out a candidate routing path from the initial routing path according to the number of paths.
[0244] Optionally, in this embodiment, a candidate routing path can be screened out from the initial routing path according to the number of paths in, but not limited to, the following manner: 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 a routing path from the initial routing path as the candidate routing path.
[0245] Optionally, in this embodiment, the target transmission path for each hop in the candidate routing path may be determined from P transmission paths according to the number of paths, and the target routing path may be obtained in, but not limited to, the following manner: 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, 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.
[0246] Optionally, in this embodiment, the target transmission path for each hop in the candidate routing path may be determined from P transmission paths according to the number of paths, and the target routing path may be obtained in, but not limited to, the following manner: 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 in the P transmission paths marked with the first label, and randomly determine the target transmission path for the last hop in the candidate routing path from the transmission paths in the P transmission paths marked with the second label 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.
[0247] 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 11 It 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 marked with the label "+", and the other transmission path is marked with the label "-".
[0248] Then if S to D needs to pass through two hops and there are multiple routing paths for the shortest path, the first hop can only go through "+", and the second hop can only go through "-". For example, Figure 12 It is a schematic Figure 1 of a routing path according to an embodiment of the present application, as Figure 12 shown. S is 110, D is 101, S to D needs to pass through two hops and there are multiple routing paths, so the first hop can only go through "+", and the second hop can only go through "-".
[0249] The above routing rule can be called Rule 12. Rule 12 can ensure that there is no deadlock in the routing requests between two hops among the outer nodes. 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 13 is a schematic diagram of the routing process in a ring topology according to an embodiment of the present application Figure 4 , Figure 14 is a schematic diagram of the routing process in a ring topology according to an embodiment of the present application Figure 5 , such as Figure 13 and Figure 14 shown. When using Rule 12 for routing and all four routing requests need to pass through a routing node and the intermediate routing node is already occupied, no deadlock occurs.
[0250] Rule 12 can ensure that there is no deadlock in the routing requests between two hops among the inner nodes. For example, assume that 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 15 is a schematic diagram of the routing process in a ring topology according to an embodiment of the present application Figure 6 , such as Figure 15 shown. When using Rule 12 for routing and all four routing requests need to pass through a routing node and the intermediate routing node is already occupied, no deadlock occurs.
[0251] If it takes two hops from S to D and there is only one routing path for the shortest path, then the two-hop "+""-" paths can be taken randomly. For example, Figure 16 is a schematic diagram of a routing path according to an embodiment of the present application Figure 2 , such as Figure 16 shown. S is 010, D is 101. It takes two hops from S to D and there is only one routing path for the shortest path. Therefore, the two-hop "+""-" paths can be taken randomly.
[0252] The above routing rule can be called Rule 13. Rule 12 and Rule 13 can ensure that there is no deadlock in the routing requests between the outer and inner nodes. Taking Example 5 as an example, for the ring topology composed of routing nodes 110, 010, 000, and 100: Assume that 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 It is a schematic diagram of the routing process in a ring topology according to an embodiment of the present application Figure 7 , such as Figure 17 shown. When routing using Rule 12 and Rule 13, and when all these four routing requests need to pass through a routing node and the intermediate routing node is already occupied, no deadlock occurs.
[0253] For the ring topology composed of routing nodes 100, 000, 011, 001, 101: Assume there are five routing requests simultaneously: 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 It is a schematic diagram of the routing process in a ring topology according to an embodiment of the present application Figure 8 , such as Figure 18 shown. When routing using Rule 12 and 13, and when all these four routing requests need to pass through a routing node and the intermediate routing node is already occupied, no deadlock occurs.
[0254] For the ring topology composed of routing nodes 100, 000, 011, 111, 101: Assume there are five routing requests simultaneously: 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 It is a schematic diagram of the routing process in a ring topology according to an embodiment of the present application Figure 9 , such as Figure 19 shown. When routing using Rule 12 and 13, and when all these four routing requests need to pass through a routing node and the intermediate routing node is already occupied, no deadlock occurs.
[0255] In an optional example, in the above step S1002, 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 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, so as to obtain the initial routing path: Determine 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; 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.
[0256] Optionally, in this embodiment, the connection relationship between the starting routing node and the final routing node may be determined, but is not limited to, by the following method according to the starting node identifier, the final node identifier, and the node set where the starting routing node is located: 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.
[0257] 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 may be determined, but is not limited to, by the following method 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 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.
[0258] Optionally, in this embodiment, the shortest routing path may be calculated as the initial routing path, but is not limited to, by the following method 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, determining that the initial routing path is to directly route 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, determining the next hop according to the operation result and the node set where the starting routing node is located; and determining 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.
[0259] 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 as the target one-hot encoding respectively 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 as the target encoding respectively 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.
[0260] In an optional 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, but are not limited to, in the following manner: 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.
[0261] In an optional 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, but are not limited to, in the following manner: 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.
[0262] 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 a connection between the fifth network node and the first network node, a connection between the sixth network node and the second network node, a connection between the seventh network node and the third network node, and a connection between the eighth network node and the fourth network node; establish a connection between the fifth network node and the sixth network node, a connection between the sixth network node and the seventh network node, a connection between the seventh network node and the eighth network node, and a connection between the eighth network node and the fifth network node.
[0263] In an optional example, the network nodes can be configured, but are not limited to, in the following manner: 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.
[0264] In an optional implementation manner, 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 N 1 ={100, 101, 110, 111} and N 2={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 may but is not limited to include the following steps:
[0265] 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;
[0266] Step 2: Judge the value of the source routing node S. If it belongs to N 1 , go to Step 3; if it belongs to N 2 , go to Step 4;
[0267] Step 3: Judge 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.
[0268] (2) If the value of I is one of 110, 011, split I into two one-hot encodings I = I 1 ^I 2 , and then, in a random way, the two one-hot encodings are XORed with the routing node S respectively; the routing ends. 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 = I 1 ^I 2 = 001^010, and then, in ascending order, the two one-hot encodings are XORed with the routing node S respectively:
[0269]
[0270] If the value of I is 101, split I, I = I 1 ^I 2 = 001^100, I 1 , I 2 , and then, in order, the two one-hot encodings are XORed with the routing node S respectively; the routing ends. For example: S is the routing node 100, D is the routing node 001. After bitwise XOR, I = 101. Split I into two one-hot encodings I = I 1 ^I 2 = 001^100, and then, in order, the two one-hot encodings are XORed with the routing node S respectively:
[0271]
[0272] If the value of I is 111, split I, I = I 1 ^I 2 = 100^011, I 1 , I2 Perform XOR operation with the routing node S in sequence; 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 = I 1 ^I 2 = 001 ^ 100. Then, in sequential order, the two one-hot encodings are respectively XORed with the routing node S:
[0273]
[0274] 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.
[0275] If the value of I is 110, split I into two one-hot encodings I = I 1 ^I 2 = 010 ^ 100. Then, in a random manner, the two one-hot encodings are respectively XORed with the routing node S; routing ends. For example: If S is the routing node 001 and D is the routing node 111, after bitwise XOR, I = 110. Split I into two one-hot encodings I = I 1 ^I 2 = 010 ^ 100. Then, in a random manner, the two one-hot encodings are respectively XORed with the routing node S:
[0276]
[0277] If the value of I is 101, split I into two one-hot encodings I = I 1 ^I 2 = 100 ^ 001. Then, in sequential order, the two one-hot encodings are respectively XORed with the routing node S; routing ends. For example: If S is the routing node 001 and D is the routing node 101, after bitwise XOR, I = 101. Split I into two one-hot encodings I = I 1 ^I 2 = 100 ^ 001. Then, in sequential order, the two one-hot encodings are respectively XORed with the routing node S:
[0278]
[0279] If the value of I is 001, split I into two encodings I = I 1 ^I 2 = 010 ^ 011. Then, in a random manner, the two one-hot encodings are respectively XORed with the routing node S; routing ends. For example: If S is the routing node 001 and D is the routing node 000, after bitwise XOR, I = 001. Split I into two one-hot encodings I = I1 ^I 2 = 010^011, and then in a random manner, the two one-hot encodings are respectively XORed with the routing node S:
[0280]
[0281] If the value of I is 111, split I into two encodings I = I 1 ^I 2 = 011^100, and then in a sequential manner, the two one-hot encodings are respectively XORed with the routing node S; the routing ends. For example: S is the routing node 001, D is the routing node 110, after bitwise XOR, I = 111, split I into two one-hot encodings I = I 1 ^I 2 = 011^100, and then in a sequential manner, the two one-hot encodings are respectively XORed with the routing node S:
[0282]
[0283] 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 multi-dimensional hypercube interconnection network. The routing algorithm is simple and easy to implement in hardware.
[0284] 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 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. 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 sequentially connected in 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. 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.
[0285] 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 in the multi-dimensional hypercube interconnection network can be achieved.
[0286] 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. There is exactly 1 bit difference between the identifier of the target network node and the identifier 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.
[0287] Optionally, in this embodiment, the third digit from the right of the identifiers of the network nodes in the first node set is the same, the third digit from the right of the identifiers of the network nodes in the second node set is the same, and the third digit from the right of the identifiers of the network nodes in the first node set is different from the third digit from the right of the identifiers of the network nodes in the second node set; the third digit from the right of the identifiers of the network nodes in the third node set is the same, the third digit from the right of the identifiers of the network nodes in the fourth node set is the same, and the third digit from the right of the identifiers of the network nodes in the third node set is different from the third digit from the right of the identifiers of the network nodes in the fourth node set.
[0288] Optionally, in this embodiment, the third digit from the right of the identifiers of the network nodes in the first node set and the third digit from the right of the identifiers of the network nodes in the third node set are both 1, and the third digit from the right of the identifiers of the network nodes in the second node set and the third digit from the right of the identifiers of the network nodes in the fourth node set are both 0.
[0289] 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 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 3 directly connected network nodes.
[0290] Optionally, in this embodiment, the 4 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, 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;
[0291] The 4 target network nodes in the third node set include a thirteenth network node, a fourteenth network node, a fifteenth network node, and a 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, 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.
[0292] 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 unconnected network nodes in the sub-network where it is located; each target network node is set to allow three-hop routing to the 7 unconnected network nodes in the sub-network where it is not located.
[0293] In an alternative embodiment, Figure 20 is a structural block diagram of a topological structure of a four-dimensional hypercube interconnection network 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 respectively represented by binary numbers as 0000 - 1110. For the 8 network nodes 0100, 0101, 0110, 0111, 1100, 1101, 1110, 1111, the binary numbers of each network node are successively exclusive ORed with 0001, 0010, 0100, 1000 bit by bit, and the directly connected network nodes can be obtained. For example, for network node 0101, its binary number is successively exclusive ORed with 0001, 0010, 0100, 1000 bit by bit, and 0100, 0111, 0001, 1101 are obtained, and these four nodes 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 exclusive ORed with 0011, 0010, 0100, 1000 bit by bit, and the directly connected network nodes can be obtained. For example, for network node 1010, its binary number is successively exclusive ORed with 0011, 0010, 0100, 1000 bit by bit, and 1001, 1000, 1110, 0010 can be obtained, and these four nodes are exactly the four network nodes directly connected to 1010.
[0294] The above topological structure 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 22 is a structural block diagram of an outer 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 three-dimensional cube is 0, and the highest bit of the network nodes of the outer three-dimensional cube is 1; for the network nodes of the inner three-dimensional cube directly connected to the network nodes of the outer three-dimensional cube, the result after bitwise exclusive OR is 1000, that is, the lower two bits are equal and the highest bit is opposite.
[0295] For the 8 network nodes 0100, 0101, 0110, 0111, 1100, 1101, 1110, and 1111: For each network node, the link relationships with the other 15 network nodes are as follows: By performing exclusive OR with 0001, 0010, 0100, and 1000, the 4 network nodes directly connected to it can be obtained; It can directly reach 4 adjacent network nodes in one hop. For example, for network node 0100, by performing exclusive OR with 0001, 0010, 0100, and 1000, the network nodes 0101, 0110, 0000, and 1100 can be obtained and are directly connected and can be directly routed. By performing exclusive OR with 0101, 0011, 0110, 1001, 1100, 1010, and 0111, 7 network nodes can be obtained and can be reached in two hops; For example, for network node 0100, by performing exclusive OR with 0101, 0011, 0110, 1001, 1100, 1010, and 0111, the 7 network nodes 0001, 0111, 0010, 1101, 1000, 1110, and 0011 can be obtained and can be reached in two hops. By performing exclusive OR with 1011, 1110, 1101, and 1111, the 4 network nodes obtained can be reached in three hops; For example, for network node 0100, by performing exclusive OR with 1011, 1110, 1101, and 1111, the network nodes 1111, 1010, 1001, and 1011 can be obtained and can be reached after three hops.
[0296] 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 to obtain 7 network nodes, and these 7 network nodes can be reached in two hops; For example, for network node 0001, exclusive OR with 0101, 0001, 0110, 1011, 1100, 1010, and 0111 to obtain the 7 network nodes 0100, 0000, 0111, 1010, 1101, 1011, and 0110, and can be reached in two hops; Exclusive OR with 1001, 1110, 1101, and 1111, the 4 obtained network nodes can be reached in three hops; For example, for network node 0001, exclusive OR with 1001, 1110, 1101, and 1111 to obtain network nodes 1000, 1111, 1100, and 1110, and can be reached after three hops.
[0297] The network diameter between the network nodes of the above four-dimensional hypercube interconnection network is 3.
[0298] 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:
[0299] 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;
[0300] Step S2304, according to the node set where the start routing node is located, split the operation result of the bitwise exclusive OR operation between the start node identifier and the end node identifier into a target coding sequence;
[0301] 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;
[0302] Step S2308: Route from the starting routing node to the final routing node according to the target routing path.
[0303] Through the above steps, the network diameter of the four-dimensional hypercube interconnection network is reduced to 3 in this connection mode, thereby reducing the network diameter of the entire interconnection network. 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 in the multi-dimensional hypercube interconnection network can be achieved.
[0304] In an optional example, it can be, but not limited to, the following way to split 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: Determine the connection relationship between the starting routing node and the final routing node according to the operation result; When 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; When 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.
[0305] In an optional example, after determining the connection relationship between the starting routing node and the final routing node according to the operation result, when 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.
[0306] In an alternative example, but not limited thereto, the node set where the starting routing node is located and the target coding sequence corresponding to the operation result can be found from the node set with corresponding relationships, the exclusive OR value, and the coding sequence as follows: 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, the target coding sequence is determined to be 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, the target coding sequence is determined to be 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, the target coding sequence is determined to be 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, the target coding sequence is determined to be 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, the target coding sequence is determined to be 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, the target coding sequence is determined to be 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, the target coding sequence is determined to be 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, the target coding sequence is determined to be 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, the target coding sequence is determined to be 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, the target coding sequence is determined to be 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, the target coding sequence is determined to be 0011, 1000, and 0100.
[0307] In an alternative example, but not limited thereto, 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 to obtain the target routing path: The starting node identifier is subjected to a bitwise exclusive OR operation with the first coding in the target coding sequence to obtain the identifier of the next hop; The identifier of the next hop is subjected to a bitwise exclusive OR operation with the next coding in the target coding sequence until the last coding in the target coding sequence, to obtain the target routing path.
[0308] In an alternative embodiment, a routing algorithm for a topological structure applied to a four-dimensional hypercube interconnect network is provided. In this routing algorithm, the network nodes in the four-dimensional hypercube interconnect network are divided into N 1 ={0100, 0101, 0110, 0111, 1100, 1101, 1110, 1111} and N 2 ={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:
[0309] Step 1: The source routing node S and the destination routing node D are exclusive-ORed bit by bit, and the result is denoted as I;
[0310] Step 2: Determine the value of the source routing node S. If it belongs to N 1 , go to Step 3; if it belongs to N 2 , go to Step 4;
[0311] 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.
[0312] If the value of I is one of 0011, 0110, 1001, 1100, 1010, 0101, split I into two one-hot encodings I = I 1 ^I 2 = 0001^0100, and then in ascending order, the two one-hot encodings are exclusive-ORed 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 exclusive-OR, I = 0101, split I into two one-hot encodings I = I 1 ^I 2 = 0001^0100, and then in ascending order, the two one-hot encodings are exclusive-ORed with the routing node S respectively:
[0313]
[0314] If the value of I is 0111, split I, I = I 1 ^I 2 = 0100^0011, I 1 , I 2Perform exclusive OR 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 performing bitwise exclusive OR, I = 0111, split I into two one-hot encodings I = I 1 ^I 2 = 0100 ^ 0011, then in the sequential manner, the two one-hot encodings are respectively exclusive ORed with the routing node S:
[0315]
[0316] If the value of I is one of 1011, 1110, 1101, split I into three one-hot encodings, and then in the ascending order, the three one-hot encodings are respectively exclusive ORed with the routing node S; the routing ends. For example: S is the routing node 0100, D is the routing node 1111, after performing bitwise exclusive OR, I = 1011, split I into three one-hot encodings I = I 1 ^I 2 ^I 3 = 0001 ^ 0010 ^ 1000, then in the ascending order, the three one-hot encodings are respectively exclusive ORed with the routing node S:
[0317]
[0318] If the value of I is 1111, split I, I = I 1 ^I 2 ^I 3 = 0100 ^ 0011 ^ 1000, according to I 1 , I 2 , I 3 way to perform exclusive OR with the routing node S; the routing ends. For example: S is the routing node 0100, D is the routing node 10 11 , after performing bitwise exclusive OR, I = 1111, split I into three one-hot encodings I = I 1 ^I 2 ^I 3 = 0100 ^ 0011 ^ 1000, then according to I 1 , I 2 , I 3 sequence to perform exclusive OR with the routing node S:
[0319]
[0320] Step 4: Judge 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 can be directly routed.
[0321] 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 on the two one-hot encodings with the routing node S respectively; the routing ends. Example: S is the routing node 0001, D is the routing node 0100, after bitwise exclusive OR, I = 0101, split I into two one-hot encodings I = I 1 ^I 2 = 0001 ^ 0100, and then, in ascending order, perform exclusive OR on the two one-hot encodings with the routing node S respectively:
[0322]
[0323] If the value of I is 0001, split I, I = I 1 ^I 2 = 0011 ^ 0010, I 1 , I 2 Perform exclusive OR 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 exclusive OR, I = 0001, split I into two one-hot encodings I = I 1 ^I 2 = 0011 ^ 0010, and then I 1 , I 2 In sequence, perform exclusive OR on the two one-hot encodings with the routing node S respectively:
[0324]
[0325] If the value of I is 1011, split I, I = I 1 ^I 2 = 0011 ^ 1000, I 1 , I 2 Perform exclusive OR with the routing node S in sequence; 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 = I 1 ^I 2 = 0011 ^ 1000, and then I 1 , I 2 In sequence, perform exclusive OR on the two one-hot encodings with the routing node S respectively:
[0326]
[0327] If the value of I is 0111, split I, I = I 1 ^I 2 = 0011 ^ 0100, I 1 , I2 Perform exclusive OR with the routing node S in sequence; routing ends. For example: S is the routing node 0001, D is the routing node 0110, after performing bitwise exclusive OR, I = 0111, split I into two one-hot encodings I = I 1 ^I 2 = 0011 ^ 0100, then I 1 , I 2 In sequence, perform exclusive OR of the two one-hot encodings with the routing node S respectively:
[0328]
[0329] If the value of I is one of 1110 or 1101, split I into three one-hot encodings, and then perform exclusive OR with the routing node S in the order of I 1 , I 2 , I 3 Order. For example: S is the routing node 0001, D is the routing node 1100, after performing bitwise exclusive OR, I = 1101, split I into three one-hot encodings I = I 1 ^I 2 ^I 3 = 1000 ^ 0100 ^ 0001, then in the order of I 1 , I 2 , I 3 Order, perform exclusive OR with the routing node S:
[0330]
[0331] If the value of I is 1001, split I, I = I 1 ^I 2 ^I 3 = 0011 ^ 1000 ^ 0010, then in the order of I 1 , I 2 , I 3 Order, perform exclusive OR with the routing node S. For example: S is the routing node 0001, D is the routing node 1000, after performing bitwise exclusive OR, I = 1001, split I into three one-hot encodings I = I 1 ^I 2 ^I 3 = 0011 ^ 1000 ^ 0010, then in the order of I 1 , I 2 , I 3 Order, perform exclusive OR with the routing node S:
[0332]
[0333] If the value of I is 1111, split I, I = I1 ^I 2 ^I 3 = 0011^1000^0100, and then in the order of I 1 , I 2 , I 3 perform an exclusive OR operation with the routing node S. For example: if S is the routing node 0001 and D is the routing node 1110, after performing the bitwise exclusive OR operation, I = 1111. Split I into three one-hot encodings I = I 1 ^I 2 ^I 3 = 0011^1000^0100, and then in the order of I 1 , I 2 , I 3 perform an exclusive OR operation with the routing node S in sequential order:
[0334]
[0335] 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 be implemented in hardware.
[0336] 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 each 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 network node included in the N network nodes it includes, and the N network nodes included in each node set are connected to each other pairwise.
[0337] Through the above topological structure, a topological structure of an interconnected network in which the number of network nodes is not matched with the number of network nodes that can be provided in a multi-dimensional hypercube interconnected network can be established, avoiding or reducing the occurrence of idle network nodes. Therefore, the technical problem that the topological structure of the interconnected network causes large 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.
[0338] Optionally, in this embodiment, when N is greater than 3, the interconnected 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, 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.
[0339] 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 by the target node set through each network node.
[0340] Optionally, in this embodiment, 2 N The set identifiers of the node sets are integers from 0 to 2 N-1 inclusive.
[0341] 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.
[0342] In an optional embodiment, taking N as 3, the interconnection network includes 8 node sets, each node set includes 3 network nodes, the interconnection network is divided into 1 sub-network, and the 8 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 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 3 network nodes included, and the 3 network nodes included in each node set are connected to each other in pairs.
[0343] Figure 24 is a structural block diagram of a topological structure of an interconnection network according to an embodiment of the present application, as Figure 24 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 jth 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.
[0344] There are 24 network nodes in this interconnection 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.
[0345] In this embodiment, a routing method for an interconnection network is further provided, which is applied to the topological structure of any of the above-mentioned 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 25 is a schematic Figure 1 of a routing method for an interconnection network according to an embodiment of the present application, as Figure 25 shown. This method can but is not limited to include the following steps:
[0346] Step S2502, detecting the positional relationship between the starting routing node and the final routing node;
[0347] Step S2504: Calculate 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.
[0348] Step S2506: Route from the starting routing node to the final routing node according to the target routing path.
[0349] Through the above steps, a topological structure of an interconnected network with the number of network nodes established not matching the number of network nodes that can be provided in a multi-dimensional hypercube interconnected network is created, avoiding or reducing the occurrence of idle network nodes. Therefore, the technical problem that the topological structure of the interconnected network can cause significant resource waste can be solved, achieving the technical effect of reducing the resource waste of the topological structure of the interconnected network.
[0350] 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, by the following method: Obtain the starting node identifier of the starting routing node and the final node identifier of the final routing node; Determine the positional relationship according to the starting node identifier and the final node identifier.
[0351] 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. Among them, 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 positional relationship can be determined, but is not limited to, by the following method: Detect whether the starting set identifier in the starting node identifier is equal to the final set identifier in the final node identifier; In the case where the starting set identifier is equal to the final set identifier, determine that the positional relationship is that the starting routing node and the final routing node are in the same node set; In the case where the starting set identifier is not equal to the final set identifier, detect whether the starting connection identifier in the starting node identifier is equal to the final set identifier; In the case where the starting connection identifier is equal to the final set identifier, determine that the positional relationship is that the starting routing node and the final routing node are in different node sets, but the final node sets where the starting routing node and the final routing node are located are directly connected; In the case where the starting connection identifier is not equal to the final set identifier, determine that the positional relationship is that the starting routing node and the final routing node are in different node sets, and the final node sets where the starting routing node and the final routing node are located are not directly connected.
[0352] Optionally, in this embodiment, the shortest routing path from the starting routing node to the final routing node may be calculated according to the positional relationship in, but not limited to, the following manner to obtain the target routing path: when the positional relationship is that the starting routing node and the final routing node are in the same node set, it is determined that the shortest routing path is to directly route from the starting routing node to the final routing node; when the positional relationship is that the starting routing node and the final routing node are in different node sets, the shortest routing path from the starting routing node to the final routing node is calculated according to the starting node identifier of the starting routing node and the final node identifier of the final routing node to obtain the target routing path.
[0353] Optionally, in this embodiment, the shortest routing path from the starting routing node to the final routing node may be calculated according to the starting node identifier of the starting routing node and the final node identifier of the final routing node in, but not limited to, the following manner to obtain the target routing path: when the positional relationship also indicates that the final node set where the starting routing node and the final routing node are located is directly connected, the next hop is determined to be 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, it is determined that the shortest routing path is to route from the starting routing node to the final routing node; when the first routing node is not the final routing node, it is determined 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 final node set where the starting routing node and the final routing node are located is not directly connected, it is detected 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, the next hop is determined to be the second routing node, and the second hop is determined to be 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, it is determined 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, it is determined 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, the shortest routing path from the starting routing node to the final routing node is calculated according to the binary numbers of the starting node identifier and the final node identifier to obtain the target routing path.
[0354] 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. The set identifiers of 2 N node sets are integers from 0 to 2 N-1 ; when N is 3, the shortest routing path from the starting routing node to the final routing node can be calculated based on the binary numbers of the starting node identifier and the final node identifier in the following manner, but not limited to this 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 with the first set identifier, and then route from the intermediate node set with 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 with the second set identifier, and then route from the intermediate node set with 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 with the third set identifier, and then route from the intermediate node set with 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 with the fourth set identifier, and then route from the intermediate node set with 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.
[0355] 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 interconnected 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:
[0356] Step 1: 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. S can reach D by performing one-step routing inside the triangle, and the routing ends. If i S ≠ i D , it indicates that S and D are not in the same triangular structure, and proceed to Step 2.
[0357] Step 2: Determine whether j S and i D are equal: If j S = i D , it indicates that the triangular structures where S and D are located are directly connected, and proceed to Step 4. If j S ≠ i D , it indicates that S is not directly connected to the triangular structure where D is located, and proceed to Step 3.
[0358] Step 3: 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 that is directly connected to the triangular structure where D is located, update S, and proceed to Step 4. If not, proceed to Step 6.
[0359] Step 4: At this time, the triangular structures where S and D are located are directly connected. Then, directly route 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 ), and proceed to Step 5.
[0360] Step 5: 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 reach D, and the routing ends.
[0361] Step 6: The binary of i S AND i DThe binary numbers are XORed bit by bit, and the result is denoted as I. If I = 111, go to the seventh step; if I = 101, go to the eighth step; otherwise, go to the ninth step.
[0362] Seventh step: I = 111: Determine whether i S belongs to {0, 1, 2, 3}. If it does, go to 7.1; otherwise, go to 7.2.
[0363] 7.1 Calculate bin(i S ) ^ 011. The triangle where S is located is connected to the triangle numbered bin(i S ) ^ 011. The triangle numbered bin(i S ) ^ 011 is connected to the triangle where D is located. S needs to first route to the triangle numbered bin(i S ) ^ 011 in the same way as above; then route from the triangle numbered bin(i S ) ^ 011 to D in the same way as above; the routing ends.
[0364] 7.2 Calculate bin(i S ) ^ 010. The triangle where S is located is connected to the triangle numbered bin(i S ) ^ 010. The triangle numbered bin(i S ) ^ 010 is connected to the triangle where D is located. S needs to first route to the triangle numbered bin(i S ) ^ 010 in the same way as above; then route from the triangle numbered bin(i S ) ^ 010 to D in the same way as above; the routing ends.
[0365] Eighth step: Calculate bin(i S ) ^ 100. The triangle where S is located is connected to the triangle numbered bin(i S ) ^ 100. The triangle numbered bin(i S ) ^ 100 is connected to the triangle where D is located. S needs to first route to the triangle numbered bin(i S ) ^ 100 in the same way as above; then route from the triangle numbered bin(i S ) ^ 100 to D in the same way as above; the routing ends.
[0366] Ninth step: Calculate bin(i S ) ^ 010. The triangle where S is located is connected to the triangle numbered bin(i S ) ^ 010. The triangle numbered bin(i S ) ^ 010 is connected to the triangle where D is located. S needs to first route to the triangle numbered bin(i S ) ^ 010 in the same way as above; then route from the triangle numbered bin(iS )^010 triangles are routed to D in the same routing manner as above; the routing ends.
[0367] With the source routing node S = (i S , j S ) = (1, 2) and the destination routing node D = (i D , j D ) = (3, 0) as an example, the routing method includes the following steps:
[0368] 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, and proceed to the second step.
[0369] 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, and proceed to the third step.
[0370] The third step: 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 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 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 the fourth step.
[0371] The 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. The routing method is: (i S , i D ) → (i D , i S ): (1, 3) → (3, 1), and update the value of S: S = (i D , i S ) = (3, 1), and proceed to the fifth step.
[0372] The fifth step: Determine whether i S and j D are equal: i S ≠j D , perform routing (i D , i S ) → (iD , j D ): (3, 1) → (3, 0), that is, route inside the triangular structure where D is located, route to D, and the routing ends.
[0373] Taking the source routing node S = (i S , j S ) = (1, 3) and the destination routing node D = (i D , j D ) = (6, 7) as an example, the routing method includes the following steps:
[0374] The first step: Judge 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.
[0375] The second step: Judge 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.
[0376] The third step: Judge 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.
[0377] The sixth step: The binary of i S is XORed with the binary of i D bit by bit, and the result is denoted as I. I = 111, enter the seventh step.
[0378] The seventh step: I = 111: Judge whether i S belongs to {0, 1, 2, 3}. If it belongs, enter 7.1.
[0379] 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.
[0380] Taking the source routing node S = (i S , j S ) = (0, 2) and the destination routing node D = (i D , j D ) = (1, 3) as an example, the routing method includes the following steps:
[0381] 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.
[0382] 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.
[0383] 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 not, proceed to Step 6.
[0384] Step 6: The binary of i S is XORed with the binary of i D by bit, and the result is denoted as I. If I≠111 and I≠101, proceed to Step 9.
[0385] Step 9: 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.
[0386] In a network that requires 24 routing nodes, a four-dimensional cube contains 16 nodes. Therefore, a five-dimensional cube network topology needs to be adopted. A 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 triangles and three-dimensional hypercubes 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. The algorithm scheme is simple and easy to implement in hardware.
[0387] In this embodiment, another topological structure of an interconnection network is further 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, the first node set and the second node set respectively include 4 network nodes, and 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, and 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.
[0388] Through this topological 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 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.
[0389] Optionally, in this embodiment, the 4 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.
[0390] In an alternative embodiment, when N is 3, the topological 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 topological structure of an interconnection network according to an embodiment of the present application. Figure 1 , such as Figure 26As shown, the construction process of the topology 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 form 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 in the three structures (i.e., the network nodes in the same position) are connected according to the connection mode 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 mode of the triangular network. After all the nodes are connected according to the connection mode of the triangular network, the topology of the interconnection network is obtained. In the topology 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.
[0391] In another alternative embodiment, when N is 4, the topology 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 the topology of an interconnection network according to an embodiment of the present application. Figure 2 , such as Figure 27 As shown, the construction process of the topology 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 mode 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 mode of the triangular pyramid network. After all the nodes are connected according to the connection mode of the triangular pyramid network, the topology of the interconnection network is obtained. There are 32 network nodes in the topology of this 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.
[0392] 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.
[0393] Optionally, in this embodiment, the network nodes with the same node identifier field among the various node sets are connected to each other.
[0394] 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 performing bitwise exclusive OR operations on the identifiers of the network nodes in the first node set with 001, 010, and 100 respectively are the identifiers of the 3 directly connected network nodes; the operation results of performing bitwise exclusive OR operations on the identifiers of the network nodes in the second node set with 011, 010, and 100 respectively are the identifiers of the 3 directly connected network nodes.
[0395] In this embodiment, a routing method for an interconnection network is also provided, which is applied to the topological 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 , such as Figure 28 shown. This method may but is not limited to including the following steps:
[0396] 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;
[0397] Step S2804, when the set relationship is used to indicate that the starting node set and the final node set are the same node set, calculate the shortest routing path from the starting routing node to the final routing node to obtain the target routing path; when the set relationship is used to indicate that the starting node set and the final 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 starting routing node to an intermediate routing node, and the intermediate routing node is the network node in the final node set that is connected to the starting routing node, and the second-stage routing path is the shortest routing path from the intermediate routing node to the final routing node;
[0398] Step S2806, route from the starting routing node to the final routing node according to the target routing path.
[0399] Through the above steps, while expanding the number of network nodes, the growth of the network diameter is controlled, thereby controlling the growth of the network delay. 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.
[0400] Optionally, in this embodiment, before determining that the target routing path includes a first-segment routing path and a second-segment routing path, the second-segment routing path can be planned by, but not limited to, the following method: obtaining the intermediate node identifier of the intermediate routing node and the final node identifier of the final routing node; calculating the shortest routing path from the intermediate routing node to the final routing node according to the intermediate node identifier, the final node identifier, and the node set where the intermediate routing node is located, to obtain the second-segment routing path.
[0401] Optionally, in this embodiment, the shortest routing path from the intermediate routing node to the final routing node can be calculated according to the intermediate node identifier, the final node identifier, and the node set where the intermediate routing node is located, by, but not limited to, the following method, to obtain the second-segment routing path: determining the connection relationship between the intermediate routing node and the final routing node according to the intermediate node identifier, the final node identifier, and the node set where the intermediate routing node is located; calculating the shortest routing path according to the connection relationship and the node set where the intermediate routing node is located as the second-segment routing path.
[0402] 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 connection relationship between the intermediate routing node and the final routing node can be determined by, but not limited to, the following method: when the intermediate routing node is in the first node set and the operation result of the bitwise exclusive OR operation between the intermediate node identifier and the final node identifier is one of 001, 010, and 100, determining 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 operation result of the bitwise exclusive OR operation between the intermediate node identifier and the final node identifier is one of 011, 010, and 100, determining 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 operation result of the bitwise exclusive OR operation between the intermediate node identifier and the final node identifier is a value other than 001, 010, and 100, determining 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 operation result of the bitwise exclusive OR operation between the intermediate node identifier and the final node identifier is a value other than 011, 010, and 100, determining that the connection relationship is not a direct connection between the intermediate routing node and the final routing node.
[0403] Optionally, in this embodiment, the following method may be used, but is not limited to, to calculate the shortest routing path as the second routing path according to 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 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 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; determine the final routing node as the last hop, where the second routing path includes the next hop and the last hop.
[0404] Optionally, in this embodiment, when 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 following methods may be used, but are not limited to, to determine the next hop based on the operation 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: 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 XOR 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 XOR operation between the intermediate node identifier and 001 to obtain the identifier of the next hop, where the result of the bitwise XOR 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 XOR operation between the intermediate node identifier and 100 to obtain the identifier of the next hop, where the result of the bitwise XOR 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 XOR 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 XOR operation between the intermediate node identifier and 100 to obtain the identifier of the next hop, where the result of the bitwise XOR 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 XOR operation between the intermediate node identifier and 011 to obtain the identifier of the next hop, where the result of the bitwise XOR operation between the identifier of the next hop and 100 is the final node identifier.
[0405] In an alternative embodiment, taking N as 3 as an example, a routing method under the topology of the above-mentioned 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 target routing node D = (i D , j D ). This routing method includes the following steps:
[0406] The first step: Determine iS and i D Whether they 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 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.
[0407] Second step: i S ≠ i D 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.
[0408] In another alternative embodiment, taking N as 4 as an example, another routing method under the topological structure 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 , i S ), and the destination routing node D = (i D , j D ). This routing method includes the following steps:
[0409] 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.
[0410] Second step: i S ≠ i D 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.
[0411] 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 method. Based on such an understanding, the technical solution of the present application, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0412] In this embodiment, a routing device for a multi-dimensional hypercube interconnection network is further provided. This device is used to implement the above embodiments and preferred implementation methods, 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 achieve 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.
[0413] 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 multi-dimensional hypercube interconnection network includes 2 N network nodes, where N is the dimension of the multi-dimensional hypercube interconnection network. The multi-dimensional hypercube 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 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. 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. The second network node is connected to the third network node and the fourth network node. P transmission paths are deployed between the target network node and the directly connected network node, where P is an integer greater than 1; 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 routing device includes:
[0414] A calculation module 2902, configured to calculate a shortest routing path from the starting routing node to the final routing node 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, so as to obtain an initial routing path;
[0415] A determination module 2904, configured to determine a 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, so as to obtain a target routing path;
[0416] A routing module 2906, configured to route from the starting routing node to the final routing node according to the target routing path.
[0417] 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 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. By connecting the first network node with the third network node and the fourth network node, and connecting 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 interconnected network. During the routing process, first, an initial routing path is planned according to the shortest routing path, and then the target transmission path for each hop is planned according to the path characteristics of the initial routing path to obtain a target routing path, so as to avoid 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.
[0418] As an alternative implementation manner, the device is further configured to:
[0419] Detect the path hop count and path quantity of the initial routing path as the path characteristics, where all the shortest routing paths that are allowed to route from the starting routing node to the final routing node are included in the initial routing path;
[0420] Determine a target transmission path for each hop in the initial routing path from the P transmission paths according to the path hop count and path quantity, so as to obtain a target routing path.
[0421] As an alternative implementation manner, the device is further configured to: screen out a candidate routing path from the initial routing path according to the path hop count and the path quantity;
[0422] Determine the target transmission path for each hop in the candidate routing path from the P transmission paths according to the number of paths, to obtain a target routing path.
[0423] As an alternative implementation, the apparatus is further configured to: when the number of path hops is 1, directly route from the starting routing node to the final routing node according to the initial routing path;
[0424] When the number of path hops is greater than 1, screen out a candidate routing path from the initial routing path according to the number of paths.
[0425] As an alternative implementation, the apparatus is further configured to: when the number of paths is 1, determine the initial routing path as the candidate routing path;
[0426] When the number of paths is greater than 1, randomly select a routing path from the initial routing paths as the candidate routing path.
[0427] As an alternative implementation, the apparatus is further configured to: 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;
[0428] When the number of paths is 2, randomly determine the target transmission path for the next hop in the candidate routing path from a first path set, and randomly determine the target transmission path for the last hop in the candidate routing path from a second path set, to obtain the target routing path;
[0429] Wherein, 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 transmission path among the P transmission paths, and the second path set includes at least one transmission path among the P transmission paths.
[0430] As an alternative implementation, the apparatus is further configured to: 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;
[0431] 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 a 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 a second label among the P transmission paths, to obtain the target routing path;
[0432] Among them, 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.
[0433] As an alternative implementation, the apparatus is further configured to: determine a 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;
[0434] Calculate a shortest routing path according to the connection relationship and the node set where the starting routing node is located as the initial routing path.
[0435] As an alternative implementation, the apparatus is further configured to: perform a bitwise exclusive OR operation on the starting node identifier and the ending node identifier to obtain an operation result;
[0436] Determine the connection relationship according to the operation result and the node set where the starting routing node is located.
[0437] As an alternative implementation, the apparatus is further configured to: 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:
[0438] 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;
[0439] 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;
[0440] 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 ending routing node;
[0441] 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 ending routing node.
[0442] As an alternative implementation, the device is further configured to: when the connection relationship is a direct connection between the starting routing node and the final routing node, determine that the initial routing path is a direct route to the final routing node, where the initial routing path includes a shortest routing path;
[0443] 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.
[0444] As an alternative implementation, the device is further configured to: 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:
[0445] 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 a bitwise exclusive OR operation on the two one-hot encodings and 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;
[0446] 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 identifier of the next hop and 100 are the final node identifiers, and the initial routing path includes a shortest routing path;
[0447] 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 identifier of the next hop and 001 are the final node identifiers, and the initial routing path includes a shortest routing path;
[0448] 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 a bitwise exclusive OR operation on 010 and 011 and 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;
[0449] 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 identifier of the next hop and 011 are the final node identifiers, and the initial routing path includes a shortest routing path.
[0450] 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 identifier of the next hop and 100 are the final node identifiers, and the initial routing path includes a shortest routing path.
[0451] As an optional implementation, the device is further configured to: 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:
[0452] Perform a bitwise exclusive OR operation on the identifiers of the network nodes in the first node set and 001, 010, and 100 respectively to obtain the first identifiers of 3 directly connected network nodes.
[0453] Establish connections between the network nodes in the first node set and the network nodes with the first identifiers, and establish the P sending paths in each connection.
[0454] As an optional implementation, the device is further configured to: 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:
[0455] Perform a bitwise exclusive OR operation on the identifiers of the network nodes in the second node set and 011, 010, and 100 respectively to obtain the second identifiers of 3 directly connected network nodes.
[0456] Establish connections between the network nodes in the second node set and the network nodes with the second identifiers, and establish the P sending paths in each connection.
[0457] As an optional implementation, the device is further configured to: establish a connection between the fifth network node and the first network node, a connection between the sixth network node and the second network node, a connection between the seventh network node and the third network node, and a connection between the eighth network node and the fourth network node;
[0458] 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.
[0459] As an alternative implementation, the device is further configured to: set each target network node to allow one-hop routing to 3 target network nodes connected in the target subnetwork;
[0460] Set each target network node to allow two-hop routing to 4 target network nodes not connected in the target subnetwork.
[0461] 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: 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.
[0462] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0463] 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.
[0464] An embodiment of the present application further provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0465] In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device. Wherein, the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0466] An embodiment of the present application further provides a computer program product. The above computer program product includes a computer program, and the steps in any one of the above method embodiments are implemented when the computer program is executed by a processor.
[0467] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0468] An embodiment of the present application further provides a computer program, which includes computer instructions 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 of the above method embodiments.
[0469] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.
[0470] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from 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.
[0471] 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 routing method for a multidimensional hypercube interconnection network, characterized in that: 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 subnetworks, N is a positive integer greater than 2; the 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 4 target network nodes in the first node set are sequentially connected into a ring, and 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, and P sending paths are deployed from the target network node to the directly connected network node, where P is an integer greater than 1; 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: 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, to obtain an initial routing path; According to the path characteristics of the initial routing path, determine the target sending path of each hop in the initial routing path from the P sending paths to obtain the target routing path; Routing from the starting routing node to the final routing node according to the target routing path.
2. The method according to claim 1, characterized in that: The step of determining a target sending path for each hop in the initial routing path from the P sending paths according to the path characteristics of the initial routing path to obtain a target routing path includes: Detecting the number of path hops and the number of paths of the initial routing path as the path characteristics, wherein the initial routing path includes all the shortest routing paths allowed to be routed from the starting routing node to the final routing node; According to the path hop count and the number of paths, a target sending path for each hop in the initial routing path is determined from the P sending paths to obtain a target routing path.
3. The method according to claim 2, characterized in that The step of determining a target sending path for each hop in the initial routing path from the P sending paths according to the path hop count and the number of paths to obtain a target routing path includes: Filtering a candidate routing path from the initial routing path according to the path hop count and the path quantity; According to the number of paths, a target sending path for each hop in the candidate routing paths is determined from the P sending paths to obtain a target routing path.
4. The method according to claim 3, characterized in that The step of selecting a candidate routing path from the initial routing path according to the path hop count and the path quantity includes: When the number of path hops is 1, directly routing from the starting routing node to the final routing node according to the initial routing path; When the number of path hops is greater than 1, a candidate routing path is screened out from the initial routing path according to the number of paths.
5. The method according to claim 4, characterized in that The step of selecting a candidate routing path from the initial routing path according to the number of paths includes: When the number of paths is 1, determining the initial routing path as the candidate routing path; When the number of paths is greater than 1, a routing path is randomly selected from the initial routing paths as the candidate routing path.
6. The method according to claim 3, characterized in that The step of determining, according to the number of paths, a target sending path for each hop in the candidate routing paths from the P sending paths to obtain a target routing path comprises: When the number of paths is 1, randomly determine the target sending path for each hop in the candidate routing paths from the P sending paths to obtain the target routing path; When the number of paths is 2, randomly determine the target sending path for the next hop in the candidate routing path from the first path set, and randomly determine the target sending path for the last hop in the candidate routing path from the second path set to obtain the target routing path; The P transmission paths are divided into the first path set and the second path set, the first path set includes at least one transmission path among the P transmission paths, and the second path set includes at least one transmission path among the P transmission paths.
7. The method according to claim 3, characterized in that The step of determining, according to the number of paths, a target sending path for each hop in the candidate routing paths from the P sending paths to obtain a target routing path comprises: When the number of paths is 1, randomly determine the target sending path for each hop in the candidate routing paths from the P sending paths to obtain the target routing path; When the number of paths is 2, the target sending path is randomly determined for the next hop in the candidate routing path from the sending paths marked with the first label in the P sending paths, and the target sending path is randomly determined for the last hop in the candidate routing path from the sending paths marked with the second label in the P sending paths, to obtain the target routing path; 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.
8. The method according to claim 1, 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 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, to obtain the initial routing path, comprises: 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 initial routing path.
9. The method according to claim 8, 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.
10. The method according to claim 9, 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.
11. The method according to claim 9, characterized in that The calculating 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 includes: In the case where the connection relationship is a direct connection between the starting routing node and the final routing node, determining the initial routing path to be a direct route to the final routing node, wherein the initial routing path includes a shortest routing path; 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 initial routing path includes the next hop and the last hop, and the initial routing path includes at least one shortest routing path.
12. The method according to claim 11, 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, the operation result is split into two one-hot codes; the two one-hot codes are respectively used as target one-hot codes and the starting node identifier to perform a bitwise XOR operation to obtain two next hop identifiers, wherein 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, the operation result is split into 001 and 100; the starting node identifier is bitwise XORed with 001 to obtain the identifier of the next hop, wherein the identifier of the next hop and 100 are the final node identifiers, and the initial routing path includes a shortest routing path; When the starting routing node is in the second node set and the operation result is 101, the operation result is split into 100 and 001; the starting node identifier is subjected to a bitwise XOR operation with 100 to obtain the identifier of the next hop, wherein the identifier of the next hop and 001 are the final node identifiers, and the initial routing path includes a shortest routing path; When the starting routing node is in the second node set and the operation result is 001, the operation result is split into 010 and 011; 010 and 011 are respectively used as target codes and the starting node identifier to perform a bitwise exclusive OR operation to obtain two next hop identifiers, wherein 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, the operation result is split into 100 and 011; the starting node identifier is bitwise XORed with 100 to obtain the identifier of the next hop, wherein the identifier of the next hop and 011 are the final node identifiers, and the initial routing path includes a shortest routing path; 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 identifier of the next hop and 100 are the final node identifiers, and the initial routing path includes a shortest routing path.
13. The method according to claim 1, 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, the method further includes: Performing a bitwise exclusive OR operation on the identifiers of the network nodes in the first node set with 001, 010, and 100, respectively, to obtain first identifiers of three directly connected network nodes; A connection is established between the network nodes in the first node set and the network node with the first identifier, and the P sending paths are established in each connection.
14. The method according to claim 1, 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, the method further includes: Performing a bitwise exclusive OR operation on the identifiers of the network nodes in the second node set with 011, 010, and 100, respectively, to obtain second identifiers of three directly connected network nodes; A connection is established between the network nodes in the second node set and the network node with the second identifier, and the P sending paths are established in each connection.
15. The method 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, and the method further includes: establishing a connection between the fifth network node and the first network node, a connection between the sixth network node and the second network node, a connection between the seventh network node and the third network node, and a connection between the eighth network node and the fourth network node; A connection between the fifth network node and the sixth network node, a connection between the sixth network node and the seventh network node, a connection between the seventh network node and the eighth network node, and a connection between the eighth network node and the fifth network node are established.
16. The method according to claim 1, characterized in that The method further comprises: Setting each target network node 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.
17. A routing device for a multi-dimensional hypercube interconnection network, characterized in that: 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 subnetworks, N is a positive integer greater than 2; the 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 4 target network nodes in the first node set are sequentially connected into a ring, and 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, and P sending paths are deployed from the target network node to the directly connected network node, where P is an integer greater than 1; 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, and the routing device includes: 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 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, so as to obtain an initial routing path; A determination module, configured to determine a target sending path for each hop in the initial routing path from the P sending paths according to the path characteristics of the initial routing path, 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 1 to 16 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 1 to 16 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 1 to 16 are implemented.
Citation Information
Cited By
Construction method of three-dimensional hypercube network structure, network structure, routing method, equipment, medium and product
CN120750836A