Routing method and device for interconnection network
By dividing the interconnection network into multiple network layers and building a specific node connection relationship, the transmission delay and detour problems caused by routing methods in the prior art are solved, and more efficient information transmission is achieved.
Patent Information
- Application Number
- CN202510428560.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-06-20
AI Technical Summary
The routing method of existing interconnected networks results in large transmission delays in the network and is prone to detours, affecting the efficiency of information transmission.
By dividing the interconnected network into Q network layers, each network layer is constructed using a matrix of node sets of N rows and P columns. Each node set includes a first network node, a second network node and a third network node. The three nodes are connected to the peer, same column and reference node sets respectively. Use routing methods: get the starting and final routing nodes, generate the shortest routing path, and avoid detours.
It reduces the transmission delay caused by the routing method of the interconnected network, improves the transmission efficiency of information between nodes, and avoids detours.
Smart Images

Figure CN120186079A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and in particular, to a routing method and device for an interconnection network. Background Art
[0002] 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 at as low a cost as possible, reliably and efficiently, to form a cost-effective large-scale parallel system. Currently, a grid method is used to construct the topology structure in the interconnection network. However, with the continuous expansion of the network scale requirements, the network diameter of the topology structure used in the current grid network will become larger and larger, resulting in a large increase in network communication delay, seriously affecting the transmission efficiency of information between nodes. And there will be detouring in the routing method provided in the network, resulting in an increase in the transmission delay of data in the network.
[0003] In view of the problem that the routing method of the interconnection network in the related art causes a large transmission delay in the network, no effective solution has been proposed yet. Summary of the Invention
[0004] The embodiments of the present application provide a routing method and device for an interconnection network, so as to at least solve the problem that the routing method of the interconnection network in the related art causes a large transmission delay in the network.
[0005] According to an embodiment of the present application, a routing method for an interconnection network is provided. The interconnection network includes N×P×Q node sets, and the interconnection network is divided into Q network layers, where N, P, and Q are all positive integers greater than or equal to 2; each of the Q network layers serves as a target network layer and includes a node set matrix of N rows and P columns. Each target node set in the target network layer is connected to adjacent node sets adjacent in the same row and the same column; the Q network layers are arranged in sequence, and the target node set is connected to a reference node set at the same position in the adjacent network layer, where the adjacent network layer is the network layer adjacent to the target network layer among the Q network layers;
[0006] Each node set includes a first network node, a second network node, and a third network node that are connected to each other. The first network node is used to connect adjacent node sets in the same row, the second network node is used to connect adjacent node sets in the same column, and the third network node is used to connect the reference node set; the routing method includes:
[0007] Obtain a starting routing node and a final routing node;
[0008] On the intermediate dimension of the set of adjacent nodes connected to the starting routing node with respect to the set of starting nodes where the starting routing node is located, generate the shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path, where the set of intermediate nodes where the intermediate routing node is located and the set of final nodes where the final routing node is located belong to the same intermediate dimension, and the dimensions of the node sets include: row dimension, column dimension, and layer dimension;
[0009] According to the type relationship between the node type of the final routing node in the set of final nodes and the node type of the starting routing node in the set of starting nodes, generate the shortest routing path from the intermediate routing node to the reference routing node to obtain the reference routing path, where the reference routing node and the final routing node belong to at least the same intermediate dimension and reference dimension;
[0010] Generate the shortest routing path from the reference routing node to the final routing node to obtain the final routing path, where the target routing path includes: the intermediate routing path, the reference routing path, and the final routing path;
[0011] Route from the starting routing node to the final routing node according to the target routing path.
[0012] As an alternative implementation, the generating the shortest routing path from the starting routing node to the intermediate routing node on the intermediate dimension of the set of adjacent nodes connected to the starting routing node with respect to the set of starting nodes where the starting routing node is located to obtain the intermediate routing path includes:
[0013] Determine the intermediate dimension of the set of adjacent nodes connected to the starting routing node with respect to the set of starting nodes where the starting routing node is located;
[0014] Generate the shortest routing path from the starting routing node to the intermediate routing node on the intermediate dimension to obtain the intermediate routing path.
[0015] As an alternative implementation, the determining the intermediate dimension of the set of adjacent nodes connected to the starting routing node with respect to the set of starting nodes where the starting routing node is located includes:
[0016] When the starting routing node is the first network node in the set of starting nodes where the starting routing node is located, determine the intermediate dimension as the row dimension;
[0017] When the starting routing node is the second network node in the set of starting nodes where the starting routing node is located, determine the intermediate dimension as the column dimension;
[0018] When the starting routing node is the third network node in the starting node set where the starting routing node is located, determine that the intermediate dimension is the layer dimension.
[0019] As an alternative implementation, the generating, on the intermediate dimension, the shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path includes:
[0020] When the dimension of the starting routing node in the starting node set where it is located on the intermediate dimension is the same as the dimension of the final routing node in the final node set where it is located on the intermediate dimension, determine that the intermediate routing path is empty;
[0021] When the dimension of the starting routing node in the starting node set where it is located on the intermediate dimension is different from the dimension of the final routing node in the final node set where it is located on the intermediate dimension, and the intermediate dimension is the row dimension, generate the shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path, where the intermediate routing node is the first network node in the intermediate node set whose row number is the same as the row number of the final node set where the final routing node is located;
[0022] When the dimension of the starting routing node in the starting node set where it is located on the intermediate dimension is different from the dimension of the final routing node in the final node set where it is located on the intermediate dimension, and the intermediate dimension is the column dimension, generate the shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path, where the intermediate routing node is the second network node in the intermediate node set whose column number is the same as the column number of the final node set where the final routing node is located;
[0023] When the dimension of the starting routing node in the starting node set where it is located on the intermediate dimension is different from the dimension of the final routing node in the final node set where it is located on the intermediate dimension, and the intermediate dimension is the layer dimension, generate the shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path, where the intermediate routing node is the third network node in the intermediate node set whose layer number is the same as the layer number of the final node set where the final routing node is located.
[0024] As an alternative implementation, generating a shortest routing path from the intermediate routing node to the reference routing node according to the type relationship between the node type of the final routing node in the final node set and the node type of the starting routing node in the starting node set to obtain a reference routing path includes:
[0025] Detecting the type relationship between the node type of the final routing node in the final node set and the node type of the starting routing node in the starting node set;
[0026] When the type relationship is that the node type of the final routing node in the final node set is the same as the node type of the starting routing node in the starting node set, randomly select the reference dimension from other dimensions in the dimension of the node set except the intermediate dimension; on the reference dimension, generate a shortest routing path from the intermediate routing node to the reference routing node to obtain the reference routing path;
[0027] When the type relationship is that the node type of the final routing node in the final node set is different from the node type of the starting routing node in the starting node set, determine the dimension corresponding to the node type of the final routing node in the final node set as the reference dimension; on the reference dimension, generate a shortest routing path from the intermediate routing node to the reference routing node to obtain the reference routing path.
[0028] As an alternative implementation, each node set has a set identifier; the node identifier of each network node includes a set identifier field and a network identifier field, where the set identifier field is used to indicate the set identifier of the node set where each network node is located, and the network identifier field is used to indicate the node set connected by each network node; the set identifier of each node set includes a row identifier, a column identifier, and a layer identifier. The row identifier is used to identify the row where each node set is located in the node set matrix, the column identifier is used to identify the column where each node set is located in the node set matrix, and the layer identifier is used to identify the network layer where each node set is located;
[0029] The detecting the type relationship between the node type of the final routing node in the final node set and the node type of the starting routing node in the starting node set includes:
[0030] Detecting whether the network identifier field of the final routing node is equal to the network identifier field of the starting routing node;
[0031] When the network identification field of the final routing node is equal to the network identification field of the starting routing node, determine that the type relationship is that the node type of the final routing node in the final node set is the same as the node type of the starting routing node in the starting node set;
[0032] When the network identification field of the final routing node is not equal to the network identification field of the starting routing node, determine that the type relationship is that the node type of the final routing node in the final node set is different from the node type of the starting routing node in the starting node set.
[0033] As an optional implementation manner, randomly selecting the reference dimension from other dimensions in the dimension of the slave node set except the intermediate dimension includes:
[0034] When the intermediate dimension is the row dimension, randomly select the reference dimension from the column dimension and the layer dimension;
[0035] When the intermediate dimension is the column dimension, randomly select the reference dimension from the row dimension and the layer dimension;
[0036] When the intermediate dimension is the layer dimension, randomly select the reference dimension from the row dimension and the column dimension.
[0037] As an optional implementation manner, determining the dimension corresponding to the node type of the final routing node in the final node set as the reference dimension includes:
[0038] When the node type of the final routing node in the final node set is the first network node, determine that the reference dimension is the row dimension;
[0039] When the node type of the final routing node in the final node set is the second network node, determine that the reference dimension is the column dimension;
[0040] When the node type of the final routing node in the final node set is the third network node, determine that the reference dimension is the layer dimension.
[0041] As an optional implementation manner, generating the shortest routing path from the reference routing node to the final routing node to obtain the final routing path includes:
[0042] Determine the dimension in the dimension of the node set except the intermediate dimension and the reference dimension as the final dimension;
[0043] Generate the shortest routing path from the reference routing node to the final routing node on the final dimension to obtain the final routing path.
[0044] As an alternative implementation, determining the dimensions other than the intermediate dimension and the reference dimension in the dimensions of the node set as the final dimension includes:
[0045] When the intermediate dimension is the column dimension and the reference dimension is the layer dimension, or when the intermediate dimension is the layer dimension and the reference dimension is the column dimension, determining the final dimension as the row dimension;
[0046] When the intermediate dimension is the row dimension and the reference dimension is the layer dimension, or when the intermediate dimension is the layer dimension and the reference dimension is the row dimension, determining the final dimension as the column dimension;
[0047] When the intermediate dimension is the row dimension and the reference dimension is the column dimension, or when the intermediate dimension is the column dimension and the reference dimension is the row dimension, determining the final dimension as the layer dimension.
[0048] As an alternative implementation, generating the shortest routing path from the reference routing node to the final routing node on the final dimension to obtain the final routing path includes:
[0049] Generating a first segment of the path from the reference routing node to the final node set where the final routing node is located on the final dimension;
[0050] Generating a second segment of the path to the final routing node within the final node set, where the final routing path includes the first segment of the path and the second segment of the path.
[0051] According to another embodiment of the present application, there is provided a routing device for an interconnection network. The interconnection network includes N×P×Q node sets, and the interconnection network is divided into Q network layers. N, P, and Q are all positive integers greater than or equal to 2. Each of the Q network layers is used as a target network layer and includes a node set matrix of N rows and P columns. Each target node set in the target network layer is connected to adjacent node sets adjacent in the same row and the same column. The Q network layers are arranged in sequence. The target node set is connected to a reference node set at the same position in an adjacent network layer. The adjacent network layer is the network layer adjacent to the target network layer among the Q network layers. Each node set includes interconnected first network nodes, second network nodes, and third network nodes. The first network node is used to connect adjacent node sets in the same row, the second network node is used to connect adjacent node sets in the same column, and the third network node is used to connect the reference node set. The routing device includes:
[0052] An acquisition module, configured to acquire a starting routing node and a final routing node;
[0053] A first generation module, configured to generate a shortest routing path from the starting routing node to an intermediate routing node on an intermediate dimension of a set of adjacent nodes connected to the starting routing node relative to a set of starting nodes where the starting routing node is located, so as to obtain an intermediate routing path, where an intermediate node set where the intermediate routing node is located and a final node set where a final routing node is located belong to the same intermediate dimension, and dimensions of a node set include: a row dimension, a column dimension, and a layer dimension;
[0054] A second generation module, configured to generate a shortest routing path from the intermediate routing node to a reference routing node according to a type relationship between a node type of the final routing node in the final node set and a node type of the starting routing node in the starting node set, so as to obtain a reference routing path, where the reference routing node and the final routing node belong to at least the same intermediate dimension and a reference dimension;
[0055] A third generation module, configured to generate a shortest routing path from the reference routing node to the final routing node, so as to obtain a final routing path, where a target routing path includes: the intermediate routing path, the reference routing path, and the final routing path;
[0056] A routing module, configured to route from the starting routing node to the final routing node according to the target routing path.
[0057] According to another embodiment of the present application, there is also provided a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0058] According to another embodiment of the present application, there is also provided an electronic device, including a memory and a processor, where 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.
[0059] According to another embodiment of the present application, there is also provided a computer program product, including a computer program, where the computer program implements the steps in any one of the above method embodiments when being executed by a processor.
[0060] Through this application and the above steps, the interconnection network is divided into network layers. The nodes in the network layer are constructed in the form of a node set matrix with N rows and P columns. Each node set includes interconnected first network nodes, second network nodes, and third network nodes. The three types of network nodes are respectively connected to adjacent node sets adjacent in three different dimensions. Under the same network scale, the network diameter of this topological structure is much smaller than that of the grid-shaped topological structure, and a routing planning method in the interconnection network is provided. According to the actual situations of the routing start point and the routing end point, the sequence of routing between each dimension is planned, so as to avoid detours. Therefore, the technical problem of large transmission delay in the network caused by the routing method of the interconnection network can be solved, and the technical effect of reducing the transmission delay in the network caused by the routing method of the interconnection network can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 is a structural block diagram of a topological structure of an interconnection network according to an embodiment of the present application;
[0062] Figure 2 is a schematic diagram of network node identifiers in a topological structure of an interconnection network according to an embodiment of the present application;
[0063] Figure 3 is a flowchart of a routing method for an interconnection network according to an embodiment of the present application Figure 1 ;
[0064] Figure 4 is a flowchart of a routing method for an interconnection network according to an embodiment of the present application Figure 2 ;
[0065] Figure 5 is a flowchart of a construction method for an interconnection network according to an embodiment of the present application;
[0066] Figure 6 is a schematic diagram of a construction process of an interconnection network according to an embodiment of the present application;
[0067] Figure 7 is a schematic diagram of an encoding method for an interconnection network according to an embodiment of the present application;
[0068] Figure 8 is a structural block diagram of a routing device for an interconnection network according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0069] Hereinafter, embodiments of the present application will be described in detail with reference to the drawings and in conjunction with the embodiments.
[0070] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of the present application are used to distinguish similar objects and do not necessarily describe a specific order or sequence.
[0071] In this embodiment, a topological structure of an interconnection network is provided. Figure 1 It is a structural block diagram of a topological structure of an interconnection network according to an embodiment of the present application. As Figure 1 shown, the interconnection network includes N×P×Q node sets. The interconnection network is divided into Q network layers, where N, P, and Q are all positive integers greater than or equal to 2; each of the Q network layers serves as a target network layer, which is a node set matrix of N rows and P columns. Each target node set in the target network layer is connected to adjacent node sets adjacent to it in the same row and the same column; the Q network layers are arranged in sequence, and the target node set is connected to a reference node set at the same position in the adjacent network layer. The adjacent network layer is the network layer adjacent to the target network layer among the Q network layers; each node set includes a first network node, a second network node, and a third network node that are interconnected. The first network node is also connected to adjacent node sets in the same row, the second network node is also connected to adjacent node sets in the same column, and the third network node is also connected to the reference node set.
[0072] Through the above topological structure, the interconnection network is divided into network layers. The nodes in the network layer are constructed in the form of a node set matrix of N rows and P columns. Each node set includes a first network node, a second network node, and a third network node that are interconnected. The three network nodes are respectively connected to adjacent node sets adjacent to them in three different dimensions. Under the same network scale, the network diameter of this topological structure is much smaller than that of the grid-form topological structure. Therefore, the technical problem of large network communication delay in the interconnection network can be solved, and the technical effect of reducing the network communication delay of the interconnection network can be achieved.
[0073] 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 network identifier field. Among them, the set identifier field is used to indicate the set identifier of the node set where each network node is located, and the network identifier field is used to indicate the node set connected by each network node.
[0074] Optionally, in this embodiment, the set identifier of each node set includes a row identifier, a column identifier, and a layer identifier. The row identifier is used to identify the row where each node set is located in the node set matrix, the column identifier is used to identify the column where each node set is located in the node set matrix, and the layer identifier is used to identify the network layer where each node set is located.
[0075] Optionally, in this embodiment, the network identification field of the first network node is 0, the network identification field of the second network node is 1, and the network identification field of the third network node is 2.
[0076] Optionally, in this embodiment, N = P = Q. In this case, the interconnection network includes a set of N×N×N nodes. The interconnection network has 3×N×N×N routing nodes. The out-degree and in-degree of each routing node are 4. The maximum out-degree and in-degree of the routing nodes are 4. The network diameter is N + N + (N - 1).
[0077] Taking the set of 3×3×3 nodes as an example, Figure 2 is a schematic diagram of network node identification in a topological structure of an interconnection network according to an embodiment of the present application, as Figure 2 shown. Each node set and network node has a corresponding identification. The network nodes with network node identifications ((1, 1, 0), 0), ((2, 1, 0), 0), and ((0, 1, 0), 0) are connected.
[0078] Optionally, in this embodiment, the topological structure of the above interconnection network can be, but is not limited to, a combination of an interconnection network of three nodes and a three-dimensional grid network. Comparing the topological structure of the above interconnection network with two-dimensional and three-dimensional grid networks, as shown in Table 1, it can be seen that for the three networks with the same scale of network nodes, the topological structure of the above interconnection network has a small network diameter, reducing the communication delay of the network. The out-degree and in-degree of the network nodes are small, which is more conducive to layout and wiring.
[0079] Table 1 Comparison of the topological structure of the above interconnection network with two-dimensional and three-dimensional Mesh networks
[0080]
[0081] In this embodiment, a routing method for an interconnection network is further provided, which is applied to the above interconnection network. Figure 3 is a flowchart of a routing method for an interconnection network according to an embodiment of the present application Figure 1 as Figure 3 shown. The process includes the following steps:
[0082] Step S302, generate the shortest routing path from the starting routing node to the peer routing node according to the row relationship between the starting routing node and the final routing node, to obtain the first routing path, where the row relationship is used to indicate the row distance between the starting row where the starting node set where the starting routing node is located in the starting network layer and the final row where the final node set where the final routing node is located in the final network layer. The peer node set where the peer routing node is located is in the final row in the starting network layer;
[0083] Step S304: Generate the shortest routing path from the peer routing node to the co-column routing node according to the column relationship between the peer routing node and the final routing node, to obtain the second routing path. Here, the column relationship is used to indicate the column distance between the current column where the peer node set is located in the starting network layer and the final column where the final node set is located in the final network layer. The co-column node set where the co-column routing node is located is in the final row and the final column in the starting network layer;
[0084] Step S306: Generate the shortest routing path from the co-column routing node to the final routing node according to the layer relationship between the co-column routing node and the final routing node, to obtain the third routing path. Here, the layer relationship is used to indicate the layer distance between the starting network layer and the final network layer. The target routing path includes: the first routing path, the second routing path, and the third routing path;
[0085] Step S308: Route from the starting routing node to the final routing node according to the target routing path.
[0086] Through the above steps, the interconnection network is divided into network layers. The nodes in the network layer are constructed in the form of a node set matrix with N rows and P columns. Each node set includes interconnected first network nodes, second network nodes, and third network nodes. The three types of network nodes are respectively connected to adjacent node sets adjacent in three different dimensions. Under the same network scale, the network diameter of this topological structure is much smaller than that of the grid-form topological structure, and a routing planning method in the interconnection network is provided. Therefore, the technical problem of large network communication delay in the interconnection network can be solved, and the technical effect of reducing the network communication delay in the interconnection network can be achieved.
[0087] Optionally, in this embodiment, the routing method can be but is not limited to being deployed on each network node.
[0088] In an optional example, in the above step S302, the shortest routing path from the starting routing node to the peer routing node can be generated according to the row relationship between the starting routing node and the final routing node in the following ways but is not limited to these ways, to obtain the first routing path: Obtain the starting node identifier of the starting routing node and the final node identifier of the final routing node; Detect the row relationship between the starting routing node and the final routing node according to the starting node identifier and the final node identifier; Generate the shortest routing path from the starting routing node to the peer routing node according to the row relationship, to obtain the first routing path.
[0089] Optionally, in this embodiment, the row relationship between routing nodes can be but is not limited to indicating whether the routing nodes are in the same row, or the row distance between the rows where the routing nodes are located, etc.
[0090] Optionally, in this embodiment, the routing method between routing nodes may but is not limited to first performing routing in the row dimension until routing to the starting routing node and the final routing node, regardless of whether they are in the same column or the same layer but in the same row.
[0091] Optionally, in this embodiment, under the above encoding method of network nodes, it can be understood that routing is first performed in the x dimension.
[0092] 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 network identifier field. Among them, the set identifier field is used to indicate the set identifier of the node set where each network node is located, and the network identifier field is used to indicate the node set connected by each network node; the set identifier of each node set includes a row identifier, a column identifier, and a layer identifier. The row identifier is used to identify the row where each node set is located in the node set matrix, the column identifier is used to identify the column where each node set is located in the node set matrix, and the layer identifier is used to identify the network layer where each node set is located; the row relationship between the starting routing node and the final routing node can be detected but is not limited to the following method: detecting whether the starting row identifier in the starting node identifier is equal to the final row identifier in the final node identifier; in the case where the starting row identifier and the final row identifier are not equal, determining that the row relationship is a different row relationship; in the case where the starting row identifier and the final row identifier are equal, determining that the row relationship is the same row relationship; the shortest routing path from the starting routing node to the same row routing node can be generated but is not limited to the following method based on the row relationship to obtain the first routing path: in the case where the row relationship is a different row relationship, generating the shortest routing path from the starting routing node to the same row routing node according to the network identifier field of the starting routing node to obtain the first routing path; in the case where the row relationship is the same row relationship, determining that the first routing path is empty.
[0093] In an optional example, the shortest routing path from the same row routing node to the same column routing node can be generated but is not limited to the following method to obtain the second routing path: obtaining the same row node identifier of the same row routing node and the final node identifier of the final routing node; detecting the column relationship between the same row routing node and the final routing node according to the same row node identifier and the final node identifier; generating the shortest routing path from the same row routing node to the same column routing node according to the column relationship to obtain the second routing path.
[0094] Optionally, in this embodiment, the column relationship between routing nodes may but is not limited to indicating whether the routing nodes are in the same column, or the column distance between the columns where the routing nodes are located, etc.
[0095] Optionally, in this embodiment, the routing method between routing nodes may but is not limited to first routing in the row dimension until reaching the starting routing node and the final routing node, regardless of whether they are in the same column or the same layer but in the same row. Then route in the column dimension until reaching the starting routing node and the final routing node, regardless of whether they are in the same layer but in the same row and column.
[0096] Optionally, in this embodiment, under the encoding method of the above network nodes, it can be understood that routing is first performed in the x dimension and then in the y dimension.
[0097] 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 network identifier field. Among them, the set identifier field is used to indicate the set identifier of the node set where each network node is located, and the network identifier field is used to indicate the node set connected by each network node; the set identifier of each node set includes a row identifier, a column identifier, and a layer identifier. The row identifier is used to identify the row where each node set is located in the node set matrix, the column identifier is used to identify the column where each node set is located in the node set matrix, and the layer identifier is used to identify the network layer where each node set is located; the column relationship between the peer routing node and the final routing node can be detected but is not limited to by the following method: detecting whether the peer column identifier in the peer node identifier is equal to the final column identifier in the final node identifier; in the case where the peer column identifier and the final column identifier are not equal, determining that the column relationship is a different column relationship; in the case where the peer column identifier and the final column identifier are equal, determining that the column relationship is the same column relationship.
[0098] The shortest routing path from the peer routing node to the same-column routing node can be generated but is not limited to by the following method according to the column relationship to obtain the second routing path: in the case where the column relationship is a different column relationship, generating the shortest routing path from the peer routing node to the same-column routing node according to the network identifier field of the peer routing node to obtain the second routing path; in the case where the column relationship is the same column relationship, determining that the second routing path is empty.
[0099] In an optional example, the shortest routing path from the same-column routing node to the final routing node can be generated but is not limited to by the following method to obtain the third routing path: obtaining the same-column node identifier of the same-column routing node and the final node identifier of the final routing node; detecting the layer relationship between the same-column routing node and the final routing node according to the same-column node identifier and the final node identifier; generating the shortest routing path from the same-column routing node to the final routing node according to the layer relationship to obtain the third routing path.
[0100] Optionally, in this embodiment, the layer relationship between routing nodes may, but is not limited to, indicating whether the routing nodes are on the same layer, or the layer distance between the layers where the routing nodes are located, and so on.
[0101] Optionally, in this embodiment, the routing method between routing nodes may, but is not limited to, include first routing in the row dimension until the start routing node and the final routing node are in the same row regardless of whether they are in the same column or the same layer. Then route in the column dimension until the start routing node and the final routing node are in the same row and column regardless of whether they are in the same layer. Finally, route to the final routing node in the layer dimension.
[0102] Optionally, in this embodiment, under the above encoding method of network nodes, it can be understood that routing is first performed in the x dimension. Then route in the y dimension. Finally, route in the z dimension.
[0103] 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 network identifier field, where the set identifier field is used to indicate the set identifier of the node set where each network node is located, and the network identifier field is used to indicate the node set connected by each network node; the set identifier of each node set includes a row identifier, a column identifier, and a layer identifier. The row identifier is used to identify the row where each node set is located in the node set matrix, the column identifier is used to identify the column where each node set is located in the node set matrix, and the layer identifier is used to identify the network layer where each node set is located; the layer relationship between the same-column routing node and the final routing node can be detected according to the same-column node identifier and the final node identifier in the following ways, but is not limited to: detecting whether the same-column layer identifier in the same-column node identifier is equal to the final layer identifier in the final node identifier; in the case where the same-column layer identifier and the final layer identifier are not equal, determining that the layer relationship is a different-layer relationship; in the case where the same-column layer identifier and the final layer identifier are equal, determining that the layer relationship is the same-layer relationship;
[0104] The shortest routing path from the same-column routing node to the final routing node can be generated according to the layer relationship in the following ways, but is not limited to, to obtain the third routing path: in the case where the layer relationship is a different-layer relationship, generate the shortest routing path from the same-column routing node to the final routing node according to the network identifier field of the same-column routing node to obtain the third routing path; in the case where the layer relationship is the same-layer relationship, determine that the third routing path is empty.
[0105] In an alternative embodiment, a routing method applied to the topology of the above interconnection network is provided. Assume that the source routing node, i.e., the above start routing node S = ((x S , y S , z S ), iS ), the target routing node, i.e., the above-mentioned final routing node D = ((x D , y D , z D ), i D ), and the routing method may but is not limited to including the following steps:
[0106] The first step: Determine whether X S and x D are equal: If x S ≠x D , enter the second step; if x S =x D , enter the third step.
[0107] The second step: Since x S ≠x D , routing needs to be performed in the X direction: Determine whether i S is 0. If i S ≠0, then perform routing within the node set, route to the node numbered 0, and then perform routing in the X direction: If X S <x D , then route in the positive X direction until x S =x D ; if x S >x D , then route in the negative X direction until x S =x D . If i S =1, then directly perform routing in the X direction and then enter the third step.
[0108] The third step: At this time, x S =x D , and there is no need to perform routing in the X direction anymore. Update the routing node where the data packet is located at this time to the source routing node. Determine whether y S and y D are equal: If y S ≠y D , enter the fourth step; if y S =y D , enter the fifth step.
[0109] The fourth step: Since y S ≠y D , routing needs to be performed in the Y direction: Determine whether i S is 1. If i S ≠1, then perform routing within the node set, route to the node numbered 1, and then perform routing in the Y direction: If y S <y D , then route in the positive Y direction until yS = y D ; If y S > y D , then route in the negative Y direction until y S = y D . If i S = 1, then directly route in the Y direction and enter the fifth step.
[0110] Fifth step: At this time, y S = y D , and there is no need to route in the X and Y directions anymore. Update the routing node where the data packet is located at this time to the source routing node. Judge whether z S and z D are equal: If z S ≠ z D , enter the sixth step. If z S = z D , enter the seventh step.
[0111] Sixth step: z S ≠ z D , and routing in the Z direction is required: Judge whether i S is 2. If i S ≠ 2, then route within the node set to the node numbered 2, and then route in the Z direction: If Z S < Z D , then route in the positive Z direction until z S = z D ; If z S > z D , then route in the negative Z direction until z S = z D . If i S = 2, then directly route in the Y direction and enter the seventh step.
[0112] Seventh step: At this time, z S = z D , and there is no need to route in the X, Y, and Z directions anymore. Update the routing node where the data packet is located at this time to the source routing node. Judge whether i S is equal to i D . If i S = i D , the routing ends; If i S ≠ i D , then route within the node set from i S to i D , and the routing ends.
[0113] For example: Assume that the source routing node s = ((2, 0, 0), 2) and the destination routing node D = ((0, 2, 2), 1). Then the routing process is as follows:
[0114] Step 1: Judge whether x S and x D are equal: x S ≠x D , enter Step 2.
[0115] Step 2: Since x S ≠x D , routing is required in the X direction: Judge whether i S is 0. Since i S ≠0, route inside the triangle to the node numbered 0. The routing process is: ((2, 0, 0), 2) → ((2, 0, 0), 0). Then route in the X direction again: x S >x D , then route in the negative X direction until x S =x D . The routing process is: ((2, 0, 0), 0) → ((1, 0, 0), 0) → ((0, 0, 0), 0). Enter Step 3.
[0116] Step 3: At this time, x S =x D , and routing in the X direction is no longer required. Update the routing node where the data packet is located to the source routing node, that is, at this time S = ((0, 0, 0), 2). Judge whether y S and y D are equal: y S ≠y D , enter Step 4.
[0117] Step 4: Since y S ≠y D , routing is required in the Y direction: Judge whether i S is 1. Since i S ≠1, route inside the triangle to the node numbered 1. The routing process is: ((0, 0, 0), 0) → ((0, 0, 0), 1). Then route in the Y direction again: y S <y D , then route in the positive Y direction until y S =y D . The routing process is: ((0, 0, 0), 1) → ((0, 1, 0), 1) → ((0, 2, 0), 1). Enter Step 5.
[0118] Step 5: At this time, y S =y D, there is no need to route in the X and Y directions anymore. Update the routing node where the data packet is located at this time to the source routing node, that is, at this time S = ((0, 2, 0), 1). Judge z S and z D whether they are equal: z S ≠z D , enter the sixth step.
[0119] Sixth step: z S ≠z D , it is necessary to route in the Z direction: judge whether i S is 2, i S ≠2, then route inside the triangle to the node numbered 2, the routing process: ((0, 2, 0), 1) → ((0, 2, 0), 2), and then route in the Z direction again: z S <z D , then route in the positive Z direction until z S =z D , the routing process: ((0, 2, 0), 2) → ((0, 2, 1), 2) → ((0, 2, 2), 2), enter the seventh step.
[0120] Seventh step: At this time z S =z D , there is no need to route in the X, Y, and Z directions anymore. Update the routing node where the data packet is located at this time to the source routing node, that is, at this time S = ((0, 2, 2), 2). Judge whether i S is equal to i D , if i S ≠i D , then route inside the triangle, route from i S to i D , the routing process: ((0, 2, 2), 2) → ((0, 2, 2), 1), the routing ends.
[0121] For an N×N two-dimensional Mesh network, its network diameter is 2×(N - 1). For an N×N×N three-dimensional Mesh network, its network diameter is 3×(N - 1). It can be seen that as the number of routing nodes increases, whether it is a two-dimensional Mesh or a three-dimensional Mesh, the network diameter will become larger and larger, resulting in an increase in network communication delay, thus limiting the application of the network. As a result, both two-dimensional Mesh and three-dimensional Mesh can only be applied in network environments with a small scale. The above network structure of three nodes combined with the topology of a three-dimensional Mesh network has the advantages of a small network diameter, simple structure, simple routing algorithm easy to implement, and good scalability. And as the scale of routing nodes increases, the advantage of a small network diameter becomes more obvious. Moreover, the maximum values of the out-degree and in-degree of routing nodes are 4, which is less than 6 of the three-dimensional Mesh, facilitating the layout and wiring of the backend.
[0122] In this embodiment, a routing method for an interconnection network is also provided, which is applied to the above interconnection network. Figure 4 It is a flow chart of a routing method for an interconnection network according to an embodiment of the present application. Figure 2 , as Figure 4 shown, this flow includes the following steps:
[0123] Step S402, obtain the starting routing node and the final routing node;
[0124] Step S404, on the intermediate dimension of the set of adjacent nodes connected to the starting routing node with respect to the starting node set where the starting routing node is located, generate the shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path. Among them, the intermediate node set where the intermediate routing node is located and the final node set where the final routing node is located belong to the same intermediate dimension. The dimensions of the node set include: row dimension, column dimension, and layer dimension;
[0125] Step S406, according to the type relationship between the node type of the final routing node in the final node set and the node type of the starting routing node in the starting node set, generate the shortest routing path from the intermediate routing node to the reference routing node to obtain the reference routing path. Among them, the reference routing node and the final routing node belong to at least the same intermediate dimension and reference dimension;
[0126] Step S408, generate the shortest routing path from the reference routing node to the final routing node to obtain the final routing path. Among them, the target routing path includes: the intermediate routing path, the reference routing path, and the final routing path;
[0127] Step S410, route from the starting routing node to the final routing node according to the target routing path.
[0128] Through the above steps, the interconnection network is divided into network layers. The nodes in the network layer are constructed in the form of a node set matrix with N rows and P columns. Each node set includes interconnected first network nodes, second network nodes, and third network nodes. The three types of network nodes are respectively connected to adjacent node sets adjacent to them in three different dimensions. Under the same network scale, the network diameter of this topological structure is much smaller than that of the grid-like topological structure, and a routing planning method in the interconnection network is provided. According to the actual situations of the routing start point and the routing end point, the sequence of routing between each dimension is planned, so as to avoid detours. Therefore, the technical problem of large transmission delay in the network caused by the routing method of the interconnection network can be solved, and the technical effect of reducing the transmission delay in the network caused by the routing method of the interconnection network can be achieved.
[0129] Optionally, in this embodiment, the routing method can be, but is not limited to, deployed on each network node.
[0130] In an optional example, in the above step S404, the shortest routing path from the start routing node to the intermediate routing node can be generated, but is not limited to, in the following manner on the intermediate dimension of the adjacent node set connected to the start routing node relative to the start node set where the start routing node is located, to obtain the intermediate routing path: Determine the intermediate dimension of the adjacent node set connected to the start routing node relative to the start node set where the start routing node is located; Generate the shortest routing path from the start routing node to the intermediate routing node on the intermediate dimension to obtain the intermediate routing path.
[0131] Optionally, in this embodiment, the dimensions of the node set include three dimensions: row dimension, column dimension, and layer dimension. The routing order of each dimension during the routing process is determined according to the situations and relative relationships of the start routing node and the final routing node, so as to find a routing path with less delay.
[0132] Optionally, in this embodiment, the intermediate dimension of the adjacent node set connected to the start routing node relative to the start node set where the start routing node is located can be determined, but is not limited to, in the following manner: When the start routing node is the first network node in the start node set where the start routing node is located, determine the intermediate dimension as the row dimension; When the start routing node is the second network node in the start node set where the start routing node is located, determine the intermediate dimension as the column dimension; When the start routing node is the third network node in the start node set where the start routing node is located, determine the intermediate dimension as the layer dimension.
[0133] Optionally, in this embodiment, the corresponding starting routing dimension is determined according to the connection function of the starting routing node in the starting node set where it is located. For example: If the connection function of the starting routing node in the starting node set where it is located is used to connect adjacent node sets in the same row, then the starting routing dimension (i.e., the intermediate dimension) is the row dimension. If the connection function of the starting routing node in the starting node set where it is located is used to connect adjacent node sets in the same column, then the starting routing dimension (i.e., the intermediate dimension) is the column dimension. If the connection function of the starting routing node in the starting node set where it is located is used to connect adjacent node sets in the same layer, then the starting routing dimension (i.e., the intermediate dimension) is the layer dimension.
[0134] Optionally, in this embodiment, the shortest routing path from the starting routing node to the intermediate routing node can be, but is not limited to, generated in the intermediate dimension in the following manner to obtain the intermediate routing path: When the dimension of the starting routing node in the starting node set where it is located in the intermediate dimension is the same as the dimension of the final routing node in the final node set where it is located in the intermediate dimension, it is determined that the intermediate routing path is empty; When the dimension of the starting routing node in the starting node set where it is located in the intermediate dimension is different from the dimension of the final routing node in the final node set where it is located in the intermediate dimension, and the intermediate dimension is the row dimension, the shortest routing path from the starting routing node to the intermediate routing node is generated to obtain the intermediate routing path, where the intermediate routing node is the first network node in the intermediate node set whose row number is the same as the row number of the final node set where the final routing node is located; When the dimension of the starting routing node in the starting node set where it is located in the intermediate dimension is different from the dimension of the final routing node in the final node set where it is located in the intermediate dimension, and the intermediate dimension is the column dimension, the shortest routing path from the starting routing node to the intermediate routing node is generated to obtain the intermediate routing path, where the intermediate routing node is the second network node in the intermediate node set whose column number is the same as the column number of the final node set where the final routing node is located; When the dimension of the starting routing node in the starting node set where it is located in the intermediate dimension is different from the dimension of the final routing node in the final node set where it is located in the intermediate dimension, and the intermediate dimension is the layer dimension, the shortest routing path from the starting routing node to the intermediate routing node is generated to obtain the intermediate routing path, where the intermediate routing node is the third network node in the intermediate node set whose layer number is the same as the layer number of the final node set where the final routing node is located.
[0135] Optionally, in this embodiment, it is possible but not limited to generate the shortest routing path from the intermediate routing node to the reference routing node according to the type relationship between the node type of the final routing node in the final node set and the node type of the starting routing node in the starting node set, and obtain the reference routing path in the following manner: Detect the type relationship between the node type of the final routing node in the final node set and the node type of the starting routing node in the starting node set; in the case where the type relationship is that the node type of the final routing node in the final node set is the same as the node type of the starting routing node in the starting node set, randomly select a reference dimension from other dimensions except the intermediate dimension in the dimension of the node set; on the reference dimension, generate the shortest routing path from the intermediate routing node to the reference routing node to obtain the reference routing path; in the case where the type relationship is that the node type of the final routing node in the final node set is different from the node type of the starting routing node in the starting node set, determine the dimension corresponding to the node type of the final routing node in the final node set as the reference dimension; on the reference dimension, generate the shortest routing path from the intermediate routing node to the reference routing node to obtain the reference routing path.
[0136] 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 network identifier field, where the set identifier field is used to indicate the set identifier of the node set where each network node is located, and the network identifier field is used to indicate the node set connected by each network node; the set identifier of each node set includes a row identifier, a column identifier, and a layer identifier. The row identifier is used to identify the row where each node set is located in the node set matrix, the column identifier is used to identify the column where each node set is located in the node set matrix, and the layer identifier is used to identify the network layer where each node set is located; it is possible but not limited to detect the type relationship between the node type of the final routing node in the final node set and the node type of the starting routing node in the starting node set in the following manner: Detect whether the network identifier field of the final routing node is equal to the network identifier field of the starting routing node; in the case where the network identifier field of the final routing node is equal to the network identifier field of the starting routing node, determine that the type relationship is that the node type of the final routing node in the final node set is the same as the node type of the starting routing node in the starting node set; in the case where the network identifier field of the final routing node is not equal to the network identifier field of the starting routing node, determine that the type relationship is that the node type of the final routing node in the final node set is different from the node type of the starting routing node in the starting node set.
[0137] Optionally, in this embodiment, the reference dimension may be randomly selected from dimensions other than the intermediate dimension among the dimensions of the node set in, but not limited to, the following manner: when the intermediate dimension is the row dimension, the reference dimension is randomly selected from the column dimension and the layer dimension; when the intermediate dimension is the column dimension, the reference dimension is randomly selected from the row dimension and the layer dimension; when the intermediate dimension is the layer dimension, the reference dimension is randomly selected from the row dimension and the column dimension.
[0138] Optionally, in this embodiment, the dimension corresponding to the node type of the final routing node in the final node set may be determined as the reference dimension in, but not limited to, the following manner: when the node type of the final routing node in the final node set is the first network node, the reference dimension is determined as the row dimension; when the node type of the final routing node in the final node set is the second network node, the reference dimension is determined as the column dimension; when the node type of the final routing node in the final node set is the third network node, the reference dimension is determined as the layer dimension.
[0139] Optionally, in this embodiment, the shortest routing path from the reference routing node to the final routing node may be generated in, but not limited to, the following manner to obtain the final routing path: the dimension other than the intermediate dimension and the reference dimension in the dimension of the node set is determined as the final dimension; the shortest routing path from the reference routing node to the final routing node is generated on the final dimension to obtain the final routing path.
[0140] Optionally, in this embodiment, the dimension other than the intermediate dimension and the reference dimension in the dimension of the node set may be determined as the final dimension in, but not limited to, the following manner: when the intermediate dimension is the column dimension and the reference dimension is the layer dimension, or when the intermediate dimension is the layer dimension and the reference dimension is the column dimension, the final dimension is determined as the row dimension; when the intermediate dimension is the row dimension and the reference dimension is the layer dimension, or when the intermediate dimension is the layer dimension and the reference dimension is the row dimension, the final dimension is determined as the column dimension; when the intermediate dimension is the row dimension and the reference dimension is the column dimension, or when the intermediate dimension is the column dimension and the reference dimension is the row dimension, the final dimension is determined as the layer dimension.
[0141] Optionally, in this embodiment, the shortest routing path from the reference routing node to the final routing node may be generated on the final dimension in, but not limited to, the following manner to obtain the final routing path: the first segment of the path from the reference routing node to the final node set where the final routing node is located is generated on the final dimension; the second segment of the path to the final routing node is generated within the final node set, where the final routing path includes the first segment of the path and the second segment of the path.
[0142] For the network structure of three network nodes of N×N×N×3 network nodes and the network topology combined with the three-dimensional Mesh, the network diameter is N+N+N, that is, the maximum value of the shortest distance between any two routing nodes in the network is N+N+N. If the routing method of first X dimension, then Y dimension and finally Z dimension is used, the maximum value of the routing path between any two routing nodes in the network is N+N+(N+1). That is, the routing path between any two routing nodes in the network is greater than the shortest distance between the two routing nodes, that is, if the routing method of first X dimension, then Y dimension and finally Z dimension is used, there is a detour in the routing path between the routing nodes, resulting in an increase in the transmission delay of the data in the network, and the advantages of the above network structure are not brought into play. Therefore, the above-mentioned routing method that follows the shortest distance routing is proposed. The use of this routing method can make the maximum value of the routing path between any two routing nodes in the network N+N+N, which is equal to the network diameter. Thereby avoiding the detour phenomenon and reducing the network transmission delay.
[0143] In an optional implementation, it is assumed that the source routing node S=((x S ,y S , z S ),i S ), target routing node D = ((x D ,y D , z D ),i D ), the node S where the data packet is currently located during the routing process now =((x now ,y now , z now ),i now ). To ensure that all routing requests can be routed according to the shortest distance, the routing rules are as follows:
[0144] Rule 1: When routing along any dimension, X, Y, or Z, all routing along that dimension must be completed. If routing along the Y direction is selected, routing to y=y D The routing node.
[0145] Rule 2: Check S = ((x S ,y S , z S ),i S ) in i S The value of i S = 0, it will be routed in the x direction first, until it is routed to x in the x direction. now =x D Routing node; i S =1, then routing is preferred along the Y direction until routing to y in the Y direction now =y DThe routing node; i S = 2, then preferentially route along the Z direction until routing to z in the Z direction now = z D of the routing node.
[0146] Rule 3: Check the value of i in D = ((x D , y D , z D ), i D ): D If i
[0147] ≠ i S : In the case of i D = 0, then preferentially complete the routing in the YZ direction and finally route along the X direction; that is, in the YZ direction, y D = y now and z D = z now , then start routing along the X direction. In the case of i D = 1, then preferentially route along the XZ direction and finally route along the Y direction; that is, in the XZ direction, x D = x now and z D = z now , then route along the Y direction. In the case of i D = 2, then preferentially route along the XY direction and finally route along the Z direction; that is, in the XY direction, x D = x now and y D = y now , then route along the Z direction. D If i
[0148] = i S , on the premise of following Rule 2, the routing of the other two directions can be arranged arbitrarily. D According to the above rules, the routing process is as follows:
[0149] The first step: Let S
[0150] = S = ((x now , y S , z S ), i S ), check the value of i S among them. If i now = 0, then enter the second step; if i now = 1, then enter the third step; if i now = 2, then enter the fourth step. now The second step: At this time, i
[0151] = 0, then enter the second step; i now= 0, then route preferentially along the X direction: If at this time x now = x D , then there is no need to route in the X direction and directly proceed to the fifth step; If at this time x now ≠ x D , then routing in the X direction is required: If x now < x D , then route in the positive X direction until x now = x D ; If x now > x D , then route in the negative X direction until x now = x D , and proceed to the fifth step.
[0152] Step 3: At this time, i now = 1, then route preferentially along the Y direction: If at this time y now = y D , then there is no need to route in the Y direction and directly proceed to the sixth step; If at this time y now ≠ y D , then routing in the Y direction is required: If y now < y D , then route in the positive Y direction until y now = y D ; If y now > y D , then route in the negative Y direction until y now = y D , and proceed to the sixth step.
[0153] Step 4: At this time, i now = 2, then route preferentially along the Z direction: If at this time z now = z D , then there is no need to route in the Z direction and directly proceed to the seventh step; If at this time z now ≠ z D , then routing in the Z direction is required: If z now < z D , then route in the positive Z direction until z now = z D ; If z now > z D , then route in the negative Z direction until z now = z D , and proceed to the seventh step.
[0154] Step 5: At this time, x now = x D , there is no longer a need to route in the X direction. Check D = ((x D , yD , z D ), i D ) in i D 's value and judge (x now , y now , z now ) and (x D , y D , z D ) are equal:
[0155] If (x now , y now , z now ) = (x D , y D , z D ), route inside the triangle and the routing ends. If (x now , y now , z now ) ≠ (x D , y D , z D ):
[0156] If i D = 0, then judge whether y now and y D are equal, and whether z now and z D are equal. If y now = y D , z now ≠ z D , then select routing method one; if y now ≠ y D , z now = z D , then select routing method two; if y now ≠ y D , z now ≠ z D Then you can choose randomly between routing method one and routing method two:
[0157] Routing method one: ((x now , y now , z now ), 0) → ((x now , y now , z now ), 2), and then enter the fourth step.
[0158] Routing method two: ((x now , y now , z now ), 0) → ((x now , y now , znow ),1), and then proceed to the third step.
[0159] If i D = 1, then the routing in the Z direction needs to be completed first. If z now ≠ z D , then select routing method one; if Z now = z D , then select routing method two.
[0160] If i D = 2, then the routing in the Y direction needs to be completed first. If y now = y D , then select routing method one; if y now ≠ y D , then select routing method two.
[0161] Sixth step: At this time, y now = y D , and there is no need to perform routing in the Y direction anymore. Check the value of i in D = ((x D , y D , z D ), i D ) and determine whether (x D , y now , z now ) is equal to (x now , y D , z D ): If (x D , y now , z now ) = (x now , y D , z D ), perform routing inside the triangle, and the routing ends. D )
[0162] If (x now , y now , z now ) ≠ (x D , y D , z D ): If i D = 1, then determine whether x now is equal to x D , and whether z now is equal to z D . If x now = x D , z now ≠ z D , then select routing method three; if x now ≠ x D , znow = z D , then select routing method four; if x now ≠ x D , z now ≠ z D then you can freely choose between routing method three and routing method four:
[0163] Routing method three: ((x now , y now , z now ), 1) → ((x now , y now , z now ), 2), and then enter the fourth step.
[0164] Routing method four: ((x now , y now , z now ), 1) → ((x now , y now , z now ), 0), and then enter the second step.
[0165] If i D = 0, then it is necessary to give priority to completing the routing in the Z direction. If z now ≠ z D , then select routing method three; if z now = z D , then select routing method four.
[0166] If i D = 2, then it is necessary to give priority to completing the routing in the X direction. If x now = x D , then select routing method three; if x now ≠ x D , then select routing method four.
[0167] Seventh step: At this time, z now = z D , and there is no need to perform routing in the Z direction anymore. Check the value of i in D = ((x D , y D , z D ), i D ) and judge whether (x D , y now , z now ) is equal to (x now ): If (x D , y D , z D ) = (x now , y now , z now ) = (xD , y D , z D ) Route inside the triangle. Routing ends.
[0168] If (x now , y now , z now ) ≠ (x D , y D , z D ): If i D = 2, then determine whether x now is equal to x D , and whether y now is equal to y D . If x now = x D , y now ≠ y D , then select routing method five; if x now ≠ x D , y now = y D , then select routing method six; if x now ≠ x D , y now ≠ y D then you can randomly choose between routing method three and routing method four:
[0169] Routing method five: ((x now , y now , z now ), 2) → ((x now , y now , z now ), 1), and then enter the third step.
[0170] Routing method six: ((x now , y now , z now ), 2) → ((x now , y now , z now ), 0), and then enter the second step.
[0171] If i D = 0, then it is necessary to give priority to completing the routing in the Y direction. If y now ≠ y D , then select routing method five; if y now = y D , then select routing method six.
[0172] i D = 1, then it is necessary to give priority to completing the routing in the X direction. If x now = xD , then select routing method five; if x now ≠x D , then select routing method six.
[0173] For example: Assume the source routing node S = ((x S , y S , z S ), i S ) = ((0, 1, 2), 0), and the destination routing node D = ((x D , y D , z D ), i D ) = ((2, 2, 2), 0). The routing method is as follows:
[0174] Step 1: Let S now = S = ((0, 1, 2), 0), check the value of i now in it. If i now = 0, then go to Step 2.
[0175] Step 2: At this time, i now = 0, so route along the X direction preferentially: At this time, x now ≠x D , so routing is required in the X direction: If x now < x D , then route in the positive X direction until x now = x D ; The routing process is ((0, 1, 2), 0) → ((1, 1, 2), 0) → ((2, 1, 2), 0). At this time, S now = ((2, 1, 2), 0), and then go to Step 5.
[0176] Step 5: At this time, x now = x D = 2, and routing in the X direction is no longer required. (x now , y now , z now ) ≠ (x D , y D , z D ): i D = 0, then judge whether y now is equal to y D , and whether z now is equal to z D . y now ≠y D , z now = z D , then select routing method two.
[0177] Routing method 2: ((2, 1, 2), 0) → ((2, 1, 2), 1), S now = ((2, 1, 2), 1), and then enter the third step.
[0178] The third step: At this time, i now = 1, and at this time, y now ≠ y D , then routing needs to be performed in the Y direction: y now <y D , then route in the positive Y direction until y now = y D : ((2, 1, 2), 1) → ((2, 2, 2), 1), S now = ((2, 2, 2), 1), and then enter the sixth step.
[0179] The sixth step: At this time, y now = y D , and routing in the Y direction is no longer required. Check the value of i in D = ((x D , y D , z D ), i D ): Determine whether the value of i in ((x D , y now , z now ) is equal to that in ((x now , y D , z D ): If ((x D , y now , z now ) = (x now , y D , y D , Z D ), perform routing inside the triangle, and the routing process is: ((2, 2, 2), 1) → ((2, 2, 2), 0), and the routing ends.
[0180] Another example: Suppose the source routing node S = ((x S , y S , z S ), i S ) = ((2, 0, 0), 2), and the target routing node D = ((x D , y D , z D ), i D ) = ((0, 2, 2), 1), and the routing process is as follows:
[0181] The first step: Let S now = S = ((2, 0, 0), 2), check the value of i in now , i nowIf it is equal to 2, proceed to the fourth step.
[0182] Fourth step: At this time, i now is equal to 2, then route preferentially along the Z direction: At this time, z now is not equal to z D , then routing is required in the Z direction: z now is less than z D , then route in the positive Z direction until z now is equal to z D , routing method: ((2, 0, 0), 2) → ((2, 0, 1), 2) → ((2, 0, 2), 2), S now = ((2, 0, 2), 2) and proceed to the seventh step.
[0183] Seventh step: At this time, z now is equal to z D , and there is no need to route in the z direction anymore. Check the value of i in D = ((x D , y D , z D ), i D ) and determine whether (x D , y now , z now ) is equal to (x now , y D , z D ): (x D , y now , z now ) is not equal to (x now , y D , z D ): D )
[0184] If i D is equal to 1 and x now is not equal to x D , then it is necessary to preferentially complete the routing in the X direction and select routing method six.
[0185] Routing method six: ((2, 0, 2), 2) → ((2, 0, 2), 0), and then proceed to the second step.
[0186] Second step: At this time, i now is equal to 0, route preferentially along the X direction: At this time, x now is not equal to x D , then routing is required in the X direction: If x now is greater than x D , route in the negative X direction until x now is equal to x D , routing method: ((2, 0, 2), 0) → ((1, 0, 2), 0) → ((0, 0, 2), 0). Snow = ((0, 0, 2), 0), proceed to the fifth step.
[0187] Fifth step: At this time, x now = x D , there is no need to route in the X direction anymore. Check the value of i in D = ((x D , y D , z D ), i D ) and determine whether (x D , y now , z now ) is equal to (x now , y D , z D ): (x D , y now , z now ) ≠ ([[]] now , y xD , z D ) :
[0188] If i D = 1, then it is necessary to prioritize the routing in the z direction, z D = z now , then select routing method two.
[0189] Routing method two: ((0, 0, 2), 0) → ((0, 0, 2), 1), and then proceed to the third step.
[0190] Third step: At this time, i D = 1, then prioritize routing along the Y direction: At this time, y now ≠ y now , then it is necessary to route in the Y direction: If y D < y now , then route in the positive Y direction until y D = y now , routing method ((0, 0, 2), 1) → ((0, 1, 2), 1) → ((0, 2, 2), 1) S D = ((0, 2, 2), 1), proceed to the sixth step.
[0191] Sixth step: At this time, y now = y now , there is no need to route in the Y direction anymore. Check the value of i in D = ((x D , y D , z D ) and determine whether (x D , y D , z D ) is equal to (x now , y now , znow ) is equal to (x D , y D , z D )? (x now , y now , z now ) = (x D , y D , z D ) and i now = i D , the routing ends.
[0192] In this embodiment, a method for constructing an interconnection network is further provided, which is applied to constructing the above-mentioned interconnection network. Figure 5 It is a flowchart of a method for constructing an interconnection network according to an embodiment of the present application, as Figure 5 shown, and the process includes the following steps:
[0193] Step S502: Construct N×P×Q node sets, where each node set includes a first network node, a second network node, and a third network node that are interconnected, and N, P, and Q are all positive integers greater than or equal to 2;
[0194] Step S504: Construct a three-dimensional network of N×P×Q, where the three-dimensional network includes N×P×Q initial nodes, the three-dimensional network is divided into Q network layers, each network layer is an initial node matrix of N rows and P columns as the target network layer, and each initial node in the target network layer is connected to adjacent nodes in the same row and the same column;
[0195] Step S506: Use N×P×Q node sets to replace N×P×Q initial nodes in the three-dimensional network, and establish connections between the node sets to obtain an interconnection network, where the first network node in each node set is connected to adjacent node sets in the same row, the second network node in each node set is connected to adjacent node sets in the same column, and the third network node in each node set is connected to a reference node set.
[0196] Through the above steps, the constructed interconnection network is divided into network layers, the nodes in the network layer are constructed in the form of an N-row P-column node set matrix, each node set includes a first network node, a second network node, and a third network node that are interconnected, and the three network nodes are respectively connected to adjacent node sets in three different dimensions. Under the same network scale, the network diameter of this topological structure is much smaller than that of the grid-shaped topological structure. Therefore, the technical problem of large network communication delay in the interconnection network can be solved, and the technical effect of reducing the network communication delay of the interconnection network can be achieved.
[0197] In an alternative example, after the above step S506, each network node can be encoded in, but not limited to, the following manner: encoding a set identifier for each set of nodes, where the set identifier of each set of nodes includes a row identifier, a column identifier, and a layer identifier. The row identifier is used to identify the row in the node set matrix where each set of nodes is located, the column identifier is used to identify the column in the node set matrix where each set of nodes is located, and the layer identifier is used to identify the network layer where each set of nodes is located; encoding a node identifier for each network node, where the node identifier includes a set identifier field and a network identifier field. The set identifier field is used to indicate the set identifier of the set of nodes where each network node is located, and the network identifier field is used to indicate the set of nodes to which each network node is connected.
[0198] In an alternative example, a node identifier can be encoded for each network node in, but not limited to, the following manner: encoding the network identifier field of the first network node in each set of nodes as 0, encoding the network identifier field of the second network node in each set of nodes as 1, and encoding the network identifier field of the third network node in each set of nodes as 2.
[0199] Figure 6 is a schematic diagram of a construction process of an interconnected network according to an embodiment of the present application, as Figure 6 shown. Taking a 4×4×4 three-dimensional Mesh network as an example, the construction process of the interconnected network is as follows:
[0200] First step: Construct a topological structure connecting three network nodes in 4×4×4 according to the connection manner of three network nodes.
[0201] Second step: Construct a 4×4×4 three-dimensional Mesh network according to the structure of the grid network.
[0202] Second step: Replace all nodes of the 4×4×4 three-dimensional Mesh network topological structure with the topological structure connecting three network nodes in 4×4×4.
[0203] For the encoding method of each network node in the constructed interconnected network above:
[0204] First step: According to the encoding method of the three-dimensional Mesh network, encode each triangle. Establish a three-dimensional rectangular coordinate system, and each set of nodes is represented by three-dimensional space coordinates. Figure 7 is a schematic diagram of an encoding method of an interconnected network according to an embodiment of the present application, as Figure 7 shown, which gives the encoding of the network structure of each set of nodes in a 2×2×2 three-dimensional Mesh network.
[0205] Step 2: Encode each routing node. Each routing node is numbered as ((x, y, z), i), where 0 ≤ i ≤ 2; (x, y, z) represents the three-dimensional spatial coordinates of the node set to which the routing node belongs; i = 0 means that the node is located in (x, y, z) and is connected to the nodes ((x + 1, y, z), i) and ((x - 1, y, z), i); i = 1 means that the node is located in (x, y, z) and is connected to the nodes ((x, y + 1, z), i) and ((x, y - 1, z), i); i = 2 means that the node is located in (x, y, z) and is connected to the nodes ((x, y, z + 1), i) and ((x, y, z - 1), i).
[0206] 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. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0207] In this embodiment, a routing device for an interconnection network is further provided. The device is applied to the above interconnection network and is used to implement the above embodiments and preferred embodiments. Those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0208] Figure 8 is a structural block diagram of a routing device for an interconnection network according to an embodiment of the present application. As Figure 8 shown, the device includes:
[0209] An acquisition module 802, configured to acquire a starting routing node and a final routing node;
[0210] A first generation module 804, configured to generate a shortest routing path from the starting routing node to an intermediate routing node on the intermediate dimension of the set of adjacent nodes connected to the starting routing node with respect to the starting node set where the starting routing node is located, to obtain an intermediate routing path, where the intermediate node set where the intermediate routing node is located and the final node set where the final routing node is located belong to the same intermediate dimension, and the dimensions of the node set include: row dimension, column dimension, and layer dimension;
[0211] A second generation module 806, configured to generate a shortest routing path from the intermediate routing node to a reference routing node according to a type relationship between the node type of the final routing node in the final node set and the node type of the starting routing node in the starting node set, so as to obtain a reference routing path, where the reference routing node and the final routing node belong to at least the same intermediate dimension and reference dimension;
[0212] A third generation module 808, configured to generate a shortest routing path from the reference routing node to the final routing node, so as to obtain a final routing path, where the target routing path includes: the intermediate routing path, the reference routing path, and the final routing path;
[0213] A routing module 810, configured to route from the starting routing node to the final routing node according to the target routing path.
[0214] Through the above steps, the interconnection network is divided into network layers. The nodes in the network layer are constructed in the form of a node set matrix with N rows and P columns. Each node set includes interconnected first network nodes, second network nodes, and third network nodes. The three types of network nodes are respectively connected to adjacent node sets adjacent in three different dimensions. Under the same network scale, the network diameter of this topological structure is much smaller than that of the grid-shaped topological structure, and a routing planning method in the interconnection network is provided. The sequence of routing between each dimension is planned according to the actual situations of the routing start point and the routing end point, so as to avoid detouring. Therefore, the technical problem of large transmission delay in the network caused by the routing method of the interconnection network can be solved, and the technical effect of reducing the transmission delay in the network caused by the routing method of the interconnection network can be achieved.
[0215] As an optional implementation manner, the routing device is further configured to:
[0216] Determine an intermediate dimension of an adjacent node set connected to the starting routing node relative to a starting node set where the starting routing node is located;
[0217] Generate a shortest routing path from the starting routing node to the intermediate routing node in the intermediate dimension, so as to obtain the intermediate routing path.
[0218] As an optional implementation manner, the routing device is further configured to:
[0219] In a case where the starting routing node is a first network node in a starting node set where the starting routing node is located, determine that the intermediate dimension is the row dimension;
[0220] When the starting routing node is the second network node in the starting node set where the starting routing node is located, determine that the intermediate dimension is the column dimension;
[0221] When the starting routing node is the third network node in the starting node set where the starting routing node is located, determine that the intermediate dimension is the layer dimension.
[0222] As an alternative implementation, the routing device is further configured to:
[0223] When the dimension of the starting routing node in the starting node set where it is located in the intermediate dimension is the same as the dimension of the final routing node in the final node set where it is located in the intermediate dimension, determine that the intermediate routing path is empty;
[0224] When the dimension of the starting routing node in the starting node set where it is located in the intermediate dimension is different from the dimension of the final routing node in the final node set where it is located in the intermediate dimension, and the intermediate dimension is the row dimension, generate the shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path, where the intermediate routing node is the first network node in the intermediate node set whose row number is the same as the row number of the final node set where the final routing node is located;
[0225] When the dimension of the starting routing node in the starting node set where it is located in the intermediate dimension is different from the dimension of the final routing node in the final node set where it is located in the intermediate dimension, and the intermediate dimension is the column dimension, generate the shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path, where the intermediate routing node is the second network node in the intermediate node set whose column number is the same as the column number of the final node set where the final routing node is located;
[0226] When the dimension of the starting routing node in the starting node set where it is located in the intermediate dimension is different from the dimension of the final routing node in the final node set where it is located in the intermediate dimension, and the intermediate dimension is the layer dimension, generate the shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path, where the intermediate routing node is the third network node in the intermediate node set whose layer number is the same as the layer number of the final node set where the final routing node is located.
[0227] As an alternative implementation, the routing device is further configured to:
[0228] Detect the type relationship between the node type of the final routing node in the final node set and the node type of the starting routing node in the starting node set;
[0229] When the type relationship is that the node type of the final routing node in the final node set is the same as the node type of the starting routing node in the starting node set, randomly select the reference dimension from the other dimensions of the node set dimension except the intermediate dimension; on the reference dimension, generate the shortest routing path from the intermediate routing node to the reference routing node to obtain the reference routing path;
[0230] When the type relationship is that the node type of the final routing node in the final node set is different from the node type of the starting routing node in the starting node set, determine the dimension corresponding to the node type of the final routing node in the final node set as the reference dimension; on the reference dimension, generate the shortest routing path from the intermediate routing node to the reference routing node to obtain the reference routing path.
[0231] As an optional implementation manner, each node set has a set identifier; the node identifier of each network node includes a set identifier field and a network identifier field, where the set identifier field is used to indicate the set identifier of the node set where each network node is located, and the network identifier field is used to indicate the node set connected by each network node; the set identifier of each node set includes a row identifier, a column identifier, and a layer identifier. The row identifier is used to identify the row where each node set is located in the node set matrix, the column identifier is used to identify the column where each node set is located in the node set matrix, and the layer identifier is used to identify the network layer where each node set is located; the routing device is further configured to:
[0232] Detect whether the network identifier field of the final routing node is equal to the network identifier field of the starting routing node;
[0233] When the network identifier field of the final routing node is equal to the network identifier field of the starting routing node, determine that the type relationship is that the node type of the final routing node in the final node set is the same as the node type of the starting routing node in the starting node set;
[0234] When the network identifier field of the final routing node is not equal to the network identifier field of the starting routing node, determine that the type relationship is that the node type of the final routing node in the final node set is different from the node type of the starting routing node in the starting node set.
[0235] As an alternative implementation, the routing device is further configured to: when the intermediate dimension is the row dimension, randomly select the reference dimension from the column dimension and the layer dimension;
[0236] when the intermediate dimension is the column dimension, randomly select the reference dimension from the row dimension and the layer dimension;
[0237] when the intermediate dimension is the layer dimension, randomly select the reference dimension from the row dimension and the column dimension.
[0238] As an alternative implementation, the routing device is further configured to: when the node type of the final routing node in the final node set is the first network node, determine the reference dimension as the row dimension;
[0239] when the node type of the final routing node in the final node set is the second network node, determine the reference dimension as the column dimension;
[0240] when the node type of the final routing node in the final node set is the third network node, determine the reference dimension as the layer dimension.
[0241] As an alternative implementation, the routing device is further configured to: determine the dimension other than the intermediate dimension and the reference dimension in the dimension of the node set as the final dimension;
[0242] generate the shortest routing path from the reference routing node to the final routing node on the final dimension to obtain the final routing path.
[0243] As an alternative implementation, the routing device is further configured to: when the intermediate dimension is the column dimension and the reference dimension is the layer dimension, or when the intermediate dimension is the layer dimension and the reference dimension is the column dimension, determine the final dimension as the row dimension;
[0244] when the intermediate dimension is the row dimension and the reference dimension is the layer dimension, or when the intermediate dimension is the layer dimension and the reference dimension is the row dimension, determine the final dimension as the column dimension;
[0245] when the intermediate dimension is the row dimension and the reference dimension is the column dimension, or when the intermediate dimension is the column dimension and the reference dimension is the row dimension, determine the final dimension as the layer dimension.
[0246] As an alternative implementation, the routing device is further configured to:
[0247] generate the first segment of the path from the reference routing node to the final node set where the final routing node is located on the final dimension;
[0248] Generate a second path to the final routing node within the set of final nodes, where the final routing path includes the first path and the second path.
[0249] It should be noted that the above-mentioned modules can be implemented by software or hardware. For the latter, it can be implemented 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.
[0250] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is set to execute the steps in any one of the above method embodiments when running.
[0251] 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.
[0252] An embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is set to run the computer program to execute the steps in any one of the above method embodiments.
[0253] In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device, where the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0254] An embodiment of the present application also 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.
[0255] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores 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.
[0256] An embodiment of the present application also provides a computer program. The computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any one of the above method embodiments.
[0257] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be elaborated herein.
[0258] Obviously, those skilled in the art should understand that the above-mentioned 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 sequence different from that here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to be implemented. In this way, the present application is not limited to any specific combination of hardware and software.
[0259] 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 an interconnected network, characterized in that: The interconnected network includes N×P×Q node sets, and the interconnected network is divided into Q network layers, where N, P and Q are all positive integers greater than or equal to 2; each network layer in the Q network layers includes a node set matrix with N rows and P columns as a target network layer, and each target node set in the target network layer is connected to an adjacent node set in the same row and column; the Q network layers are arranged in sequence, and the target node set is connected to a reference node set at the same position in an adjacent network layer, and the adjacent network layer is a network layer in the Q network layers that is adjacent to the target network layer; each node set includes a first network node, a second network node and a third network node that are connected to each other, the first network node is used to connect to an adjacent node set in the same row, the second network node is used to connect to an adjacent node set in the same column, and the third network node is used to connect to the reference node set; the routing method includes: Get the starting routing node and the final routing node; Generate a shortest routing path from the starting routing node to the intermediate routing node on an intermediate dimension of the adjacent node set connected to the starting routing node relative to the starting node set where the starting routing node is located, and obtain an intermediate routing path, wherein the intermediate node set where the intermediate routing node is located and the final node set where the final routing node is located belong to the same intermediate dimension, and the dimensions of the node set include: row dimension, column dimension and layer dimension; Generate a shortest routing path from the intermediate routing node to a reference routing node according to a type relationship between a node type of the final routing node in the final node set and a node type of the start routing node in the start node set, to obtain a reference routing path, wherein the reference routing node and the final routing node belong to at least the same intermediate dimension and reference dimension; Generate the shortest routing path from the reference routing node to the final routing node to obtain a final routing path, wherein the target routing path includes: the intermediate routing path, the reference routing path and the final routing path; and route 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 generating the shortest routing path from the starting routing node to the intermediate routing node on the intermediate dimension of the set of adjacent nodes connected to the starting routing node relative to the set of starting nodes where the starting routing node is located, to obtain the intermediate routing path, comprises: Determine the intermediate dimension of the neighboring node set connected to the starting routing node relative to the starting node set where the starting routing node is located; A shortest routing path from the starting routing node to the intermediate routing node is generated in the intermediate dimension to obtain the intermediate routing path.
3. The method according to claim 2, characterized in that The determining the intermediate dimension of the neighboring node set connected to the starting routing node relative to the starting node set where the starting routing node is located includes: In a case where the starting routing node is the first network node in the starting node set where the starting routing node is located, determining the intermediate dimension to be the row dimension; In a case where the starting routing node is a second network node in the starting node set where the starting routing node is located, determining that the intermediate dimension is the column dimension; In a case where the starting routing node is a third network node in the starting node set where the starting routing node is located, the intermediate dimension is determined to be the layer dimension.
4. The method according to claim 3, characterized in that Generating the shortest routing path from the starting routing node to the intermediate routing node on the intermediate dimension to obtain the intermediate routing path includes: In a case where the dimension of the starting routing node in the starting node set on the intermediate dimension is the same as the dimension of the final routing node in the final node set on the intermediate dimension, determining that the intermediate routing path is empty; In a case where the dimension of the starting routing node in the starting node set on the intermediate dimension is different from the dimension of the final routing node in the final node set, and the intermediate dimension is the row dimension, generating a shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path, wherein the intermediate routing node is the first network node in the intermediate node set where the number of rows is the same as the number of rows of the final node set where the final routing node is located; In a case where the dimension of the starting routing node in the starting node set on the intermediate dimension is different from the dimension of the final routing node in the final node set, and the intermediate dimension is the column dimension, generating a shortest routing path from the starting routing node to the intermediate routing node to obtain the intermediate routing path, wherein the intermediate routing node is a second network node in the intermediate node set having the same number of columns as the number of columns of the final node set where the final routing node is located; In the case where the dimension of the starting routing node in the intermediate dimension in the starting node set is different from the dimension of the final routing node in the final node set, and the intermediate dimension is the layer dimension, a shortest routing path from the starting routing node to the intermediate routing node is generated to obtain the intermediate routing path, wherein the intermediate routing node is a third network node in the intermediate node set having the same layer number as the final node set where the final routing node is located.
5. The method according to claim 1, characterized in that The step of generating the shortest routing path from the intermediate routing node to the reference routing node according to the type relationship between the node type of the final routing node in the final node set and the node type of the starting routing node in the starting node set to obtain the reference routing path comprises: Detecting a type relationship between a node type of the final routing node in the final node set and a node type of the starting routing node in the starting node set; In the case where the type relationship is that the node type of the final routing node in the final node set is the same as the node type of the starting routing node in the starting node set, randomly selecting the reference dimension from the dimensions of the node set except the intermediate dimension; generating the shortest routing path from the intermediate routing node to the reference routing node on the reference dimension to obtain the reference routing path; In the case where the type relationship is that the node type of the final routing node in the final node set is different from the node type of the starting routing node in the starting node set, the dimension corresponding to the node type of the final routing node in the final node set is determined as the reference dimension; on the reference dimension, the shortest routing path from the intermediate routing node to the reference routing node is generated to obtain the reference routing path.
6. The method according to claim 5, characterized in that Each node set has a set identifier; the node identifier of each network node includes a set identifier field and a network identifier field, wherein the set identifier field is used to indicate the set identifier of the node set to which each network node is located, and the network identifier field is used to indicate the node set to which each network node is connected; the set identifier of each node set includes a row identifier, a column identifier and a layer identifier, the row identifier is used to identify the row where each node set is located in the node set matrix, the column identifier is used to identify the column where each node set is located in the node set matrix, and the layer identifier is used to identify the network layer where each node set is located; The detecting a type relationship between a node type of the final routing node in the final node set and a node type of the starting routing node in the starting node set includes: Detecting whether the network identification field of the final routing node is equal to the network identification field of the starting routing node; In a case where the network identification field of the final routing node is equal to the network identification field of the starting routing node, determining that the type relationship is that the node type of the final routing node in the final node set is the same as the node type of the starting routing node in the starting node set; When the network identification field of the final routing node is not equal to the network identification field of the starting routing node, the type relationship is determined as a node type of the final routing node in the final node set is different from a node type of the starting routing node in the starting node set.
7. The method according to claim 6, characterized in that The randomly selecting the reference dimension from dimensions of the node set except the middle dimension comprises: In the case where the intermediate dimension is a row dimension, randomly selecting the reference dimension from the column dimension and the layer dimension; In the case where the intermediate dimension is a column dimension, randomly selecting the reference dimension from the row dimension and the layer dimension; In case the intermediate dimension is a layer dimension, the reference dimension is randomly selected from the row dimension and the column dimension.
8. The method according to claim 6, characterized in that The step of determining the dimension corresponding to the node type of the final routing node in the final node set as the reference dimension includes: In a case where the node type of the final routing node in the final node set is a first network node, determining that the reference dimension is a row dimension; In a case where the node type of the final routing node in the final node set is a second network node, determining that the reference dimension is a column dimension; In a case where the node type of the final routing node in the final node set is a third network node, the reference dimension is determined to be a layer dimension.
9. The method according to claim 1, characterized in that: The generating the shortest routing path from the reference routing node to the final routing node to obtain the final routing path includes: Determine the dimensions of the node set other than the intermediate dimension and the reference dimension as final dimensions; A shortest routing path from the reference routing node to the final routing node is generated in the final dimension to obtain a final routing path.
10. The method according to claim 9, characterized in that The step of determining dimensions of the node set other than the intermediate dimension and the reference dimension as final dimensions includes: In a case where the intermediate dimension is a column dimension and the reference dimension is a layer dimension, or in a case where the intermediate dimension is a layer dimension and the reference dimension is a column dimension, determining that the final dimension is a row dimension; In a case where the intermediate dimension is a row dimension and the reference dimension is a layer dimension, or in a case where the intermediate dimension is a layer dimension and the reference dimension is a row dimension, determining that the final dimension is a column dimension; When the intermediate dimension is a row dimension and the reference dimension is a column dimension, or when the intermediate dimension is a column dimension and the reference dimension is a row dimension, the final dimension is determined to be a layer dimension.
11. The method according to claim 10, characterized in that Generating the shortest routing path from the reference routing node to the final routing node on the final dimension to obtain a final routing path includes: Generating a first segment path from the reference routing node to a final node set where the final routing node is located in the final dimension; A second segment path to the final routing node is generated within the final node set, wherein the final routing path includes the first segment path and the second segment path.
12. A routing device for interconnecting networks, characterized in that: The interconnected network includes N×P×Q node sets, and the interconnected network is divided into Q network layers, where N, P and Q are all positive integers greater than or equal to 2; each network layer in the Q network layers includes a node set matrix with N rows and P columns as a target network layer, and each target node set in the target network layer is connected to an adjacent node set in the same row and column; the Q network layers are arranged in sequence, and the target node set is connected to a reference node set at the same position in an adjacent network layer, and the adjacent network layer is a network layer in the Q network layers that is adjacent to the target network layer; each node set includes a first network node, a second network node and a third network node that are connected to each other, the first network node is used to connect to an adjacent node set in the same row, the second network node is used to connect to an adjacent node set in the same column, and the third network node is used to connect to the reference node set, and the routing device includes: An acquisition module, used to acquire a starting routing node and a final routing node; A first generating module is configured to generate a shortest routing path from the starting routing node to the intermediate routing node on an intermediate dimension of the adjacent node set connected to the starting routing node relative to the starting node set where the starting routing node is located, to obtain an intermediate routing path, wherein the intermediate node set where the intermediate routing node is located and the final node set where the final routing node is located belong to the same intermediate dimension, and the dimensions of the node set include: a row dimension, a column dimension, and a layer dimension; a second generating module is configured to generate a shortest routing path from the intermediate routing node to the reference routing node according to a type relationship between a node type of the final routing node in the final node set and a node type of the starting routing node in the starting node set, to obtain a reference routing path, wherein the reference routing node and the final routing node belong to at least the same intermediate dimension and reference dimension; A third generating module is used to generate the shortest routing path from the reference routing node to the final routing node to obtain a final routing path, wherein the target routing path includes: the intermediate routing path, the reference routing path and the final 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.
13. 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 11 when executed by a processor.
14. 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 11 are implemented.
15. 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 11 are implemented.