A routing path planning method, device, equipment, and medium
By generating binary encoding and using routing sequence numbers to determine path information and direction information, the deadlock problem caused by path singularity in the routing algorithm is solved, and network communication efficiency is improved.
Patent Information
- Application Number
- CN202410703203.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-06-03
AI Technical Summary
In the case of avoiding deadlocks, path singularity in the routing algorithm in the prior art leads to a reduced network topology communication efficiency.
By generating binary encoding between the source terminal node and the destination terminal node, the route number is used to determine the path information and path direction information, thereby generating a planned path, ensuring the diversity of channel selection in both directions and dual paths, and avoiding deadlocks.
Effectively avoid deadlock problems, retain the path diversity of network topology to the greatest extent, thereby improving network communication efficiency.
Smart Images

Figure CN118282927B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a routing path planning method, device, equipment, and medium. Background Art
[0002] With the rapid popularization and development of the Internet and the continuous deployment of satellite Internet constellation plans, more user terminals have been connected to the network, and Internet applications covering all areas of people's production and life have been derived. The traffic in the Internet has shown an explosive growth trend. The development and application of optical fiber technology and intersatellite laser communication technology has shifted the bottleneck of the information transmission network to the switching equipment of the switching nodes in the Internet, such as switches and routers. The core technology of these switching devices is switching technology, which includes switching networks and scheduling algorithms. In order to improve the performance of information exchange networks and meet the emerging new applications and business needs, it is necessary to study switching networks with larger capacity and better performance and high-performance scheduling algorithms adapted to them.
[0003] With the increasing requirements for network performance and scale, interconnected networks include shared media networks, direct interconnected networks, indirect interconnected networks and hybrid interconnected networks. Among them, indirect interconnected networks separate terminal nodes and routers, and routers can be used as an independent communication device. The typical topology structure is a fat tree structure. Each router is connected to its neighbors through a bidirectional link or two unidirectional links. These links are called channels.
[0004] As the network topology becomes more and more complex, deadlock may occur. In related technologies, in order to avoid deadlock, the routing path between terminal nodes is usually defined as a unique path, that is, there is only one path available for communication between terminal nodes. Therefore, due to the singleness of the channel, when a routing node in the channel fails or is blocked, the communication between terminal nodes will be affected, thereby reducing the communication efficiency of the network topology. Summary of the invention
[0005] In view of this, the present invention provides a routing path planning method, device, equipment, and medium to solve the technical problem of path singularity in routing algorithms in related technologies while avoiding deadlock.
[0006] In a first aspect, the present invention provides a routing path planning method, the method comprising: in response to a path planning request, respectively determining the binary codes corresponding to the terminal serial numbers of the source terminal node and the destination terminal node in the network topology to generate a first code and a second code, wherein the network topology includes at least one path ring composed of routing nodes, the links between the routing nodes are bidirectional two-way, and the routing nodes include routing serial numbers corresponding to the routing nodes; based on the first code and the second code, using the routing serial number, determining the path information; based on the path information and the routing serial number, determining the path direction information in the bidirectional two-way; based on the path information and the path direction information, generating a planned path between the source terminal node and the destination terminal node.
[0007] In combination with the first aspect, in a possible implementation of the first aspect, based on the first code and the second code, using the routing number, the path information is determined, including: based on the first code and the second code, by bitwise XOR and omitting the lowest bit of the XOR result, generating a third code; obtaining the first routing number of the routing node connected to the source terminal node; based on the third code and the first routing number, determining the path information.
[0008] In combination with the first aspect, in a possible implementation of the first aspect, path information is determined based on the third code and the first routing sequence number, including: in response to at least one digit in the third code being one, the third code is split to generate at least one fourth code having only one digit being one; based on the first routing sequence number, bitwise XORing is performed with each fourth code in a random manner, and the result of each bitwise XORing is used as an intermediate route until the bitwise XORing of all fourth codes is completed; and path information is determined based on the first routing sequence number and the intermediate route.
[0009] In combination with the first aspect, in a possible implementation of the first aspect, based on the first routing number, bitwise XOR is performed with each fourth code in a random manner one by one, and the result of each bitwise XOR is used as an intermediate route until the bitwise XOR of all fourth codes is completed, including: based on the first routing number, any fourth code is selected for bitwise XOR to determine the first intermediate route; based on the first intermediate route, any remaining fourth code is selected for bitwise XOR to determine the second intermediate route; it is determined whether all fourth codes have been bitwise XORed; when there are fourth codes that have not been bitwise XORed, the second intermediate route is used as the first intermediate route, and the step of determining the second intermediate route is repeated.
[0010] In combination with the first aspect, in a possible implementation of the first aspect, after determining the path information based on the first routing number and the intermediate route, the method also includes: obtaining a second routing number of a routing node to which the destination terminal node is connected; and verifying the path information based on the second routing number.
[0011] In combination with the first aspect, in a possible implementation of the first aspect, path information is determined based on the third code and the first routing number, including: in response to all bits in the third code being zero, determining that the source terminal node and the destination terminal node are connected through a routing node corresponding to the first routing number.
[0012] In combination with the first aspect, in a possible implementation of the first aspect, the method also includes: determining the number of routing nodes from the source terminal node to the destination terminal node based on the number of values corresponding to one in the third coding median; and verifying the path information based on the number of routing nodes.
[0013] In combination with the first aspect, in a possible implementation of the first aspect, path direction information in a bidirectional dual path is determined based on path information and a routing sequence number, including: based on the path information, respectively determining a third routing sequence number of a first routing node and a fourth routing sequence number of a last routing node; when the third routing sequence number is less than the fourth routing sequence number, taking the first direction in the bidirectional dual path as the path direction.
[0014] In combination with the first aspect, in a possible implementation of the first aspect, path direction information in a bidirectional dual path is determined based on path information and a routing sequence number, including: based on the path information, respectively determining a third routing sequence number of a first routing node and a fourth routing sequence number of a last routing node; when the third routing sequence number is greater than the fourth routing sequence number, using the second direction in the bidirectional dual path as the path direction.
[0015] In combination with the first aspect, in a possible implementation of the first aspect, path direction information in a bidirectional dual path is determined based on path information and a routing sequence number, including: based on the path information, respectively determining a first routing node and an end routing node; when the first routing node and the end routing node are adjacent nodes, using the first direction or the second direction in the bidirectional dual path as the path direction.
[0016] In combination with the first aspect, in a possible implementation manner of the first aspect, each path ring includes at least four routing nodes.
[0017] In combination with the first aspect, in a possible implementation of the first aspect, each routing node in the network topology is connected to two terminal nodes, and the serial numbers of the two terminals connected to the same routing node are respectively equal to twice the routing serial number of the connected routing node and twice the routing serial number plus one.
[0018] In a second aspect, the present invention provides a routing path planning device, which includes: an encoding module, which is used to respond to a path planning request, and respectively determine the binary codes of the source terminal node and the destination terminal node corresponding to the terminal sequence number in the network topology to generate a first code and a second code, wherein the network topology includes at least one path ring composed of routing nodes, the links between the routing nodes are bidirectional two-way, and the routing nodes include routing numbers corresponding to the routing nodes; a path information module, which is used to determine the path information based on the first code and the second code and using the routing sequence number; a direction information module, which is used to determine the path direction information in the bidirectional two-way based on the path information and the routing sequence number; a generation module, which is used to generate a planned path between the source terminal node and the destination terminal node based on the path information and the path direction information.
[0019] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the routing path planning method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0020] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the routing path planning method of the first aspect or any corresponding embodiment thereof.
[0021] The technical solution of the present invention has the following advantages:
[0022] The present invention provides a routing path planning method, device, equipment, and medium. The method determines the binary codes of a source terminal node and a destination terminal node respectively, and determines the path information and the path direction information by using a first code, a second code, and a routing sequence number, thereby generating a planned path between the source terminal node and the destination terminal node. In this process, the first code and the second code are used to successively determine the routes to be passed between the source terminal node and the destination terminal node, thereby clarifying the path information by the routing sequence number, and clarifying the path direction by using the routing sequence number involved in the path information, thereby clarifying the route to be passed between the source terminal node and the destination terminal node by the path information, and clarifying which channel of the bidirectional dual-path the channel corresponding to the path information belongs to by the path direction information, thereby generating a planned path between the source terminal node and the destination terminal node, so that on the premise of effectively avoiding the occurrence of deadlock problems, the path diversity of the network topology is retained to the greatest extent, thereby improving the network communication efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific implementation methods of the present invention 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a schematic diagram of a fat tree network topology provided according to an embodiment of the present invention;
[0025] Figure 2 According to an embodiment of the present invention, Figure 1 Schematic diagram of the flattened fat tree network topology;
[0026] Figure 3 According to an embodiment of the present invention, Figure 2 Equivalent schematic diagram of the network topology shown;
[0027] Figure 4 According to an embodiment of the present invention, Figure 3 A schematic diagram of a path loop in ;
[0028] Figure 5 According to an embodiment of the present invention, Figure 4 The schematic diagram of the path loop shown produces a clockwise deadlock;
[0029] Figure 6 According to an embodiment of the present invention, Figure 4 Schematic diagram of the path loop producing a counterclockwise deadlock
[0030] Figure 7 is a flow chart of a routing path planning method provided according to an embodiment of the present invention;
[0031] Figure 8 According to an embodiment of the present invention, Figure 3 Schematic diagram of links between routing nodes;
[0032] Fig. 9 According to an embodiment of the present invention, Figure 4 The path ring shown is the planned path determined by routing nodes 2 to 7;
[0033] Fig.10 According to an embodiment of the present invention, Figure 4 The path ring shown is the planned path determined by routing nodes 3 to 6;
[0034] Fig.11 According to an embodiment of the present invention, Figure 4 The path ring shown is the planned path determined by routing nodes 7 to 2;
[0035] Fig.12 According to an embodiment of the present invention, Figure 4 The path ring shown is the planned path determined by routing nodes 6 to 3;
[0036] Fig.13 is a structural block diagram of a routing path planning device according to an embodiment of the present invention;
[0037] Fig.14 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention;
[0038] Fig.15 It is a schematic diagram of the structure of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0040] This embodiment provides a schematic diagram of a fat tree network topology, such as Figure 1 As shown, it includes routing nodes 101 and terminal nodes 102, with a total of five layers of routing nodes, wherein routing node 101 includes routing numbers from 0 to 15, a total of 16 routing nodes, and terminal nodes include terminal numbers from 0 to 31, a total of 32 terminal nodes, and every two terminal nodes share one routing node. The terminal nodes 102 communicate with each other through routing nodes 101, so that the path formed by the terminal node 102 and the routing node 101 is the planned path.
[0041] Figure 2 For the general Figure 1 Schematic diagram of the fat tree network topology after flattening. After flattening, the traffic transmission between the five-layer routing nodes 101 is completed directly inside the node, and the traffic transmission between routing nodes 101 uses the merged data link transmission. Among them, the link port between routing node 101 and terminal node 102 is bidirectional, and the link port between routing nodes 101 is bidirectional and two-way. Taking the link between routing node 0 and routing node 1 as an example, the number of channels from routing node 0 to routing node 1 is two, and the number of channels from routing node 1 to routing node 0 is two. Figure 2 The network structure described above can be formed by performing certain topology planning. Figure 3The network topology diagram shown in FIG. Each routing node 101 is connected to two terminal nodes 102. For the convenience of display, only some terminal nodes 102 are shown. The number of routing nodes 101 is greatly reduced, and the number of its links is twice that of the original network. The network diameter is the same as the original network, where the network diameter refers to the maximum value of the shortest distance between two nodes in the network.
[0042] It should be understood that the number of routing nodes 101 and terminal nodes 102, and the connection relationship between terminal nodes 102 and routing nodes 101 include but are not limited to Figure 1 , Figure 2 , Figure 3 As shown, the network topology can be set according to actual working conditions.
[0043] from Figure 3 It can be seen from the network topology interface shown that there is a path loop in the structure, and because in the related art, the link ports between routing nodes are usually only bidirectional, that is, taking the link between routing node 0 and routing node 1 as an example, the number of channels from routing node 0 to routing node 1 is one, and the number of channels from routing node 1 to routing node 0 is one. In this case, deadlock is easy to occur, so in order to avoid deadlock in the related art, routing algorithms such as "1-2-4-8" are usually used to define the routing path between terminal nodes as a unique path, which causes the problem of path uniqueness in the routing algorithm, reducing the communication efficiency of the network topology.
[0044] Regarding the deadlock problem, such as Figure 4 As shown, Figure 4 for Figure 3 For a ring topology, deadlock is easy to occur. For example, suppose there are four routing requests at the same time: Request 1: routing node 2 to routing node 7; Request 2: routing node 3 to routing node 6; Request 3: routing node 7 to routing node 2; Request 4: routing node 6 to routing node 3. When these four routing requests need to pass through a routing node and all choose clockwise routing, and all have occupied the middle routing node, a deadlock occurs. Figure 5 On the contrary, if both choose counterclockwise routing and both have occupied the middle routing node, a deadlock will also occur, such as Figure 6 Deadlock refers to the situation where two or more data packets are blocked in an intermediate routing node, and a circular waiting occurs between the release and request of network resources.
[0045] The routing algorithm defines the routing path between terminal nodes as a unique path, such as the "1-2-4-8" algorithm, taking the terminal sequence number of the source terminal node as 2 and the terminal sequence number of the destination terminal node as 31 as an example. Figure 3As shown, there are multiple paths from terminal node 2 to terminal node 31, for example, from terminal node 2, routing node 1, routing node 5, routing node 13, routing node 15 to terminal node 31, or from terminal node 2, routing node 1, routing node 6, routing node 14, routing node 15 to terminal node 31, etc. In the "1-2-4-8" algorithm, the path from terminal node 2 to terminal node 31 is defined as: from terminal node 2, routing node 1, routing node 3, routing node 11, routing node 15 to terminal node 31, which causes the technical problem of path uniqueness in the routing algorithm while avoiding the deadlock problem.
[0046] According to an embodiment of the present invention, a routing path planning method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0047] In order to solve the technical problem of path singularity in routing algorithms in related technologies while avoiding deadlock problems, this embodiment provides a routing path planning method, such as Figure 7 As shown, the method comprises the following steps:
[0048] S201. In response to a path planning request, determine the binary codes of the source terminal node and the destination terminal node corresponding to the terminal sequence numbers in the network topology respectively to generate a first code and a second code, wherein the network topology includes at least one path ring composed of routing nodes, the links between the routing nodes are bidirectional and dual-path, and the routing nodes include routing sequences corresponding to the routing nodes.
[0049] Specifically, in response to a path planning request, the binary codes of the source terminal node and the destination terminal node corresponding to the terminal serial numbers in the network topology are determined respectively to generate a first code and a second code, which means that the source terminal node and the destination terminal node in the routing request are converted into binary according to the terminal serial numbers in the network topology to generate a first code and a second code respectively.
[0050] Specifically, the binary encoding bit widths of the first encoding and the second encoding are determined according to the number of terminal nodes. Figure 3 Taking the 32 terminal nodes shown as an example, 5 bits are used to represent each terminal node, such as 00000 represents terminal node 0, 00001 represents terminal node 1, and so on, 11110 represents terminal node 30, and 11111 represents terminal node 31.
[0051] In an optional embodiment, each path ring includes at least four routing nodes. It should be understood that when there is only one routing node, data link transmission cannot be formed between routing nodes. When there are two or three routing nodes, any two routing nodes are adjacent, so data link transmission can be performed through adjacent channels.
[0052] In an optional implementation, each routing node in the network topology is connected to two terminal nodes, and the serial numbers of the two terminals connected to the same routing node are respectively equal to twice the routing serial number of the connected routing node and twice the routing serial number plus one. Figure 3 As shown, routing node 0 is connected to terminal node 1 and terminal node 2 respectively, routing node 1 is connected to terminal node 2 and terminal node 3 respectively, and so on, which will not be repeated here.
[0053] Specifically, the links between routing nodes are bidirectional, such as Figure 8 As shown, taking the link between routing node 2 and routing node 3 as an example, the direction is the number of channels from routing node 2 to routing node 3 is two, and the figure shows the link from routing node 2 to routing node 3, and the links are respectively distinguished by 0 and 1 as labels, and the direction is the number of channels from routing node 3 to routing node 2 is two, and the same reason is not repeated, that is, the link marked as 0 is a group of bidirectional links, and the link marked as 1 is a group of bidirectional links, so the two groups of links represented by the label 0 and the label 1 indicate that the link between the routing nodes is a bidirectional two-way. It should be understood that the label can also be distinguished by "+", "-" or other symbols, and this embodiment does not make specific limitations on this.
[0054] S202: Determine path information based on the first code, the second code and the routing number.
[0055] Specifically, determining the path information based on the first code and the second code using the routing number means generating a third code by bitwise XORing the first code and the second code, thereby determining the path information by the third code and the routing number.
[0056] S203: Determine path direction information in the bidirectional dual-path based on the path information and the routing sequence number.
[0057] Specifically, determining the path direction information in the bidirectional dual-path based on the path information and the routing sequence number refers to using the routing sequence number of the first routing node and the routing sequence number of the last routing node in the path information to clarify the path direction.
[0058] S204: Generate a planned path from the source terminal node to the destination terminal node based on the path information and the path direction information.
[0059] Specifically, based on the path information and the path direction information, generating the planned path between the source terminal node and the destination terminal node means generating the planned path between the source terminal node and the destination terminal node based on the determined routing nodes and the determined link transmission direction, that is, starting from the source terminal node, through the route required between the source terminal node and the destination terminal node, reaching the destination terminal node, and performing data link transmission along the determined bidirectional dual-path link.
[0060] The present embodiment provides a routing path planning method, which generates a planned path between the source terminal node and the destination terminal node by respectively determining the binary codes of the source terminal node and the destination terminal node, and determining the path information and the path direction information by using the first code, the second code, and the routing sequence number. In this process, the first code and the second code are used to successively determine the routes to be passed between the source terminal node and the destination terminal node, so as to clarify the path information by the routing sequence number, and to clarify the path direction by using the routing sequence number involved in the path information, so as to clarify the route to be passed between the source terminal node and the destination terminal node by the path information, and to clarify which channel of the bidirectional dual-path the channel corresponding to the path information belongs to by the path direction information, so as to generate a planned path between the source terminal node and the destination terminal node, so as to retain the path diversity of the network topology to the greatest extent under the premise of effectively avoiding the occurrence of the deadlock problem, thereby improving the network communication efficiency.
[0061] In an optional implementation, in order to determine the routing nodes that need to be passed between the source terminal node and the destination terminal node, based on the first code and the second code, the path information is determined using the routing sequence number, including:
[0062] Based on the first code and the second code, a third code is generated by performing bitwise XOR and omitting the least significant bit of the XOR result.
[0063] Specifically, based on the first code and the second code, generating the third code by bitwise XOR and omitting the lowest bit of the XOR result means bitwise XORing the first code and the second code in binary code to obtain the first XOR result, and ignoring the lowest bit in the first XOR result, thereby generating the third code.
[0064] Specifically, taking the source terminal node as the terminal node with terminal sequence number 1, denoted by S, the corresponding first code is: 00001, and the destination terminal node is the terminal node with terminal sequence number 24, denoted by D, and the corresponding second code is: 11000 as an example, the bitwise XOR result of S and D is: 11001, denoted as the first XOR result, the lowest bit of the first XOR result is omitted, and the third code is generated: 1100, denoted by I.
[0065] Get the first routing sequence number of the routing node connected to the source terminal node.
[0066] Specifically, in an indirect interconnection network, the terminal nodes are separated from the routing nodes, e.g. Figure 3 As shown, each terminal node has a connected routing node, thereby obtaining the first routing sequence number corresponding to the source terminal node. Figure 3 , taking S as a terminal node with a terminal sequence number of 1 as an example, the corresponding first routing sequence number is 0, and the corresponding binary code is 0000.
[0067] Based on the third code and the first routing number, path information is determined.
[0068] In an optional implementation manner, determining the path information based on the third code and the first routing sequence number includes:
[0069] (1) In response to at least one digit in the third code being one, splitting the third code to generate at least one fourth code having only one digit being one.
[0070] Specifically, in response to at least one digit in the third code being one, splitting the third code to generate at least one fourth code having only one digit being one means splitting the third code according to the number of digits equal to one in the third code to obtain at least one fourth code having only one digit being one.
[0071] Take I as 1100 as an example, where the values of the first and second digits are 1, therefore, I is split into two fourth codes: 1000 and 0100, which are recorded as I1 and I2 respectively.
[0072] (2) Based on the first routing number, perform bitwise XOR with each fourth code in a random manner, and use the result of each bitwise XOR as the intermediate route until the bitwise XOR of all fourth codes is completed.
[0073] In an optional implementation, based on the first routing sequence number, bitwise XOR is performed with each fourth code in a random manner one by one, and the result of each bitwise XOR is used as the intermediate route until the bitwise XOR of all fourth codes is completed, including:
[0074] Based on the first route sequence number, any fourth code is selected for bitwise XOR to determine the first intermediate route.
[0075] Based on the first intermediate route, any remaining fourth code is selected for bitwise XOR to determine the second intermediate route.
[0076] It is determined whether all fourth codes have been bitwise XORed.
[0077] When there is a code that has not been bitwise XORed in the fourth code, the second intermediate route is used as the first intermediate route, and the step of determining the second intermediate route is repeated.
[0078] Specifically, take S as the terminal node with terminal sequence number 1, D as the terminal node with terminal sequence number 24, the corresponding first routing sequence number is 0, the corresponding binary code is 0000, I is 1100, I1: 1000, I2: 0100 as an example, and the bitwise XOR process of completing all the fourth codes is represented by formulas (1) and (2):
[0079] (1)
[0080] (2)
[0081] Among them, the Indicates that the binary code on the left side of the arrow is bitwise XORed with I1 to obtain the binary code on the right side of the arrow. It means that the binary code on the left side of the arrow is bitwise XORed with I2 to obtain the binary code on the right side of the arrow.
[0082] Specifically, the process of performing bitwise XOR with I1 and I2 in the binary code corresponding to the first route number in formula (1) and (2) corresponds to the process of selecting any fourth code for bitwise XOR based on the first route number to determine the first intermediate route, wherein 1000 in formula (1) and 0100 in formula (2) correspond to the binary code of the first intermediate route, and the route numbers corresponding to the first intermediate route are 8 and 4 respectively. It should be understood that if the decomposition result of I also includes I3, I4, etc., the process of performing bitwise XOR with I3 and I4 should also be included here.
[0083] Specifically, the process of performing bitwise XOR with I1 and I2 in formulas (1) and (2) corresponds to the process of selecting any remaining fourth code for bitwise XOR based on the first intermediate route to determine the second intermediate route, wherein 1100 in formula (1) and 1100 in formula (2) correspond to the binary code of the second intermediate route, and the second intermediate route corresponds to the route number 12. It should be understood that if the decomposition result of I also includes I3, I4, etc., the process of performing bitwise XOR with I3 and I4 should also be included here.
[0084] Specifically, in this example, the fourth codes have all completed the bitwise XOR, but if the decomposition result of I also includes I3, I4, etc., at this time, the second intermediate route is regarded as the first intermediate route, and the bitwise XOR is performed again to determine the second intermediate route until all the fourth codes have completed the bitwise XOR. In this example, the decomposition result of I includes I1 and I2, and the corresponding results are two, that is, formula (1) (2). By analogy, if the decomposition result of I includes I1, I2, and I3, the corresponding results should be 6.
[0085] (3) Determine the path information based on the first route sequence number and the intermediate route.
[0086] Specifically, based on the first routing number and the intermediate route, determining the path information means converting the binary code corresponding to the first intermediate routing number and the intermediate route into the corresponding routing number, thereby determining the routing nodes passed from the source terminal node to the destination terminal node. Therefore, the source terminal node, all passed routing nodes, and the destination terminal node together constitute the path information.
[0087] Specifically, taking formula (1) and (2) in the above embodiment as an example, the path information is respectively: terminal node 1, routing node 0, routing node 4, routing node 12, terminal node 24, and terminal node 1, routing node 0, routing node 8, routing node 12, terminal node 24.
[0088] In an optional implementation, after determining the path information based on the first route sequence number and the intermediate route, the method further includes:
[0089] Obtain the second routing sequence number of the routing node to which the destination terminal node is connected.
[0090] Specifically, in an indirect interconnection network, the terminal nodes are separated from the routing nodes, e.g. Figure 3 As shown, each terminal node has a connected routing node, thereby obtaining a second routing sequence number corresponding to the destination terminal node. Figure 3 Taking D as the terminal node with terminal number 24 as an example, the corresponding second routing number is 12, and the corresponding binary code is 1100.
[0091] The path information is verified based on the second routing sequence number.
[0092] Specifically, verifying the path information based on the second routing sequence number refers to determining whether the second routing sequence number is the same as the routing sequence number corresponding to the routing node at the end of the path information, and if they are the same, the path information is considered correct. Combined with the results of formulas (1) and (2) in the above embodiment, the routing sequence number corresponding to the routing node at the end of the path information is 12, which is the same as the second routing sequence number.
[0093] In an optional implementation, determining the path information based on the third code and the first routing number includes: in response to all bits in the third code being zero, determining that the source terminal node and the destination terminal node are connected through a routing node corresponding to the first routing number.
[0094] Specifically, taking the source terminal node as the terminal node with terminal sequence number 6, the corresponding first code is: 00110, and the destination terminal node is the terminal node with terminal sequence number 7, and the corresponding second code is 00111 as an example, after bitwise XOR, I is 0000, indicating that the two terminal nodes are on the same routing node, that is, connected through the routing node corresponding to the first routing number connected to the source terminal node.
[0095] In an optional implementation, the method further includes: setting the path information of the source terminal node and the destination terminal node to have the source terminal node as the starting point, the routing node corresponding to the first routing sequence number as the intermediate routing node, and the destination terminal node as the ending point.
[0096] Specifically, when the source terminal node and the destination terminal node are connected through the same routing node, the data link transmission is performed through internal routing through the routing node.
[0097] In an optional implementation, after determining the path information based on the third code and the first routing sequence number, the method further includes:
[0098] The number of routing nodes from the source terminal node to the destination terminal node is determined based on the number of values corresponding to the third code median being one.
[0099] Verify path information based on the number of routing nodes.
[0100] Specifically, based on the number of values corresponding to the third code median being one, determining the number of routing nodes from the source terminal node to the destination terminal node means taking the number of values corresponding to the third code median being one plus one as the number of routing nodes from the source terminal node to the destination terminal node. Taking S as a terminal node with a terminal sequence number of 1, D as a terminal node with a terminal sequence number of 24, and I being 1100 as an example, the number of values 1 in I is 2, that is, it takes 3 routing nodes to reach D from S, which are recorded as a, b, and c respectively. At this time, the path information can be represented as S, a, b, c, and D, so that the verification of the path information is completed by determining the number of routing nodes in the path information.
[0101] By implementing this embodiment, a third code is generated through the first code and the second code, and the third code is split into at least one fourth code, so as to determine the intermediate route, and determine the path information through the first route sequence number and the intermediate route, so as to clarify the route to be passed between the source terminal node and the destination terminal node with the path information, thereby avoiding more than two data packets from being blocked in the intermediate routing node, avoiding the occurrence of deadlock, and providing a data basis for subsequently retaining the path diversity of the network topology.
[0102] In an optional implementation, in order to determine which channel between routing nodes is used for data link transmission, path direction information in a bidirectional dual path is determined based on the path information and the routing sequence number, including:
[0103] Based on the path information, a third routing number of the first routing node and a fourth routing number of the last routing node are determined respectively.
[0104] When the third routing number is smaller than the fourth routing number, the first direction in the bidirectional dual-path is used as the path direction.
[0105] Specifically, taking formula (1) and (2) in the above embodiment as an example, the first direction can be a link marked as "+", the third routing number is 0, and the fourth routing number is 12. In this case, the planned path is expressed as: terminal node 1, routing node 0, routing node 4, routing node 12, terminal node 24, transmitted along the "+" link, and terminal node 1, routing node 0, routing node 8, routing node 12, terminal node 24, transmitted along the "+" link. In this case, there is no need to define the original determined path information as a path, but by clarifying the direction information, the original path is retained, thereby retaining the path diversity of the network topology to the greatest extent.
[0106] Specifically, Fig. 9 As shown, the link transmitted from routing node 2 to routing node 7 is shown as an example, and Fig.10 As shown, a link transmitted from routing node 3 to routing node 6 is exemplarily shown.
[0107] In an optional implementation, determining the path direction information in the bidirectional dual-path based on the path information and the routing sequence number includes:
[0108] Based on the path information, a third routing number of the first routing node and a fourth routing number of the last routing node are determined respectively.
[0109] When the third route sequence number is greater than the fourth route sequence number, the second direction of the bidirectional dual-path is used as the path direction.
[0110] Specifically, taking the third routing number as 12 and the fourth routing number as 0 as an example, the second direction can be a link marked as "-". In this case, the planned path is expressed as: terminal node 24, routing node 12, routing node 4, routing node 0, terminal node 1, transmitted along the "-" link, and terminal node 24, routing node 12, routing node 8, routing node 0, terminal node 1, transmitted along the "-" link. In this case, there is no need to define the original determined path information as a path, but by clarifying the direction information, the original path is retained, thereby retaining the path diversity of the network topology to the greatest extent.
[0111] Specifically, Fig.11 As shown, the link transmitted from routing node 7 to routing node 2 is shown as an example, and Fig.12 As shown, a link transmitted from routing node 6 to routing node 3 is exemplarily shown.
[0112] It should be understood that if Figures 9 to 12As shown, whether clockwise or counterclockwise, although there is a path loop in the topology structure, deadlock will not occur. In addition, there are 16 routing paths for the four routing requests, but there are 8 routing paths using the deadlock-avoiding routing algorithm proposed in this embodiment, which retains the path diversity to the greatest extent.
[0113] In an optional implementation, determining the path direction information in the bidirectional dual-path based on the path information and the routing sequence number includes:
[0114] Based on the path information, the first routing node and the last routing node are determined respectively.
[0115] When the first routing node and the last routing node are adjacent nodes, the first direction or the second direction in the bidirectional dual path is used as the path direction.
[0116] Specifically, when the first routing node and the last routing node are adjacent nodes, the first direction or the second direction can be used as the path direction, such as Figure 8 As shown, links marked as "0" or "1" can be used as path directions.
[0117] By implementing this example, the routing numbers of the first routing node and the last routing node are determined through the path information, and then the path direction of the two-way dual-path between the routing nodes is determined through the size relationship of the routing numbers. After the path information is determined, the path direction information is used to clarify which channel of the two-way dual-path the channel corresponding to the path information belongs to, so that under the premise of effectively avoiding the deadlock problem, the path diversity of the network topology is retained to the greatest extent, thereby improving the network communication efficiency.
[0118] In the present embodiment, a routing path planning device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0119] This embodiment provides a routing path planning device, such as Fig.13 As shown, including:
[0120] The encoding module 301 is used to respond to the path planning request, respectively determine the binary codes corresponding to the terminal sequence numbers of the source terminal node and the destination terminal node in the network topology to generate the first code and the second code, wherein the network topology includes at least one path ring composed of routing nodes, the links between the routing nodes are bidirectional and two-way, and the routing nodes include routing sequence numbers corresponding to the routing nodes. The specific process can be referred to the relevant description of step S201 in the above embodiment, which will not be repeated here.
[0121] The path information module 302 is used to determine the path information based on the first code, the second code and the routing number. The specific process can be found in the description of step S202 in the above embodiment, which will not be repeated here.
[0122] The direction information module 303 is used to determine the path direction information in the bidirectional dual-path based on the path information and the routing sequence number. The specific process can be found in the description of step S203 in the above embodiment, which will not be repeated here.
[0123] The generation module 304 is used to generate a planned path from the source terminal node to the destination terminal node based on the path information and the path direction information. The specific process can be found in the description of step S204 in the above embodiment, which will not be repeated here.
[0124] The routing path planning device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0125] The embodiment of the present invention also provides a computer device having the above Fig.13 The routing path planning device shown.
[0126] See also Fig.14 , Fig.14 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.14 As shown, the computer device includes: one or more processors 401, memory 402, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component utilizes different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.14 A processor 401 is taken as an example.
[0127] The processor 401 may be a central processing unit, a network processor or a combination thereof. The processor 401 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.
[0128] The memory 402 stores instructions executable by at least one processor 401, so that the at least one processor 401 executes the method shown in the above embodiment.
[0129] The memory 402 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 402 may optionally include a memory remotely arranged relative to the processor 401, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0130] The memory 402 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 402 may also include a combination of the above types of memory. The computer device also includes a communication interface 403, which is used for the computer device to communicate with other devices or communication networks.
[0131] The embodiment of the present invention also provides a computer-readable storage medium. The above method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or is implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, such as Fig.15As shown, an embodiment of the present invention further provides a computer-readable storage medium 501, and the computer-readable storage medium 501 stores computer instructions 5011. When the computer instructions 5011 are executed by a processor, the method shown in the above embodiment is implemented.
[0132] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A routing path planning method, characterized in that: The method comprises: In response to a path planning request, binary codes of a source terminal node and a destination terminal node corresponding to terminal serial numbers in a network topology are respectively determined to generate a first code and a second code, wherein the network topology includes a path ring formed by routing nodes, links between the routing nodes are bidirectional and two-way, and the routing nodes include routing serial numbers corresponding to the routing nodes; Determine path information based on the first code, the second code, and the routing number; Determine path direction information in the bidirectional dual path based on the path information and the routing sequence number; Based on the path information and the path direction information, generating a planned path between a source terminal node and a destination terminal node; The determining the path information based on the first code, the second code and the routing sequence number includes: Based on the first code and the second code, a third code is generated by performing bitwise XOR and omitting the least significant bit of the XOR result; Obtain the first routing sequence number of the routing node connected to the source terminal node; Determine path information based on the third code and the first routing sequence number; The determining path information based on the third code and the first routing sequence number includes: In response to at least one digit in the third code being one, splitting the third code to generate at least one fourth code having only one digit being one; Based on the first routing sequence number, perform bitwise XOR with each of the fourth codes one by one in a random manner, and use the result of each bitwise XOR as the intermediate route until the bitwise XOR of all the fourth codes is completed; Determining path information based on the first route sequence number and the intermediate route; The step of performing bitwise XOR with each of the fourth codes in a random manner based on the first routing sequence number, and using the result of each bitwise XOR as an intermediate route until the bitwise XOR of all the fourth codes is completed, includes: Based on the first route sequence number, select any of the fourth codes and perform bitwise XOR to determine a first intermediate route; Based on the first intermediate route, select any remaining fourth code and perform bitwise XOR to determine a second intermediate route; Determine whether all the fourth codes have been bitwise XORed; When there is a code that has not been bitwise XORed among the fourth codes, the second intermediate route is used as the first intermediate route, and the step of determining the second intermediate route is repeated.
2. The method according to claim 1, characterized in that After determining the path information based on the first route sequence number and the intermediate route, the method further includes: Obtain the second routing sequence number of the routing node to which the destination terminal node is connected; The path information is verified based on the second routing number.
3. The method according to claim 1, characterized in that The determining of path information based on the third code and the first routing number includes: in response to all bits in the third code being zero, determining that the source terminal node and the destination terminal node are connected through a routing node corresponding to the first routing number.
4. The method according to claim 1, characterized in that: After determining the path information based on the third code and the first routing sequence number, the method further includes: Determine the number of routing nodes from the source terminal node to the destination terminal node based on the number of values corresponding to the third code median being one; Based on the number of routing nodes, the path information is verified.
5. The method according to claim 1, characterized in that The determining the path direction information in the bidirectional dual-path based on the path information and the routing sequence number includes: Based on the path information, respectively determine a third routing number of the first routing node and a fourth routing number of the last routing node; When the third routing number is smaller than the fourth routing number, the first direction of the bidirectional dual-path is used as the path direction.
6. The method according to claim 1, characterized in that The determining the path direction information in the bidirectional dual-path based on the path information and the routing sequence number includes: Based on the path information, respectively determine a third routing number of the first routing node and a fourth routing number of the last routing node; When the third routing number is greater than the fourth routing number, the second direction of the bidirectional two-way path is used as the path direction.
7. The method according to claim 1, characterized in that The determining the path direction information in the bidirectional dual-path based on the path information and the routing sequence number includes: Based on the path information, determining a first routing node and an end routing node respectively; When the first routing node and the last routing node are adjacent nodes, the first direction or the second direction of the bidirectional dual path is used as the path direction.
8. The method according to claim 1, characterized in that Each of the path rings includes at least four routing nodes.
9. The method according to claim 1, characterized in that: Each routing node in the network topology is connected to two terminal nodes, and the serial numbers of the two terminals connected to the same routing node are respectively equal to twice the routing serial number of the connected routing node and twice the routing serial number plus one.
10. A routing path planning device, characterized in that: The device comprises: An encoding module, configured to determine, in response to a path planning request, binary codes of a source terminal node and a destination terminal node corresponding to terminal serial numbers in a network topology to generate a first code and a second code, wherein the network topology includes a path ring formed by routing nodes, links between the routing nodes are bidirectional and two-way, and the routing nodes include routing serial numbers corresponding to the routing nodes; A path information module, configured to determine path information based on the first code, the second code and the routing sequence number; A direction information module, used to determine the path direction information in the bidirectional dual path based on the path information and the routing sequence number; A generation module, used to generate a planned path between a source terminal node and a destination terminal node based on the path information and the path direction information; The determining the path information based on the first code, the second code and the routing sequence number includes: Based on the first code and the second code, a third code is generated by bitwise XOR and omitting the lowest bit of the XOR result; obtaining a first routing number of a routing node connected to the source terminal node; and determining path information based on the third code and the first routing number; The determining path information based on the third code and the first routing sequence number includes: In response to at least one digit of the third code being one, splitting the third code to generate at least one fourth code having only one digit being one; performing bitwise XOR with each of the fourth codes in a random manner based on the first routing sequence number, and using the result of each bitwise XOR as an intermediate route until the bitwise XOR of all fourth codes is completed; determining path information based on the first routing sequence number and the intermediate route; The step of performing bitwise XOR with each of the fourth codes in a random manner based on the first routing sequence number, and using the result of each bitwise XOR as an intermediate route until the bitwise XOR of all the fourth codes is completed, includes: Based on the first route sequence number, select any of the fourth codes for bitwise XOR to determine the first intermediate route; based on the first intermediate route, select any of the remaining fourth codes for bitwise XOR to determine the second intermediate route; determine whether all the fourth codes have been bitwise XORed; when there are codes in the fourth codes that have not been bitwise XORed, use the second intermediate route as the first intermediate route and repeat the step of determining the second intermediate route.
11. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the routing path planning method according to any one of claims 1 to 9 by executing the computer instructions.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the routing path planning method according to any one of claims 1 to 9.
