Method, device, electronic device and storage medium for determining routing path
By generating routing paths between nodes and within nodes, the problem of the frequent protocol conversions in traditional routing path generation methods is solved, and efficient routing forwarding is achieved.
Patent Information
- Application Number
- CN202410471012.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-04-18
AI Technical Summary
The traditional routing path generation method only considers the routing paths between switches, resulting in multiple protocol conversions required during data transmission, which consumes a lot of communication time and is low routing forwarding efficiency.
By obtaining the source port of the routing path to be determined, its source node and destination port and its destination node, an inter-node routing path is generated, and the in-node routing path of each routing node is generated based on the input and output ports and in-node network structure of each routing node in the inter-node routing path, the in-node routing path of each routing node is generated, thereby obtaining the target routing path between the source port and the destination port.
It realizes collaborative routing inside and outside the node, improves routing and forwarding efficiency, reduces the number of protocol conversions, and improves the speed and efficiency of data transmission.
Smart Images

Figure CN118200227B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of routing technology, and in particular to a method, device, electronic device and storage medium for determining a routing path. Background Art
[0002] With the development of transistor integration and memory technology and the growing demand for computing performance, the scale of computing nodes in interconnected networks continues to increase. The performance of interconnected networks is closely related to the construction method of network topology, static factors such as routing switches, and dynamic factors such as routing algorithms.
[0003] The traditional dragonfly network structure usually includes server nodes (e.g., physical servers) and network interconnection devices, such as switches. When data is transmitted from a computing unit of a server node to a computing unit (e.g., CPU) of another server node, it is usually necessary to transmit data between different computing units in the server node through an intra-server protocol, and transmit data between the server node and the network switch or between different switches through a network protocol. The intra-server protocol and the network protocol are different.
[0004] When generating routing paths in the traditional way, usually only the routing paths between switches are considered. However, since the data packet formats between different protocols are different, multiple protocol conversions are usually required during data transmission, which consumes a lot of communication time and has low routing forwarding efficiency. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for determining a routing path, so as to achieve collaborative routing inside and outside the node when determining the routing path, thereby improving the routing forwarding efficiency.
[0006] On the one hand, an embodiment of the present application provides a method for determining a routing path, including:
[0007] The source port of the routing path to be determined and the source node to which it belongs, as well as the destination port and the destination node to which it belongs, are obtained; the source node and the destination node are both routing nodes in the Dragonfly network; the communication between the routing nodes in the Dragonfly network and the communication within each routing node adopt the same protocol;
[0008] According to the dragonfly network structure, the source node and the destination node, an inter-node routing path between the source node and the destination node is generated; the inter-node routing path is a routing path composed of multiple routing nodes;
[0009] According to the dragonfly network structure, the source port and its source node, as well as the destination port and its destination node, the input and output ports corresponding to each routing node in the inter-node routing path are determined;
[0010] Generate an intra-node routing path for each routing node according to the input and output ports and the intra-node network structure corresponding to each routing node in the inter-node routing path; the intra-node routing path is the routing path between the input port and the output port in the routing node;
[0011] According to the routing paths between nodes and the routing paths within each node, a target routing path between a source port and a destination port is obtained.
[0012] In one implementation, generating an inter-node routing path between the source node and the destination node according to the dragonfly network structure, the source node and the destination node includes:
[0013] Determine whether the source node and the destination node are in the same group. If so, generate an inter-node routing path including the source node and the destination node. Each routing node in the Dragonfly network is divided into multiple groups.
[0014] Otherwise, the inter-node routing path is determined according to the groups corresponding to the source node and the destination node respectively.
[0015] In one implementation, determining a routing path between nodes according to the groups corresponding to the source node and the destination node respectively includes:
[0016] Determine a first group to which the source node belongs and a second group to which the destination node belongs;
[0017] Determine a starting node and an ending node for communication between the first group and the second group; the starting node is a routing node in the first group; the ending node is a routing node in the second group;
[0018] Generate a routing path between nodes based on the source node, destination node, start node and end node.
[0019] In one implementation, generating a routing path between nodes according to a source node, a destination node, a start node, and an end node includes:
[0020] Generate an inter-group routing path including a start node and an end node;
[0021] If the source node is the same as the start node and the destination node is the same as the end node, the inter-group routing path is determined as the inter-node routing path;
[0022] If the source node is different from the start node and the destination node is different from the end node, a first intra-group routing path including the source node and the start node and a second intra-group routing path including the destination node and the end node are generated, and the first intra-group routing path, the inter-group routing path and the second intra-group routing path are combined to obtain an inter-node routing path;
[0023] If the source node is different from the start node and the destination node is the same as the end node, then the first intra-group routing path is combined with the inter-group routing path to obtain an inter-node routing path;
[0024] If the source node is the same as the start node and the destination node is different from the end node, the second intra-group routing path and the inter-group routing path are combined to obtain an inter-node routing path.
[0025] In one implementation, after obtaining a target routing path between a source port and a destination port according to the routing path between nodes and the routing path within each node, the method further includes:
[0026] Obtain a new routing path to be determined;
[0027] If the source port and the destination port in the new routing path to be determined are respectively the destination port and the source port in the routing path to be determined, then a new target routing path opposite to the target routing path transmission direction is generated according to the target routing path.
[0028] In one implementation, after obtaining a target routing path between a source port and a destination port according to the routing path between nodes and the routing path within each node, the method further includes:
[0029] Get the target routing path between every two ports in the Dragonfly network respectively;
[0030] According to each target routing path, a routing table corresponding to each routing node is generated.
[0031] In one implementation, after generating the routing tables corresponding to the routing nodes respectively, the method further includes:
[0032] Each routing table is deployed to a corresponding routing node, so that each routing node queries a corresponding routing table according to a source port and a destination port of the data to be transmitted and forwards the data to be transmitted according to the obtained routing query result.
[0033] On the one hand, an embodiment of the present application provides a device for determining a routing path, including:
[0034] An acquisition unit, used to acquire a source port of a routing path to be determined and a source node to which it belongs, and a destination port and a destination node to which it belongs; the source node and the destination node are both routing nodes in the dragonfly network; the communication between routing nodes in the dragonfly network and the communication within each routing node adopt the same protocol;
[0035] A first generating unit is used to generate an inter-node routing path between the source node and the destination node according to the dragonfly network structure, the source node and the destination node; the inter-node routing path is a routing path composed of multiple routing nodes;
[0036] A determination unit, used to determine the input and output ports corresponding to each routing node in the inter-node routing path according to the dragonfly network structure, the source port and the source node to which it belongs, and the destination port and the destination node to which it belongs;
[0037] The second generating unit is used to generate an intra-node routing path of each routing node according to the input and output ports and the intra-node network structure corresponding to each routing node in the inter-node routing path; the intra-node routing path is a routing path between an input port and an output port in a routing node;
[0038] The obtaining unit is used to obtain a target routing path between a source port and a destination port according to the routing path between nodes and the routing path within each node.
[0039] In one implementation, the first generating unit is used to:
[0040] Determine whether the source node and the destination node are in the same group. If so, generate an inter-node routing path including the source node and the destination node. Each routing node in the Dragonfly network is divided into multiple groups.
[0041] Otherwise, the inter-node routing path is determined according to the groups corresponding to the source node and the destination node respectively.
[0042] In one implementation, the first generation unit is used to: determine a first group to which the source node belongs and a second group to which the destination node belongs;
[0043] Determine a starting node and an ending node for communication between the first group and the second group; the starting node is a routing node in the first group; the ending node is a routing node in the second group;
[0044] Generate a routing path between nodes based on the source node, destination node, start node and end node.
[0045] In one implementation, the first generating unit is used to:
[0046] Generate an inter-group routing path including a start node and an end node;
[0047] If the source node is the same as the start node and the destination node is the same as the end node, the inter-group routing path is determined as the inter-node routing path;
[0048] If the source node is different from the start node and the destination node is different from the end node, a first intra-group routing path including the source node and the start node and a second intra-group routing path including the destination node and the end node are generated, and the first intra-group routing path, the inter-group routing path and the second intra-group routing path are combined to obtain an inter-node routing path;
[0049] If the source node is different from the start node and the destination node is the same as the end node, then the first intra-group routing path is combined with the inter-group routing path to obtain an inter-node routing path;
[0050] If the source node is the same as the start node and the destination node is different from the end node, the second intra-group routing path and the inter-group routing path are combined to obtain an inter-node routing path.
[0051] In one implementation, the obtaining unit is further configured to:
[0052] Obtain a new routing path to be determined;
[0053] If the source port and the destination port in the new routing path to be determined are respectively the destination port and the source port in the routing path to be determined, then a new target routing path opposite to the target routing path transmission direction is generated according to the target routing path.
[0054] In one implementation, the obtaining unit is further configured to:
[0055] Get the target routing path between every two ports in the Dragonfly network respectively;
[0056] According to each target routing path, a routing table corresponding to each routing node is generated.
[0057] In one implementation, the obtaining unit is further configured to:
[0058] Each routing table is deployed to a corresponding routing node, so that each routing node queries a corresponding routing table according to a source port and a destination port of the data to be transmitted, and forwards the data to be transmitted according to the obtained routing query result.
[0059] On the one hand, an embodiment of the present application provides an electronic device, including:
[0060] Processor; and
[0061] A memory stores computer instructions, wherein the computer instructions are used to enable a processor to execute steps of a method provided in any of the above-mentioned various optional implementations of determining a routing path.
[0062] On the one hand, an embodiment of the present application provides a storage medium storing computer instructions, which are used to enable a computer to execute the steps of the method provided in any of the various optional implementations of determining a routing path as described above.
[0063] The method for determining the routing path in the embodiment of the present application includes obtaining the source port of the routing path to be determined and the source node to which it belongs and the destination port and the destination node to which it belongs; the source node and the destination node are both routing nodes in the dragonfly network; the communication between each routing node in the dragonfly network and the communication within each routing node all adopt the same protocol; according to the dragonfly network structure, the source node and the destination node, the node-to-node routing path between the source node and the destination node is generated; the node-to-node routing path is a routing path composed of multiple routing nodes; according to the dragonfly network structure, the source port and the source node to which it belongs and the destination port and the destination node to which it belongs, the input and output ports corresponding to each routing node in the node-to-node routing path are determined; according to the input and output ports corresponding to each routing node in the node-to-node routing path and the network structure within the node, the node-to-node routing path of each routing node is generated respectively; the node-to-node routing path is the routing path between the input port and the output port in the routing node; according to the node-to-node routing path and the routing path within each node, the target routing path between the source port and the destination port is obtained. In this way, the communication between each routing node and the communication within each routing node are carried out through the same protocol, and the collaborative routing inside and outside the node is realized, thereby improving the efficiency of routing forwarding. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0065] Figure 1 It is a flow chart of a method for determining a routing path in an embodiment of the present application.
[0066] Figure 2 It is a structural diagram of a dragonfly network in an embodiment of the present application.
[0067] Figure 3 It is a structural schematic diagram of a group in an embodiment of the present application.
[0068] Figure 4 It is a flow chart of a method for generating a routing table in an embodiment of the present application.
[0069] Figure 5 It is a detailed flowchart of determining a routing path in an embodiment of the present application.
[0070] Figure 6 It is a structural block diagram of a device for determining a routing path in an embodiment of the present application.
[0071] Figure 7 It is a structural schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0072] The technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described implementation methods are part of the implementation methods of the present application, rather than all of the implementation methods. Based on the implementation methods in the present application, all other implementation methods obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In addition, the technical features involved in the different implementation methods of the present application described below can be combined with each other as long as they do not conflict with each other.
[0073] First, some terms involved in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0074] Terminal device: can be a mobile terminal, a fixed terminal or a portable terminal, such as a mobile phone, a station, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system device, a personal navigation device, a personal digital assistant, an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a gaming device or any combination thereof, including accessories and peripherals of these devices or any combination thereof. It is also foreseeable that the terminal device can support any type of interface for the user (such as a wearable device), etc.
[0075] Server: It can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms.
[0076] The technical idea of this application is explained below.
[0077] Under traditional technology, the routing path between devices is usually determined only based on the source device and destination device of the data, and data is transmitted between devices according to the routing path. In the process of routing forwarding, after receiving the data, each routing forwarding device forwards it to other devices after transmitting it through its own routing within the device.
[0078] However, the routing path within each device is usually determined by each device, and the communication protocol within the device is usually different from the communication protocol between devices. Therefore, the routing path between devices and the routing path within the device are usually not coordinated, which may result in low efficiency of routing forwarding.
[0079] Based on the defects of the above-mentioned related technologies, a method, device, electronic device and storage medium for determining a routing path are provided in the embodiments of the present application, aiming to achieve collaborative routing inside and outside the node when determining the routing path, thereby improving the routing forwarding efficiency.
[0080] A method for determining a routing path is provided in an embodiment of the present application. The method can be applied to electronic devices. The present application does not limit the type of electronic device. It can be any type of device suitable for implementation, such as a terminal device and a server, etc. The present application will not go into details about this.
[0081] See also Figure 1 FIG. 1 is a flowchart of a method for determining a routing path in an embodiment of the present application. Figure 1 The method is described below. The specific implementation process of the method is as follows:
[0082] Step 100: Obtain the source port of the routing path to be determined and its source node, as well as the destination port and its destination node; the source node and the destination node are both routing nodes in the dragonfly network; the communication between routing nodes in the dragonfly network and the communication within each routing node all use the same protocol.
[0083] Among them, the Dragonfly Network can serve large supercomputing clusters. A cluster refers to a loosely coupled multi-processor system composed of a group of independent computer systems. They realize inter-process communication through the network. In layman's terms, it allows several computers to work together.
[0084] The Dragonfly network includes multiple routing nodes, which can also be called boards. Routing nodes can be any type of electronic device. Each routing node also includes multiple ports, each of which is the same or different functional module, such as a computing unit and a communication unit. Each routing node is divided into multiple groups.
[0085] The source port can be a communication unit or other units, such as a computing unit. The data to be transmitted can be received by the source port from other devices or generated by the source port. Similarly, the destination port can be a communication unit or other units.
[0086] In the embodiment of the present application, a plurality of ports with communication functions are provided in each routing node. The ports with communication functions are used as heterogeneous high-speed interconnection communication interfaces to provide mutual communication between routing nodes. Among them, the heterogeneous high-speed interconnection communication interface is an interface constructed based on a high-speed communication protocol using optical fiber as the communication medium. The communication protocols between routing nodes in the Dragonfly network and the communication protocols within each routing node are all high-speed communication protocols.
[0087] Each routing node has its own network structure, i.e., the intra-node network structure. The intra-node network structure can be a mesh network, and all ports are distributed in the mesh network to ensure that data can be communicated between ports. Among them, the mesh network structure is a network topology structure, and the devices in the mesh network communicate with each other through multiple connection paths to form a mesh structure. This architecture provides some advantages, especially in terms of reliability, flexibility and coverage.
[0088] Combine the following Figure 2 For a description of the topology of the Dragonfly network, see Figure 2 The figure shows a schematic diagram of the structure of a dragonfly network. Figure 2 In the , the Dragonfly network contains 32 boards, each of which contains 5 ports with communication functions. The 32 boards are divided into eight groups, that is, eight groups, each of which contains four boards. Each board is directly connected to the other three boards in the corresponding group by one and only one duplex optical fiber channel, and at the same time, each group is directly connected to each other group by one and only one duplex optical fiber channel.
[0089] It should be noted that Figure 2 It is mainly used to illustrate the connection relationship between each routing node. Figure 2 The internal structure of each group in can be referred to Figure 3 , Figure 3 is a schematic diagram of the structure of a group, so Figure 2 If there are unclear words in the instructions, it will not affect the clarity of the instructions.
[0090] In this way, there is no need to use traditional switch aggregation and distribution methods for data communication. The Dragonfly network can meet the needs of high efficiency and low cost of communication between routing nodes.
[0091] Step 101: Generate an inter-node routing path between the source node and the destination node according to the dragonfly network structure, the source node and the destination node; the inter-node routing path is a routing path composed of multiple routing nodes.
[0092] In one implementation, when executing step 101, the following steps may be used:
[0093] S1011: Determine whether the source node and the destination node are in the same group. If so, execute S1012; otherwise, execute S1013.
[0094] Among them, each routing node in the Dragonfly network is divided into multiple groups.
[0095] S1012: Generate an inter-node routing path including a source node and a destination node.
[0096] That is, if the two are in the same group, they can be directly interconnected through a duplex optical path between them. In one implementation, an inter-node routing path containing only the source node and the destination node is obtained.
[0097] For example, Figure 2 In the example, if the source node is B00 and the destination node is B01, and they are in the same group, then the inter-node routing path containing only B00 and B01 can be obtained.
[0098] Combine the following Figure 3 , describes the routing policy within the group. Figure 3 In the same group, each routing node is directly connected to every other routing node by only one duplex optical fiber path. Therefore, the optical fiber path between two routing nodes can be directly used to generate only one-level routing, that is, directly calculating the route from the source node to the destination node.
[0099] S1013: Determine a routing path between nodes according to the groups corresponding to the source node and the destination node respectively.
[0100] In one implementation, the source node and the destination node are located in different groups and are interconnected via duplex optical fiber paths between the groups.
[0101] In one implementation, when executing S1013, the following steps may be adopted:
[0102] S1013 - 1 : Determine the first group to which the source node belongs and the second group to which the destination node belongs.
[0103] For example, Figure 2 In the example, the source node is B00, which is located in the first group, and the destination node is B20, which is located in the second group.
[0104] S1013-2: Determine the starting node and the ending node of the communication between the first group and the second group.
[0105] The starting node is a routing node in the first group; the ending node is a routing node in the second group.
[0106] For example, Figure 2In the figure, the source node is B00, which is located in the first group, the destination node is B20, which is located in the second group, and B01 of the first group is connected to B22 of the second group, such as through an optical fiber path, to build a corresponding connection channel, which can also be called a bridge. The starting node of the bridge is B01, and the ending node is B22.
[0107] S1013-3: Generate an inter-node routing path according to the source node, the destination node, the start node, and the end node.
[0108] Since the same routing nodes may exist in the source node, the destination node, the start node and the end node, the same routing nodes are deduplicated and the connection relationship between different routing nodes, that is, the routing path between nodes, is determined.
[0109] In one implementation, when executing S1013-3, the following steps may be adopted:
[0110] S1013-31: Generate an inter-group routing path including a start node and an end node.
[0111] The inter-group routing path is a connection path between different groups. In one implementation, an inter-group routing path including only a start node and an end node is obtained.
[0112] For example, Figure 2 In the example, an inter-group routing path including the starting node B01 and the terminating node B22 is generated.
[0113] In this way, routing information between different groups can be determined.
[0114] S1013-32: Determine an inter-node routing path based on the inter-group routing path.
[0115] In one implementation, when executing S1013-32, any of the following methods may be used:
[0116] Method 1: If the source node is the same as the start node and the destination node is the same as the end node, the inter-group routing path is determined as the inter-node routing path.
[0117] Method 2: If the source node is different from the start node and the destination node is different from the end node, a first intra-group routing path including the source node and the start node and a second intra-group routing path including the destination node and the end node are generated, and the first intra-group routing path, the inter-group routing path and the second intra-group routing path are combined to obtain an inter-node routing path.
[0118] The intra-group routing path is a connection path between different routing nodes in the same group.
[0119] For example, Figure 2 In the example, the source node is B00 and the start node is B01, then the first intra-group routing path containing only B00 and B01 can be generated. The end node is B22 and the destination node is B20, then the intra-group routing path containing only B22 and B20 can be generated.
[0120] In this way, the routing information between two different routing nodes within the group can be determined.
[0121] Method 3: If the source node is different from the start node and the destination node is the same as the end node, the first intra-group routing path is combined with the inter-group routing path to obtain the inter-node routing path;
[0122] Method 4: If the source node is the same as the start node and the destination node is different from the end node, the second intra-group routing path and the inter-group routing path are combined to obtain an inter-node routing path.
[0123] In one implementation, the inter-node routing path, the intra-group routing path, and the inter-group routing path are all composed of multiple routing nodes.
[0124] In this way, routing information between different groups and / or routing information between different nodes in the same group can be obtained, and further routing information between a source node and a destination node can be obtained.
[0125] Step 102: According to the dragonfly network structure, the source port and its source node, and the destination port and its destination node, the input and output ports corresponding to each routing node in the inter-node routing path are determined.
[0126] Specifically, through the dragonfly network structure and the transmission direction of the routing path between nodes, each input port and output port in the routing path between nodes can be determined in combination with the source port and the destination port. The input and output ports include input ports and output ports.
[0127] It should be noted that the source port and the destination port are directly obtained, and other input and output ports (ie, input ports and output ports) in the inter-node routing path can be obtained according to the dragonfly network structure and the transmission direction of the inter-node routing path.
[0128] For example, Figure 2 In the example, since the data source to be transmitted comes from T4 of B00 and the data transmission destination is T4 of B20, the source node is B00, the source port is T4 of B00, the starting node is B01, the ending node is B22, the destination node is B20, and the destination port is T4 of B20. Figure 2 The five ports in the TP-Link are used as heterogeneous high-speed interconnection communication interfaces. T0, T1, and T2 are used for node communication within the group. T3 and T4 are used for node communication between different groups.
[0129] Combination Figure 2 From the dragonfly network structure, we can see that the output port of B00 is T1, the input port and output port of B01 are T2 and T3 respectively, the input port and output port of B22 are T3 and T0 respectively, and the input port of B20 is T0.
[0130] In this way, the input and output ports corresponding to each routing node in the inter-node routing path can be determined.
[0131] Step 103: Generate an intra-node routing path for each routing node according to the input and output ports corresponding to each routing node in the inter-node routing path and the intra-node network structure; the intra-node routing path is a routing path between an input port and an output port in a routing node.
[0132] The network structure within the node may be a Mesh network or other network structures.
[0133] In this way, the routing path within the node can be determined based on the input port and output port of each node.
[0134] Step 104: Obtain a target routing path between a source port and a destination port according to the routing paths between nodes and the routing paths within each node.
[0135] In this way, the paths and input and output ports between nodes can be determined, and the paths within each routing node can be determined based on the input and output ports of each node, thereby obtaining the overall target routing path, achieving collaborative routing inside and outside the node, and thus improving the efficiency of routing forwarding.
[0136] Furthermore, after determining the target routing path for forwarding data between two ports in the first transmission direction, a new target routing path for forwarding data between the two ports in the second transmission direction can be quickly generated based on the target routing path, wherein the first transmission direction and the second transmission direction are opposite directions.
[0137] That is, after determining a target routing path corresponding to a set of source ports and destination ports, a new target routing path corresponding to the source ports and destination ports after the roles are reversed can be quickly generated.
[0138] In one implementation, a new routing path to be determined is obtained; if the source port and destination port in the new routing path to be determined are respectively the destination port and source port in the routing path to be determined, a new target routing path is generated according to the target routing path in the opposite direction of the target routing path.
[0139] Among them, between the new target routing path and the target routing path, the source node and the destination node are swapped with each other, the input port and the output port of each node are also swapped with each other, and the transmission direction is opposite.
[0140] For example, Figure 2 In the example, after determining the target routing path between the T0 port of the source node B00 and the T4 port of the destination node B01, the target routing path between the T4 port of the source node B01 and the T0 port of the destination node B00 can be quickly generated according to the target routing path. Specifically, the order of each routing node in the target routing path is reversed, and the input port and the output port of each routing node are swapped with each other, so that a new target routing path can be obtained.
[0141] In this way, the efficiency of generating the routing path is improved, and thus the efficiency of generating the routing table can be improved.
[0142] In the embodiment of the present application, only the determination of the target routing path between a source port and a destination port is used as an example for explanation. The same principle can also be used to determine the target routing path between each port of each routing node in the dragonfly network, and then generate a routing table for each routing node.
[0143] Combine the following Figure 4 , the generation of the routing table is explained. Figure 4 The present invention is a flowchart of a method for generating a routing table.
[0144] Step 400: Obtain the dragonfly network structure information of the target routing system.
[0145] In one implementation, a routing table generation instruction for a target routing system is received, and a cluster interconnection table included in the routing table generation instruction is obtained, wherein the cluster interconnection table includes dragonfly network structure information of the target routing system, that is, structural information of the dragonfly network structure. The target routing system is deployed according to the dragonfly network connection.
[0146] For example, the target routing system is a large supercomputing cluster, see Figure 2 It can be seen that the Dragonfly network structure information may include: each routing node and its corresponding node number, the ports contained in each routing node and its corresponding port number, and the communication relationship between each routing node and port.
[0147] Step 401: According to the dragonfly network structure information, the target routing path between every two ports in the dragonfly network is obtained respectively.
[0148] The specific steps of step 401 refer to the above steps 100 to 104 and will not be described in detail here.
[0149] Step 402: Generate routing tables corresponding to each routing node according to each target routing path.
[0150] In one implementation, for each routing node, a routing table of the routing node is generated including all target routing paths of the routing node.
[0151] In one implementation, for each routing node in the dragonfly network, the following steps are performed:
[0152] The target routing paths between each port of the routing node and each port of each other routing node are obtained respectively, and the routing table of the routing node is generated according to each target routing path corresponding to the routing node.
[0153] In this way, by configuring the dragonfly network structure information of the target routing system, a set of routing tables corresponding to the system, that is, the routing tables corresponding to each routing node, can be automatically generated.
[0154] Furthermore, after determining the routing table of the routing node, the routing table can also be configured in the corresponding routing node. Specifically, each routing table is deployed in the corresponding routing node, so that each routing node queries the corresponding routing table according to the source port and the destination port of the data to be transmitted and forwards the data to be transmitted according to the obtained routing query result. For example, each routing table is configured in the random access memory (RAM) of the corresponding routing node.
[0155] Furthermore, after configuring the routing table for each routing node in the Dragonfly network, a data packet carrying source information and destination information can query the corresponding target routing path through the routing table in any routing node, and transmit the data packet to the destination (ie, the destination port) through the target routing path.
[0156] In this way, when data is routed and forwarded, the forwarded routing path can be quickly queried through the routing table. The routing forwarding efficiency is high, and the internal and external coordination of the nodes is taken into consideration. The network length of the routing path is short, which can improve communication efficiency and reduce communication costs.
[0157] Combine the following Figure 5 , the method of determining the routing path is further described in detail, Figure 5 A detailed flow chart for determining a routing path.
[0158] Step 500: Determine whether the source node and the destination node are in the same group. If so, execute step 506; otherwise, execute step 501.
[0159] Step 501: Determine an inter-group routing path according to the groups to which the source node and the destination node correspond respectively.
[0160] Step 502: Determine whether the source node is the same as the starting node of the inter-group routing path. If so, execute step 504; otherwise, execute step 503.
[0161] Step 503: Generate a first intra-group routing path including a source node and a start node.
[0162] Step 504 determines whether the destination node is the same as the end node. If so, execute step 506; otherwise, execute step 505.
[0163] Step 505: Generate a second intra-group routing path including the destination node and the termination node.
[0164] Step 506: Generate an inter-node routing path between the source node and the destination node.
[0165] Step 507: According to the dragonfly network structure, the source port and its source node, and the destination port and its destination node, the input and output ports corresponding to each routing node in the inter-node routing path are determined.
[0166] Step 508: Generate an intra-node routing path for each routing node according to the input and output ports and the intra-node network structure corresponding to each routing node in the inter-node routing path.
[0167] Step 509: Obtain a target routing path between a source port and a destination port according to the routing paths between nodes and the routing paths within each node.
[0168] Specifically, when executing step 500 to step 509, please refer to the above-mentioned step 100 to step 104 for details, which will not be repeated here.
[0169] In one application scenario, it is applied to any routing node in the Dragonfly network. The routing node generates a target routing path according to the source port of the data to be transmitted and the source node to which it belongs, as well as the destination port and the destination node to which it belongs, and forwards the data according to the target routing path.
[0170] In this way, a more optimal routing path can be generated in real time for the data to be transmitted, and rapid routing forwarding of the data can be achieved.
[0171] In one application scenario, it is applied to any routing node in the Dragonfly network. The routing node queries the routing table according to the source port of the data to be transmitted and the source node to which it belongs, as well as the destination port and the destination node to which it belongs, obtains the queried target routing path, and forwards the data according to the target routing path.
[0172] In this way, the routing path can be quickly queried through the routing table, improving the routing forwarding efficiency.
[0173] Furthermore, if it is determined that there is an abnormality in the target routing path (such as disconnection, data blocking, etc.), a new target routing path is generated based on the source port of the data to be transmitted and its source node, as well as the destination port and its destination node, and the data is forwarded according to the new target routing path.
[0174] In this way, when an abnormality occurs, the routing path can be updated in real time, ensuring the rapid routing and forwarding of data.
[0175] Based on the same inventive concept, an apparatus for determining a routing path is also provided in the embodiment of the present application. Since the principle of solving the problem by the above apparatus and device is similar to that of a method for determining a routing path, the implementation of the above apparatus can refer to the implementation of the method, and the repeated parts will not be repeated. The apparatus can be applied to electronic devices. The present application does not limit the type of electronic devices. It can be any type of device suitable for implementation, such as terminal devices and servers, etc., and the present application will not repeat them.
[0176] See also Figure 6 , which is a structural block diagram of a device for determining a routing path in an embodiment of the present application. In some implementations, the device for determining a routing path in the example of the present application includes:
[0177] The acquisition unit 601 is used to acquire the source port of the routing path to be determined and the source node to which it belongs, and the destination port and the destination node to which it belongs; the source node and the destination node are both routing nodes in the dragonfly network; the communication between the routing nodes in the dragonfly network and the communication within each routing node adopt the same protocol;
[0178] The first generating unit 602 is used to generate an inter-node routing path between the source node and the destination node according to the dragonfly network structure, the source node and the destination node; the inter-node routing path is a routing path composed of multiple routing nodes;
[0179] A determination unit 603 is used to determine the input and output ports corresponding to each routing node in the inter-node routing path according to the dragonfly network structure, the source port and the source node to which it belongs, and the destination port and the destination node to which it belongs;
[0180] The second generating unit 604 is used to generate an intra-node routing path for each routing node according to the input and output ports and the intra-node network structure corresponding to each routing node in the inter-node routing path; the intra-node routing path is a routing path between an input port and an output port in a routing node;
[0181] The obtaining unit 605 is used to obtain a target routing path between a source port and a destination port according to the routing paths between nodes and the routing paths within each node.
[0182] In one implementation, the first generating unit 602 is used to:
[0183] Determine whether the source node and the destination node are in the same group. If so, generate an inter-node routing path including the source node and the destination node. Each routing node in the Dragonfly network is divided into multiple groups.
[0184] Otherwise, the inter-node routing path is determined according to the groups corresponding to the source node and the destination node respectively.
[0185] In one implementation, the first generating unit 602 is used to: determine a first group to which the source node belongs and a second group to which the destination node belongs;
[0186] Determine a starting node and an ending node for communication between the first group and the second group; the starting node is a routing node in the first group; the ending node is a routing node in the second group;
[0187] Generate a routing path between nodes based on the source node, destination node, start node and end node.
[0188] In one implementation, the first generating unit 602 is used to:
[0189] Generate an inter-group routing path including a start node and an end node;
[0190] If the source node is the same as the start node and the destination node is the same as the end node, the inter-group routing path is determined as the inter-node routing path;
[0191] If the source node is different from the start node and the destination node is different from the end node, a first intra-group routing path including the source node and the start node and a second intra-group routing path including the destination node and the end node are generated, and the first intra-group routing path, the inter-group routing path and the second intra-group routing path are combined to obtain an inter-node routing path;
[0192] If the source node is different from the start node and the destination node is the same as the end node, then the first intra-group routing path is combined with the inter-group routing path to obtain an inter-node routing path;
[0193] If the source node is the same as the start node and the destination node is different from the end node, the second intra-group routing path and the inter-group routing path are combined to obtain an inter-node routing path.
[0194] In one implementation, the obtaining unit 605 is further configured to:
[0195] Obtain a new routing path to be determined;
[0196] If the source port and the destination port in the new routing path to be determined are respectively the destination port and the source port in the routing path to be determined, then a new target routing path opposite to the target routing path transmission direction is generated according to the target routing path.
[0197] In one implementation, the obtaining unit 605 is further configured to:
[0198] Get the target routing path between every two ports in the Dragonfly network respectively;
[0199] According to each target routing path, a routing table corresponding to each routing node is generated.
[0200] In one implementation, the obtaining unit 605 is further configured to:
[0201] Each routing table is deployed to a corresponding routing node, so that each routing node queries a corresponding routing table according to a source port and a destination port of the data to be transmitted and forwards the data to be transmitted according to the obtained routing query result.
[0202] On the one hand, an embodiment of the present application provides an electronic device, including:
[0203] Processor; and
[0204] A memory stores computer instructions, wherein the computer instructions are used to enable a processor to execute steps of a method provided in any of the above-mentioned various optional implementations of determining a routing path.
[0205] On the one hand, an embodiment of the present application provides a storage medium storing computer instructions, which are used to enable a computer to execute the steps of the method provided in any of the various optional implementations of determining a routing path as described above.
[0206] The method for determining the routing path in the embodiment of the present application includes obtaining the source port of the routing path to be determined and the source node to which it belongs and the destination port and the destination node to which it belongs; the source node and the destination node are both routing nodes in the dragonfly network; the communication between each routing node in the dragonfly network and the communication within each routing node all adopt the same protocol; according to the dragonfly network structure, the source node and the destination node, the node-to-node routing path between the source node and the destination node is generated; the node-to-node routing path is a routing path composed of multiple routing nodes; according to the dragonfly network structure, the source port and the source node to which it belongs and the destination port and the destination node to which it belongs, the input and output ports corresponding to each routing node in the node-to-node routing path are determined; according to the input and output ports corresponding to each routing node in the node-to-node routing path and the network structure within the node, the node-to-node routing path of each routing node is generated respectively; the node-to-node routing path is the routing path between the input port and the output port in the routing node; according to the node-to-node routing path and the routing path within each node, the target routing path between the source port and the destination port is obtained. In this way, the communication between each routing node and the communication within each routing node are carried out through the same protocol, and the collaborative routing inside and outside the node is realized, thereby improving the efficiency of routing forwarding.
[0207] In an embodiment of the present application, an electronic device is provided, including:
[0208] Processor; and
[0209] The memory stores computer instructions, where the computer instructions are used to enable the processor to execute the method of any of the above embodiments.
[0210] In an embodiment of the present application, a storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a computer to execute a method in any of the above-mentioned embodiments. Figure 7 FIG. 7 is a schematic diagram showing the structure of an electronic device 7000. Figure 7 As shown, the electronic device 7000 includes: a processor 7010 and a memory 7020 , and optionally, may also include a power supply 7030 , a display unit 7040 , and an input unit 7050 .
[0211] The processor 7010 is the control center of the electronic device 7000. It connects various components using various interfaces and lines, and performs various functions of the electronic device 7000 by running or executing software programs and / or data stored in the memory 7020, thereby monitoring the electronic device 7000 as a whole.
[0212] In the embodiment of the present application, the processor 7010 executes the various steps in the above embodiment when calling the computer program stored in the memory 7020.
[0213] Optionally, the processor 7010 may include one or more processing units; preferably, the processor 7010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 7010. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips.
[0214] The memory 7020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, various applications, etc.; the data storage area may store data created according to the use of the electronic device 7000, etc. In addition, the memory 7020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices, etc.
[0215] The electronic device 7000 also includes a power source 7030 (such as a battery) for supplying power to various components. The power source can be logically connected to the processor 7010 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.
[0216] The display unit 7040 may be used to display information input by a user or information provided to a user, various menus of the electronic device 7000, etc. In the embodiment of the present application, it is mainly used to display the display interface of each application in the electronic device 7000 and objects such as text and pictures displayed in the display interface. The display unit 7040 may include a display panel 7041. The display panel 7041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
[0217] The input unit 7050 may be used to receive information such as numbers or characters input by the user. The input unit 7050 may include a touch panel 7051 and other input devices 7052. The touch panel 7051, also known as a touch screen, may collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any other suitable object or accessory on or near the touch panel 7051).
[0218] Specifically, the touch panel 7051 can detect the user's touch operation, detect the signal brought by the touch operation, convert these signals into touch point coordinates, send them to the processor 7010, and receive and execute the command sent by the processor 7010. In addition, the touch panel 7051 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. Other input devices 7052 can include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.
[0219] Of course, the touch panel 7051 can cover the display panel 7041. When the touch panel 7051 detects a touch operation on or near it, it is transmitted to the processor 7010 to determine the type of touch event. Then the processor 7010 provides corresponding visual output on the display panel 7041 according to the type of touch event. Figure 7 In the embodiment, the touch panel 7051 and the display panel 7041 are used as two independent components to realize the input and output functions of the electronic device 7000, but in some embodiments, the touch panel 7051 and the display panel 7041 can be integrated to realize the input and output functions of the electronic device 7000.
[0220] The electronic device 7000 may also include one or more sensors, such as a pressure sensor, a gravity acceleration sensor, a proximity light sensor, etc. Of course, according to the needs of specific applications, the electronic device 7000 may also include other components such as a camera. Since these components are not the key components used in the embodiments of the present application, Figure 7 It is not shown and will not be described in detail.
[0221] Those skilled in the art will understand that Figure 7 The electronic device is merely an example and does not limit the electronic device, and may include more or less components than those shown in the figure, or may combine certain components, or may include different components.
[0222] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.
[0223] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the embodiments. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. The obvious changes or modifications derived therefrom are still within the scope of protection created by this application.
Claims
1. A method for determining a routing path, characterized in that: The method comprises: The source port of the routing path to be determined and the source node to which it belongs, as well as the destination port and the destination node to which it belongs, are obtained; the source node and the destination node are both routing nodes in the dragonfly network; the communication between the routing nodes in the dragonfly network and the communication within each routing node adopt the same protocol; each routing node is divided into multiple groups, any two routing nodes in each group are interconnected, and each routing node includes multiple ports; the protocol is a high-speed communication protocol; According to the dragonfly network structure, the source node and the destination node, an inter-node routing path between the source node and the destination node is generated; the inter-node routing path is a routing path composed of multiple routing nodes; Determine the input and output ports corresponding to each routing node in the inter-node routing path according to the dragonfly network structure, the source port and the source node to which it belongs, and the destination port and the destination node to which it belongs; Generate an intra-node routing path for each routing node according to the input and output ports and the intra-node network structure corresponding to each routing node in the inter-node routing path; the intra-node routing path is a routing path between an input port and an output port in the routing node; Obtaining a target routing path between the source port and the destination port according to the inter-node routing path and the intra-node routing path; After obtaining a target routing path between the source port and the destination port according to the inter-node routing path and the intra-node routing path, the method further includes: The target routing paths between every two ports in the dragonfly network are obtained respectively; according to each target routing path, routing tables corresponding to each routing node are generated respectively; each routing table is deployed to a corresponding routing node, so that each routing node queries the corresponding routing table according to the source port and the destination port of the data to be transmitted and forwards the data to be transmitted according to the obtained routing query results.
2. The method according to claim 1, characterized in that The step of generating an inter-node routing path between the source node and the destination node according to the dragonfly network structure, the source node and the destination node comprises: Determine whether the source node and the destination node are in the same group, and if so, generate an inter-node routing path including the source node and the destination node; each routing node in the dragonfly network is divided into a plurality of groups; Otherwise, the inter-node routing path is determined according to the groups corresponding to the source node and the destination node respectively.
3. The method according to claim 2, characterized in that The determining the inter-node routing path according to the groups corresponding to the source node and the destination node respectively includes: Determine a first group to which the source node belongs and a second group to which the destination node belongs; Determine a starting node and an ending node for communication between the first group and the second group; the starting node is a routing node in the first group; the ending node is a routing node in the second group; The inter-node routing path is generated according to the source node, the destination node, the start node and the end node.
4. The method according to claim 3, characterized in that The generating the inter-node routing path according to the source node, the destination node, the start node and the end node includes: generating an inter-group routing path including the starting node and the ending node; If the source node is the same as the start node and the destination node is the same as the end node, determining the inter-group routing path as the inter-node routing path; If the source node is different from the start node and the destination node is different from the end node, a first intra-group routing path including the source node and the start node and a second intra-group routing path including the destination node and the end node are generated, and the first intra-group routing path, the inter-group routing path and the second intra-group routing path are combined to obtain the inter-node routing path; If the source node is different from the start node and the destination node is the same as the end node, combining the first intra-group routing path with the inter-group routing path to obtain the inter-node routing path; If the source node is the same as the start node and the destination node is different from the end node, the second intra-group routing path and the inter-group routing path are combined to obtain the inter-node routing path.
5. The method according to any one of claims 1 to 4, characterized in that: After obtaining a target routing path between the source port and the destination port according to the inter-node routing path and the intra-node routing path, the method further includes: Obtain a new routing path to be determined; If the source port and the destination port in the new routing path to be determined are respectively the destination port and the source port in the routing path to be determined, then a new target routing path opposite to the transmission direction of the target routing path is generated according to the target routing path.
6. A device for determining a routing path, characterized in that: The device comprises: An acquisition unit is used to acquire a source port of a routing path to be determined and a source node to which it belongs, and a destination port and a destination node to which it belongs; the source node and the destination node are both routing nodes in a dragonfly network; the communication between routing nodes in the dragonfly network and the communication within each routing node adopt the same protocol; each routing node is divided into a plurality of groups, any two routing nodes in each group are interconnected, and each routing node includes a plurality of ports; the protocol is a high-speed communication protocol; A first generating unit is configured to generate an inter-node routing path between the source node and the destination node according to the dragonfly network structure, the source node and the destination node; the inter-node routing path is a routing path composed of a plurality of routing nodes; A determination unit, configured to determine the input and output ports corresponding to the respective routing nodes in the inter-node routing path according to the dragonfly network structure, the source port and the source node to which it belongs, and the destination port and the destination node to which it belongs; A second generating unit is used to generate an intra-node routing path of each routing node according to the input and output ports and the intra-node network structure corresponding to each routing node in the inter-node routing path; the intra-node routing path is a routing path between an input port and an output port in the routing node; An obtaining unit, configured to obtain a target routing path between the source port and the destination port according to the inter-node routing path and the intra-node routing path; The obtaining unit is also used to: respectively obtain the target routing path between each two ports in the dragonfly network; generate routing tables corresponding to each routing node according to each target routing path; deploy each routing table to the corresponding routing node, so that each routing node queries the corresponding routing table according to the source port and the destination port of the data to be transmitted and forwards the data to be transmitted according to the obtained routing query results.
7. An electronic device, characterized in that: include: processor; as well as A memory storing computer instructions, wherein the computer instructions are used to enable the processor to execute the method according to any one of claims 1 to 5.
8. A storage medium, characterized in that: Computer instructions are stored, and the computer instructions are used to make a computer execute the method according to any one of claims 1 to 5.