Routing path generation method, network topology structure and program product

By performing XOR operation and determining the parent routing node set in the multi-layer routing node layer, multiple routing paths are generated, which solves the network congestion problem caused by insufficient path diversity in the butterfly network, and increases the diversity of routing paths and avoids network congestion.

CN119583432AInactive Publication Date: 2025-03-07SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD

Patent Information

Application Number
CN202510145099.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-03-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Due to the lack of path diversity, butterfly networks are prone to severe network congestion in adversarial or high-load networks.

Method used

By performing XOR operation in the multi-layer routing node layer, the target routing node layer and the parent routing node collection are determined, thereby generating multiple routing paths, increasing the diversity of paths.

Benefits of technology

It effectively solves the problem of network congestion caused by insufficient path diversity in network topology, increases the diversity of routing paths, and avoids network congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583432A_ABST
    Figure CN119583432A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a routing path generation method, a network topology structure and a program product, and the method comprises the steps: carrying out the exclusive-or operation of a binary numerical value of a source routing node and a binary numerical value of a target routing node, and obtaining a first exclusive-or result; under the condition that the numerical values of the multiple bits in the first XOR result include non-zero, a target routing node layer is determined from the multiple routing node layers, and the target routing node layer is a routing node layer where a common father routing node between a source routing node and the target routing node in the multiple routing node layers is located; determining a father routing node set from the target routing node layer; and generating a target routing path between the source routing node and the target routing node based on the target parent routing node determined from the parent routing node set. Through application of the method and the device, the technical problem of network congestion caused by the fact that a network topology structure does not have path diversity in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the computer field, and specifically, to a method for generating a routing path, a network topology structure, and a program product. Background Art

[0002] In related technologies, routing is performed through network topology. For example, the butterfly network is a new type of fully connected network with unlimited bandwidth and no congestion. The butterfly network has good topological characteristics and can carry multiple resource nodes. Therefore, it can give full play to the advantages of high-degree routing and perform well in reducing network latency and overhead.

[0003] However, since the butterfly network does not have path diversity, congestion is more serious in adversarial networks or high-load networks. Summary of the invention

[0004] The embodiments of the present invention provide a method for generating a routing path and a network topology structure, so as to at least solve the technical problem in the related art that the network topology structure does not have path diversity, resulting in network congestion.

[0005] According to one aspect of an embodiment of the present invention, a method for generating a routing path is provided, which is applied to a network topology structure, wherein the network topology structure comprises: multiple layers of routing node layers, each layer of the routing node layers comprises multiple routing nodes, and the corresponding routing nodes between every two layers of the routing node layers are bidirectionally connected, and the method comprises: performing an XOR operation on a binary value of a source routing node and a binary value of a target routing node to obtain a first XOR result, wherein the source routing node is any routing node in the multiple layers of routing node layers, and the target routing node is any routing node in the multiple layers of routing node layers; in the first XOR result When the values ​​of multiple bits in the result include non-zero values, a target routing node layer is determined from the multi-layer routing node layer, wherein the target routing node layer is the routing node layer where the common parent routing node between the source routing node and the target routing node in the multi-layer routing node layer is located; a parent routing node set is determined from the target routing node layer, wherein the parent routing node set includes multiple common parent routing nodes between the source routing node and the target routing node; and a target routing path between the source routing node and the target routing node is generated based on the target parent routing node determined from the parent routing node set.

[0006] According to another aspect of an embodiment of the present invention, a network topology structure is further provided, comprising: a multi-layer routing node layer, each layer of the routing node layer comprises a plurality of routing nodes, and the corresponding routing nodes between every two layers of the routing node layers are bidirectionally connected; wherein a target routing path between any source routing node and any target routing node in the multi-layer routing node layer is determined by the following steps: performing an XOR operation on a binary value of the source routing node in the multi-layer routing node layer and a binary value of the target routing node to obtain a first XOR result; in the case where the values ​​of a plurality of bits in the first XOR result include non-zero, determining a target routing node layer from the multi-layer routing node layer, wherein the target routing node layer is a routing node layer where a common parent routing node between the source routing node and the target routing node in the multi-layer routing node layer is located; determining a parent routing node set from the target routing node layer, wherein the parent routing node set comprises a plurality of common parent routing nodes between the source routing node and the target routing node; and generating a target routing path between the source routing node and the target routing node based on the target parent routing node determined from the parent routing node set.

[0007] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0008] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0009] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0010] Through the present application, since the values ​​of multiple bits in the first XOR result include non-0, the target routing node layer is determined from the multi-layer routing node layer, wherein the target routing node layer is the routing node layer where the common parent routing node between the source routing node and the target routing node in the multi-layer routing node layer is located; the parent routing node set is determined from the target routing node layer, wherein the parent routing node set includes multiple common parent routing nodes between the source routing node and the target routing node; the target routing path between the source routing node and the target routing node is generated based on the target parent routing node determined from the parent routing node set. In other words, there are multiple routing paths between the source routing node and the target routing node in the multi-layer routing node layer. This solves the technical problem that the network topology structure in the related art does not have path diversity, resulting in network congestion, and achieves the effect of increasing the diversity of routing paths and avoiding network congestion. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for generating a routing path according to an embodiment of the present application;

[0012] Figure 2 is a flow chart of a method for generating a routing path according to an embodiment of the present application;

[0013] Figure 3 is a structural block diagram of a network topology structure according to an embodiment of the present application;

[0014] Figure 4 is a schematic diagram of a five-layer fat tree network topology structure according to an embodiment of the present application;

[0015] Figure 5 It is a structural block diagram of a device for generating a routing path according to an embodiment of the present application. DETAILED DESCRIPTION

[0016] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0018] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for generating a routing path according to an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0019] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for generating the routing path in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal 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.

[0020] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0021] In this embodiment, a method for generating a routing path is provided, which is applied to a network topology structure. The network topology structure includes: multiple routing node layers, each routing node layer includes multiple routing nodes, and the corresponding routing nodes between every two routing node layers are bidirectionally connected. Figure 2 is a flow chart of a method for generating a routing path according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0022] Step S202, performing an XOR operation on the binary value of the source routing node and the binary value of the target routing node to obtain a first XOR result, wherein the source routing node is any routing node in the multi-layer routing node layer, and the target routing node is any routing node in the multi-layer routing node layer;

[0023] Step S204, when the values ​​of the multiple bits in the first XOR result include non-zero, determining a target routing node layer from the multi-layer routing node layer, wherein the target routing node layer is a routing node layer where a common parent routing node between the source routing node and the target routing node in the multi-layer routing node layer is located;

[0024] Step S206, determining a set of parent routing nodes from the target routing node layer, wherein the set of parent routing nodes includes a plurality of common parent routing nodes between the source routing node and the target routing node;

[0025] Step S208: generating a target routing path between the source routing node and the target routing node based on the target parent routing node determined from the set of parent routing nodes.

[0026] Through the above steps, since the values ​​of multiple bits in the first XOR result include non-zero, the target routing node layer is determined from the multi-layer routing node layer, wherein the target routing node layer is the routing node layer where the common parent routing node between the source routing node and the target routing node in the multi-layer routing node layer is located; the parent routing node set is determined from the target routing node layer, wherein the parent routing node set includes multiple common parent routing nodes between the source routing node and the target routing node; the target routing path between the source routing node and the target routing node is generated based on the target parent routing node determined from the parent routing node set. In other words, there are multiple routing paths between the source routing node and the target routing node in the multi-layer routing node layer. This solves the technical problem in the related art that the network topology structure does not have path diversity, resulting in network congestion, and achieves the effect of increasing the diversity of routing paths and avoiding network congestion.

[0027] Optionally, the source routing node and the target routing node are any routing nodes in a network topology structure.

[0028] Optionally, the binary value of the source routing node and the binary value of the target routing node are determined by: converting the subnet mask and IP address of the source routing node into binary values; performing a target operation on the converted binary value of the subnet mask and the binary value of the IP address to obtain an operation result; and determining the binary value of the source routing node using the operation result. For example, assuming that the IP address of the source routing node is 192.168.1.10 and the subnet mask is 255.255.255.0. To set the binary value of the routing node, the following steps can be followed: S1, converting the IP address and the subnet mask into binary values. The IP address is 11000000.10101000.00000001.00001010, and the subnet mask is 11111111.11111111.11111111.00000000; S2, performing a logical AND operation on the IP address and the subnet mask. The result of 11000000.10101000.00000001.00001010 AND 111111111.11111111.11111111.00000000 The result is 11000000.10101000.00000001.00000000, which is the network address. Take the four-digit value as the binary value of the routing node. For example, the source routing node is represented by a 4-bit binary number, and 0100 represents routing node 4. The binary value of the target routing node is determined in the same way as the source routing node, which will not be repeated here.

[0029] Optionally, the routing node number of the routing node can be determined using the binary value of the routing node. For example, the binary value of the source routing node is converted into a decimal value; the routing node number of the routing node is set according to the decimal value. Thus, the purpose of quickly finding the routing node can be achieved. The routing node number of the routing node is a unique identifier used to identify and recognize the routing node. Setting the routing node number of the routing node can uniquely identify the node in the network, which is convenient for searching the routing table and transmitting routing information. The routing node number can be used in the routing selection algorithm to help the router select the best routing path to achieve the fastest transmission speed and the smallest network congestion. The routing node number can be used to monitor and manage the routing nodes in the network, which is convenient for network administrators to troubleshoot and optimize performance. The routing node number can be used to realize communication and data exchange between routing nodes. Therefore, it is very important to set the routing node number of the routing node, which can help the routing nodes in the network to transmit and communicate data more efficiently.

[0030] In an exemplary embodiment, after performing an XOR operation on the binary value of the source routing node and the binary value of the target routing node to obtain a first XOR result, the method further includes: when the values ​​of multiple bits in the first XOR result are all 0, determining that the source routing node and the target routing node are in the same routing node; and using the routing node where the source routing node and the target routing node are located to transmit data between the source routing node and the target routing node.

[0031] This embodiment can quickly determine whether the source routing node and the target routing node are in the same routing node by performing an XOR operation on the binary value of the source routing node and the binary value of the target routing node, thereby increasing the efficiency of data transmission.

[0032] In an exemplary embodiment, when the values ​​of multiple bits in the first XOR result include non-zero values, determining the target routing node layer includes: determining a bit with a value of 1 from the values ​​of the multiple bits in order from high to low to obtain the target bit; and determining the routing node layer corresponding to the target value of the target bit to obtain the target routing node layer.

[0033] Optionally, the values ​​of the multiple bits in the first XOR result include non-0, which means that the valid bits in the first XOR result are not all 0. For example, in a network topology structure including 5 layers of routing node layers, the source routing node is 0101, and the target routing node is 0110, then the first XOR result = 0101^0110 = 0011, and the highest position of the bit with a value of "1" in 0011 is checked from high to low. At the 4th position, the target bit (i.e., the father node) closest to the source routing node and the target routing node is at the 4th layer in the multi-layer routing node layer.

[0034] This embodiment can quickly and accurately determine the target routing node layer by determining the bit with a value of 1.

[0035] In an exemplary embodiment, determining a set of parent routing nodes from a target routing node layer includes: using a binary value of a source routing node, a total number of layers of multiple routing node layers, the number of layers where the target routing node layer is located, and a preset coefficient to calculate binary values ​​of multiple routing nodes, wherein the preset coefficient is a natural number; obtaining a set of parent routing nodes from multiple parent routing nodes corresponding to the binary values ​​of the multiple routing nodes determined by the set, wherein the multiple parent routing nodes are all common routing nodes that are closest to the source routing node and the target routing node.

[0036] Optionally, the binary values ​​of the multiple routing nodes are calculated using the binary value of the source routing node, the total number of layers of the L-layer routing node layer, the number of layers where the target routing node layer is located, and a preset coefficient, including: the binary values ​​of the multiple routing nodes are calculated by the following formula: f=S^n*2 l-i-1 , where f is used to represent the binary value of the routing node, S is used to represent the binary value of the source routing node, l is used to represent the total number of L routing node layers, i is used to represent the number of layers where the target routing node layer is located, and n is used to represent the preset coefficient.

[0037] For example, in the network topology, there are 5 layers of routing nodes. The source routing node is 0101 and the target routing node is 0110. The first XOR result is 0011. From high to low, check the highest position of the bit with the value of "1" in the first XOR result. If it is at the 3rd position, then f is at the 3rd layer and its value range is between 0-15. f=0100^n*2 5-3-1 =0100^*2, n=0, 1, 2, 3…, parent routing node set = {0100, 0000, 0110, 0010, 1100, 1110, 1000, 1010}.

[0038] This embodiment can accurately determine the parent routing node set through the calculation relationship between the binary value of the source routing node, the total number of L-layer routing node layers, the number of layers where the target routing node layer is located, and n.

[0039] In an exemplary embodiment, before generating a target routing path between a source routing node and a target routing node based on a target parent routing node determined from a set of parent routing nodes, the method further includes one of the following:

[0040] Randomly select a parent routing node from multiple parent routing nodes in the parent routing node set to obtain a target parent routing node;

[0041] Optionally, you can use the following method to randomly select a parent routing node from the parent routing node set: Store the parent routing node set in an array or list. Use a random number generator to generate a random index ranging from 0 to the length of the parent routing node set minus one. Use the generated random index to take the corresponding parent routing node from the parent routing node set as the target parent routing node.

[0042] Selecting a parent routing node in an idle state from multiple parent routing nodes in the parent routing node set to obtain a target parent routing node;

[0043] Optionally, an idle parent routing node can be selected by the following method: traverse the parent routing node set and check whether the status of each parent routing node is idle. If an idle parent routing node is found, the node is selected as the target parent routing node. If no idle parent routing node is found, a most suitable parent routing node is selected as the target parent routing node according to a certain strategy (such as random selection, priority selection, etc.).

[0044] A parent routing node whose network performance is greater than a preset performance is selected from multiple parent routing nodes in the parent routing node set to obtain a target parent routing node.

[0045] The target parent routing node can be selected by the following method: Get the network performance data of multiple parent routing nodes in the parent routing node set, such as bandwidth, delay, packet loss rate, etc. Set the preset network performance requirements, for example, you want to select a parent routing node with a network performance greater than 100Mbps. Traverse the parent routing node set, compare their network performance data one by one, and find the parent routing node that meets the preset performance requirements. Use the parent routing node that meets the requirements as the target parent routing node. In actual applications, factors such as the availability and stability of the parent routing node also need to be considered to ensure that the selected target parent routing node can stably provide high-performance network connections.

[0046] This implementation can achieve the purpose of generating an accurate target routing path by selecting a target parent routing node from a set of parent routing nodes in a variety of ways.

[0047] In an exemplary embodiment, a target routing path between a source routing node and a target routing node is generated based on a target parent routing node determined from a set of parent routing nodes, including: performing an XOR operation on a binary value of the source routing node and a binary value of the target parent routing node to obtain a second XOR result; determining, from a plurality of bits in the second XOR result, bits with a value of 1 and bits with a value of 0 one by one in order from a high bit to a low bit; and generating a target routing path between the source routing node and the target routing node by using bits with a value of 1 and bits with a value of 0 determined one by one from a plurality of bits in the second XOR result.

[0048] Optionally, a target routing path between a source routing node and a target routing node is generated by determining bits with a value of 1 and bits with a value of 0 one by one from a plurality of bits in a second XOR result, including: in the order of bits with a value of 1 and bits with a value of 0 determined from the second XOR result, inverting bits in the source routing node corresponding to bits with a value of 1 in the second XOR result to determine a first routing node to be routed; determining a second routing node to be routed of the source routing node corresponding to bits with a value of 0 in the second XOR result, wherein the first routing node and the second routing node are both routing nodes in an upper routing node layer of the source routing node, and the first routing node and the second routing node are respectively in different routing node layers; generating a first routing path based on the source routing node, the first routing node, the second routing node and the target parent routing node; generating a target routing path using the first routing path and the second routing path, wherein the second routing path is a routing path between the target parent routing node and the target routing node.

[0049] Optionally, the node number of the first routing node can be obtained by inverting the bit in the source routing node corresponding to the bit with a value of 1 in the second XOR result. The second routing node is a node to which the source routing node can directly jump to the upper layer.

[0050] Optionally, generating a first routing path based on a source routing node, a first routing node, a second routing node, and a target parent routing node includes: First, determining a path between a source routing node and a target parent routing node. Then, finding the shortest path from the source routing node to the target parent routing node and recording it. Next, finding the positions of the first routing node and the second routing node in the shortest path. Finally, generating a first routing path based on the positions of the first routing node and the second routing node. This path should include the source routing node, the first routing node, the second routing node, and the target parent routing node.

[0051] For example, in a network topology structure including 5 layers of routing node layers, the source routing node is 0100 (routing node 4) and the target routing node is 0110 (routing node 6), and one of the father nodes 0010 is selected: 0100 and 0010 are bitwise XORed, and the result is 0110; the valid bits of 0110 are 3 bits from high to low; the valid bits in 0110 are operated as follows: starting from the highest bit, the bit corresponding to the source routing node is inverted at the position of "1" to obtain the routing node for the upper layer, and the position of "0" can directly jump to the upper layer.

[0052] This embodiment can achieve the purpose of quickly and accurately generating a routing path by performing an XOR operation on the binary value of the source routing node and the binary value of the target parent routing node, and searching for a routing node based on the XOR result.

[0053] In an exemplary embodiment, before using the first routing path and the second routing path to generate the target routing path, the method further includes: performing an XOR operation on the binary value of the target routing node and the binary value of the target parent routing node to obtain a third XOR result; determining the bits with a value of 1 and the bits with a value of 0 one by one from a plurality of bits in the third XOR result in order from high to low; and generating the second routing path by determining the bits with a value of 1 and the bits with a value of 0 one by one from a plurality of bits in the third XOR result.

[0054] Optionally, the second routing path is generated by determining the bits with a value of 1 and the bits with a value of 0 one by one from multiple bits in the third XOR result, including: in the order of the bits with a value of 1 and the bits with a value of 0 determined from the third XOR result, the bits in the target routing node corresponding to the bits with a value of 1 in the third XOR result are inverted to determine the third routing node of the target routing node; determining the fourth routing node to be routed of the target routing node corresponding to the bits with a value of 0 in the third XOR result, wherein the third routing node and the fourth routing node are both routing nodes in the lower routing node layer of the target routing node, and the third routing node and the fourth routing node are respectively in different routing node layers; and the second routing path is generated based on the target parent routing node, the third routing node, the fourth routing node and the target routing node.

[0055] Optionally, the node number of the third routing node can be obtained by performing an inversion operation on the bit in the target routing node corresponding to the bit with a value of 1 in the third XOR result. The third routing node is a node to which the source routing node can directly jump to the next layer.

[0056] For example, in a network topology structure including 5 layers of routing node layers, the target routing node is 0110 (routing node 6), and the target parent routing node is 0010: 0110 and 0010 are bitwise XORed, and the result is 0100; starting from the low bit of the valid bit, the bit corresponding to F is inverted at the position of "1" to obtain the routing node for the next layer of routing, and the position of "0" can directly jump to the next layer.

[0057] This embodiment can achieve the purpose of quickly and accurately generating a routing path by performing an XOR operation on the binary value of the target routing node and the binary value of the target parent routing node, and searching for a routing node based on the XOR result.

[0058] In the present embodiment, a network topology 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 device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0059] Figure 3 is a structural block diagram of a network topology structure according to an embodiment of the present application, such as Figure 3 As shown, the structure includes:

[0060] Multiple routing node layers, each routing node layer includes multiple routing nodes, and the corresponding routing nodes between every two routing node layers are bidirectionally connected;

[0061] Among them, the target routing path between any source routing node and any target routing node in the multi-layer routing node layer is determined by the following steps: performing an XOR operation on the binary value of the source routing node in the multi-layer routing node layer and the binary value of the target routing node to obtain a first XOR result; when the values ​​of multiple bits in the first XOR result include non-zero, determining the target routing node layer from the multi-layer routing node layer, wherein the target routing node layer is the routing node layer where the common parent routing node between the source routing node and the target routing node in the multi-layer routing node layer is located; determining a parent routing node set from the target routing node layer, wherein the parent routing node set includes multiple common parent routing nodes between the source routing node and the target routing node; and generating a target routing path between the source routing node and the target routing node based on the target parent routing node determined from the parent routing node set.

[0062] Optionally, the number of multiple routing node layers and the number of routing nodes are determined based on the number of source routing nodes in the network topology structure, wherein the source routing nodes are terminal user devices.

[0063] Each routing node in the i-th routing node layer of the multi-layer routing node layer is bidirectionally connected to at least two routing nodes in the i-1-th routing node layer.

[0064] Each source routing node in the source routing node layer in the multi-layer routing node layer is bidirectionally connected to at least two routing nodes, and each target routing node in the target routing node layer is bidirectionally connected to at least two routing nodes, wherein the source routing node layer is the routing node layer where the source routing node is located, and the target routing node layer is the routing node layer where the target routing node is located.

[0065] For example, Figure 5As shown in the figure, when the network topology is a five-layer fat tree network topology, the five-layer fat tree network topology has the following characteristics:

[0066] The number of routing nodes in each layer is equal; the relationship between the number of routing nodes k in each layer and the number of source nodes n is: k=n / 2; the relationship between the number of topological layers l and the number of source nodes n is: l=log2n; the link relationship between the routing node d in the i-th layer and the routing node in the i-1th layer is: i∈{1,2,…l}; the routing node d in the i-th layer is connected to the routing node d in the i-1th layer; the routing node d in the i-th layer is connected to the routing node dxor in the i-1th layer, where: dxor=bin(d)^bin(2 l-i ), where bin converts an integer into binary form, and ^ is a bitwise XOR function in binary form; each routing node in the zeroth layer is connected to two source nodes; each line is bidirectionally connected.

[0067] Through the above network topology, since the network topology includes multiple layers of routing node layers, each routing node layer includes multiple routing nodes, and the corresponding routing nodes between every two routing node layers are bidirectionally connected; this topology can provide high availability and fault tolerance, because even if a node or link fails, the entire network can still operate normally. In addition, this structure can also provide high-bandwidth and low-latency network connections. In other words, there are multiple routing paths between the source routing node and the target routing node in the multi-layer routing node layer. This solves the technical problem that the network topology structure in the related art does not have path diversity, resulting in network congestion, and achieves the effect of increasing the diversity of routing paths and avoiding network congestion.

[0068] The present application is described below in conjunction with specific embodiments:

[0069] The network topology structure in this specific embodiment is explained by taking a five-layer fat tree network topology as an example, wherein the upward jump in this embodiment refers to the routing node directly jumping upward to the routing node with the same number in the higher layer; the downward jump refers to the routing node directly jumping downward to the routing node with the same number in the lower layer; the upward routing refers to the routing node routing to the routing node with a different number in the higher layer according to the routing algorithm; the downward routing refers to the routing node routing to the routing node with a different number in the lower layer according to the routing algorithm.

[0070] like Figure 4As shown in FIG. 1 , each layer of the five-layer fat tree network topology contains 16 routing nodes, and each node is represented by a 4-bit binary number, for example, 0100 represents node 4. Assuming that the binary representation of the routing node where the source terminal node (i.e., the source routing node) is located is S, and the binary representation of the routing node where the target terminal node (i.e., the target routing node) is located is D, determining the routing path between S and D includes the following steps:

[0071] Step 1: S and D are XORed bit by bit, and the result is recorded as I;

[0072] Step 2: Check each valid bit in I: If all are 0, it proves that S and D are in the same routing node, and routing can be performed directly inside the routing node, and routing is completed; if the valid bits in I are not all 0, go to step 3;

[0073] Step 3: Determine the layer number of the nearest father node of routes S and D, including:

[0074] From high to low, check the highest position of the bit with the value of "1" in I. At the i-th position, the nearest father node of S and D is at the i-th layer.

[0075] For example: S=0101 (routing node 5), D=0110 (routing node 6): I=0101^0110=0011,

[0076] ; I=0011, check from high to low the highest position of the bit with the value of "1" in I, which is at the 4th position, then S=0101, D=0110, the nearest father node is at the 4th layer.

[0077] Step 4: Determine the nearest parent node of S and D, including:

[0078] From high to low, check the highest position of the bit with value "1" in I. At position i, the set of the nearest father nodes {f}, where f satisfies the following conditions:

[0079] Condition 1: f is the number of layers determined in step 3;

[0080] Condition 2: f is between 0 and 15;

[0081] Condition 3: f=S^n*2 l-i-1 , n=0,1,2,3…;

[0082] For example: S=0100 (routing node 4), D=0110 (routing node 6):

[0083] I=0010, check the highest position of the bit with value "1" in I from high to low, at the 3rd position, the set of the nearest father nodes {f}, where f satisfies the following conditions:

[0084] Condition 1: f is the number of layers determined in the third step, i.e., the third layer;

[0085] Condition 2: f is between 0 and 15;

[0086] Condition 3: f=0100^n*2 5-3-1 =0100^*2, n=0, 1, 2, 3...;

[0087] Finally, we get {f}={0100, 0000, 0110, 0010, 1100, 1110, 1000, 1010}.

[0088] Step 5: S randomly routes from an available father node F that satisfies step 4, including:

[0089] The routing node S and the father node F are bitwise XORed, and the result is recorded as I f ;I f The effective bit of is i bits from high to low;

[0090] I f The valid bits in the middle are operated as follows: starting from the highest bit, the bit corresponding to S is inverted at the position of "1" to obtain the routing node for the upper layer routing, and the position of "0" can directly jump to the upper layer;

[0091] Arrive at the available father node F and proceed to step 6;

[0092] Step 6: The father node F routes to the routing node D, including:

[0093] The father node F and the routing node D are bitwise XORed, and the result is recorded as I D ;I D The effective bit of is i bits from high to low;

[0094] I D The effective bits in the middle are operated as follows: starting from the low effective bits, the bit corresponding to F is inverted at the position of "1" to obtain the routing node for the next layer of routing, and the position of "0" can directly jump to the next layer;

[0095] Arrive at the target routing node D.

[0096] For example, S=0100 (routing node 4), D=0110 (routing node 6), select one of the father nodes 0010: S=0100 and F=0010 are bitwise XORed, and the result is I f =0110;If The effective digits are 3 digits from high to low;

[0097] I f The valid bits in the middle are operated as follows: starting from the highest bit, the bit corresponding to S is inverted at the position of "1" to obtain the routing node for the upper layer routing, and the position of "0" can directly jump to the upper layer;

[0098] .

[0099] Arrive at the available father node F and proceed to step 6;

[0100] Step 6: The father node F routes to the routing node D, including:

[0101] F=0010 and D=0110 are bitwise XORed, and the result is recorded as I D =0100;I D The effective digits are 3 digits from high to low;

[0102] I D The effective bits in the middle are operated as follows: starting from the low effective bits, the bit corresponding to F is inverted at the position of "1" to obtain the routing node for the next layer of routing, and the position of "0" can directly jump to the next layer;

[0103] ;

[0104] Arrive at the target routing node D.

[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0106] In this embodiment, a device for generating a routing path 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 conceivable.

[0107] Figure 5 is a structural block diagram of a device for generating a routing path according to an embodiment of the present application, such as Figure 5 As shown, the device comprises:

[0108] A first operation module 52 is used to perform an XOR operation on the binary value of the source routing node and the binary value of the target routing node to obtain a first XOR result, wherein the source routing node is any routing node in the multi-layer routing node layer, and the target routing node is any routing node in the multi-layer routing node layer;

[0109] A first determining module 54 is configured to determine a target routing node layer from the multi-layer routing node layer when the values ​​of the plurality of bits in the first XOR result include non-zero values, wherein the target routing node layer is a routing node layer where a common parent routing node between the source routing node and the target routing node in the multi-layer routing node layer is located;

[0110] A second determining module 56 is used to determine a set of parent routing nodes from the target routing node layer, wherein the set of parent routing nodes includes a plurality of common parent routing nodes between the source routing node and the target routing node;

[0111] The first generating module 58 is configured to generate a target routing path between the source routing node and the target routing node based on the target parent routing node determined from the parent routing node set.

[0112] In an exemplary embodiment, the above-mentioned device also includes: a third determination module, which is used to perform an XOR operation on the binary value of the source routing node and the binary value of the target routing node, and after obtaining a first XOR result, when the values ​​of multiple bits in the above-mentioned first XOR result are all 0, determine that the above-mentioned source routing node and the above-mentioned target routing node are in the same routing node; a first transmission module, which is used to use the routing node where the above-mentioned source routing node and the above-mentioned target routing node are located to transmit data between the above-mentioned source routing node and the above-mentioned target routing node system.

[0113] In an exemplary embodiment, the above-mentioned first determination module includes: a first determination unit, used to determine the bit with a value of 1 from the numerical values ​​of the above-mentioned multiple bits in order from high to low, and obtain the target bit; a second determination unit, used to determine the routing node layer corresponding to the target value of the above-mentioned target bit, and obtain the above-mentioned target routing node layer.

[0114] In an exemplary embodiment, the second determination module includes: a first calculation unit, used to calculate the binary values ​​of multiple routing nodes using the binary value of the source routing node, the total number of layers of the multi-layer routing node layers, the number of layers where the target routing node layer is located, and a preset coefficient, wherein the preset coefficient is a natural number; a first collection unit, used to collect the multiple parent routing nodes corresponding to the binary values ​​of the multiple routing nodes determined above to obtain the parent routing node collection, wherein the multiple parent routing nodes are all the common routing nodes that are closest to the source routing node and the target routing node.

[0115] In an exemplary embodiment, the first calculation unit includes: a first calculation subunit, which is used to calculate the binary values ​​of the plurality of routing nodes by the following formula: f=S^n*2 l-i-1 , wherein the above f is used to represent the binary value of the above routing node, the above S is used to represent the binary value of the above source routing node, the above l is used to represent the total number of layers of the above L-layer routing node layers, the above i is used to represent the layer number of the above target routing node layer, and the above n is used to represent the above preset coefficient.

[0116] In an exemplary embodiment, the above-mentioned device also includes one of the following: a first selection unit, used to randomly select a parent routing node from the above-mentioned multiple parent routing nodes in the above-mentioned parent routing node set before generating the target routing path between the above-mentioned source routing node and the above-mentioned target routing node based on the target parent routing node determined from the above-mentioned parent routing node set, so as to obtain the above-mentioned target parent routing node; a second selection unit, used to select a parent routing node in an idle state from the above-mentioned multiple parent routing nodes in the above-mentioned parent routing node set, so as to obtain the above-mentioned target parent routing node; a third selection unit, used to select a parent routing node whose network performance is greater than a preset performance from the above-mentioned multiple parent routing nodes in the above-mentioned parent routing node set, so as to obtain the above-mentioned target parent routing node.

[0117] In an exemplary embodiment, the first generation module includes: a first operation unit, which is used to perform an XOR operation on the binary value of the source routing node and the binary value of the target parent routing node to obtain a second XOR result; a third determination unit, which is used to determine the bits with a value of 1 and the bits with a value of 0 one by one from multiple bits in the second XOR result in order from high to low; and a fourth determination unit, which is used to generate a target routing path between the source routing node and the target routing node by using the bits with a value of 1 and the bits with a value of 0 determined one by one from multiple bits in the second XOR result.

[0118] In an exemplary embodiment, the fourth determination unit includes: a first operation subunit, which is used to invert the bits in the source routing node corresponding to the bits with a value of 1 in the second XOR result in the order of the bits with a value of 1 and the bits with a value of 0 determined from the second XOR result, so as to determine the first routing node to be routed; a first determination subunit, which is used to determine the second routing node to be routed of the source routing node corresponding to the bits with a value of 0 in the second XOR result, wherein the first routing node and the second routing node are both routing nodes in the upper routing node layer of the source routing node, and the first routing node and the second routing node are respectively in different routing node layers; a first generation subunit, which is used to generate a first routing path based on the source routing node, the first routing node, the second routing node and the target parent routing node; and a second generation subunit, which is used to generate the target routing path using the first routing path and the second routing path, wherein the second routing path is the routing path between the target parent routing node and the target routing node.

[0119] In an exemplary embodiment, the device further includes: a second operation module, which is used to perform an XOR operation on the binary value of the target routing node and the binary value of the target parent routing node before generating the target routing path using the first routing path and the second routing path to obtain a third XOR result; a fourth determination module, which is used to determine the bits with a value of 1 and the bits with a value of 0 one by one from multiple bits in the third XOR result in order from high to low; and a fifth determination module, which is used to generate the second routing path by determining the bits with a value of 1 and the bits with a value of 0 one by one from multiple bits in the third XOR result.

[0120] In an exemplary embodiment, the sixth determination module includes: a fifth determination unit, which is used to invert the bits in the target routing node corresponding to the bits with a value of 1 in the third XOR result in the order of the bits with a value of 1 and the bits with a value of 0 determined from the third XOR result, so as to determine the third routing node of the target routing node; a sixth determination unit, which is used to determine the fourth routing node to be routed by the target routing node corresponding to the bits with a value of 0 in the third XOR result, wherein the third routing node and the fourth routing node are both routing nodes in the lower routing node layer of the target routing node, and the third routing node and the fourth routing node are respectively in different routing node layers; a generation unit, which is used to generate the second routing path based on the target parent routing node, the third routing node, the fourth routing node and the target routing node.

[0121] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0122] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0123] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0124] The embodiments of the present application also provide a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.

[0125] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0126] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0127] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0128] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0129] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0130] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0131] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for generating a routing path, characterized in that: Applied to a network topology structure, the network topology structure includes: multiple routing node layers, each routing node layer includes multiple routing nodes, and the corresponding routing nodes between every two routing node layers are bidirectionally connected, the method includes: Performing an XOR operation on a binary value of a source routing node and a binary value of a target routing node to obtain a first XOR result, wherein the source routing node is any routing node in the multi-layer routing node layer, and the target routing node is any routing node in the multi-layer routing node layer; In the case where the values ​​of the multiple bits in the first XOR result include non-zero, determining a target routing node layer from the multi-layer routing node layers, wherein the target routing node layer is a routing node layer where a common parent routing node between the source routing node and the target routing node in the multi-layer routing node layers is located; Determine a set of parent routing nodes from the target routing node layer, wherein the set of parent routing nodes includes a plurality of common parent routing nodes between the source routing node and the target routing node; A target routing path between the source routing node and the target routing node is generated based on a target parent routing node determined from the set of parent routing nodes.

2. The method according to claim 1, characterized in that After performing an XOR operation on the binary value of the source routing node and the binary value of the target routing node to obtain a first XOR result, the method further includes: When the values ​​of the multiple bits in the first XOR result are all 0, determining that the source routing node and the target routing node are in the same routing node; The data between the source routing node and the target routing node is transmitted by using the routing node where the source routing node and the target routing node are located.

3. The method according to claim 1, characterized in that In a case where the values ​​of the plurality of bits in the first XOR result include non-zero values, determining the target routing node layer includes: Determine a bit whose value is 1 from the values ​​of the plurality of bits in order from high to low, to obtain a target bit; The routing node layer corresponding to the target value of the target bit is determined to obtain the target routing node layer.

4. The method according to claim 1, characterized in that: Determining a set of parent routing nodes from the target routing node layer includes: The binary values ​​of the plurality of routing nodes are calculated using the binary value of the source routing node, the total number of layers of the plurality of routing node layers, the number of layers where the target routing node layer is located, and a preset coefficient, wherein the preset coefficient is a natural number; The plurality of parent routing nodes corresponding to the binary values ​​of the plurality of routing nodes determined by the set are used to obtain the parent routing node set, wherein the plurality of parent routing nodes are all common routing nodes that are closest to the source routing node and the target routing node.

5. The method according to claim 4, characterized in that The binary values ​​of the plurality of routing nodes are calculated using the binary value of the source routing node, the total number of L routing node layers, the number of layers where the target routing node layer is located, and a preset coefficient, including: The binary values ​​of the plurality of routing nodes are calculated by the following formula: f=S^n*2 l-i-1 , wherein f is used to represent the binary value of the routing node, S is used to represent the binary value of the source routing node, l is used to represent the total number of layers of the L-layer routing node layer, i is used to represent the layer number of the target routing node layer, and n is used to represent the preset coefficient.

6. The method according to claim 1, characterized in that Before generating a target routing path between the source routing node and the target routing node based on the target parent routing node determined from the set of parent routing nodes, the method further includes one of the following: Randomly select a parent routing node from the multiple parent routing nodes in the parent routing node set to obtain the target parent routing node; Selecting a parent routing node in an idle state from the plurality of parent routing nodes in the parent routing node set to obtain the target parent routing node; A parent routing node having a network performance greater than a preset performance is selected from the multiple parent routing nodes in the parent routing node set to obtain the target parent routing node.

7. The method according to claim 1, characterized in that Generating a target routing path between the source routing node and the target routing node based on a target parent routing node determined from the set of parent routing nodes, comprising: Performing an XOR operation on the binary value of the source routing node and the binary value of the target parent routing node to obtain a second XOR result; Determine, from the plurality of bits in the second XOR result, bits with a value of 1 and bits with a value of 0 one by one in order from high to low bits; By determining the bits with a value of 1 and the bits with a value of 0 one by one from the plurality of bits in the second XOR result, a target routing path between the source routing node and the target routing node is generated.

8. The method according to claim 7, characterized in that Generating a target routing path between the source routing node and the target routing node by determining, one by one, bits with a value of 1 and bits with a value of 0 from a plurality of bits in the second XOR result, comprising: In the order of the bits with a value of 1 and the bits with a value of 0 determined from the second XOR result, inverting the bits in the source routing node corresponding to the bits with a value of 1 in the second XOR result to determine the first routing node to be routed; Determine a second routing node to be routed by the source routing node corresponding to the bit whose value in the second XOR result is 0, wherein the first routing node and the second routing node are both routing nodes in an upper routing node layer of the source routing node, and the first routing node and the second routing node are respectively in different routing node layers; generating a first routing path based on the source routing node, the first routing node, the second routing node, and the target parent routing node; The target routing path is generated by using the first routing path and the second routing path, wherein the second routing path is a routing path between the target parent routing node and the target routing node.

9. The method according to claim 8, characterized in that Before generating the target routing path by using the first routing path and the second routing path, the method further includes: Performing an XOR operation on the binary value of the target routing node and the binary value of the target parent routing node to obtain a third XOR result; Determine, from the plurality of bits in the third XOR result, bits with a value of 1 and bits with a value of 0 one by one in order from high to low bits; The second routing path is generated by determining bits with a value of 1 and bits with a value of 0 one by one from a plurality of bits in the third XOR result.

10. The method according to claim 9, characterized in that Generating the second routing path by determining bits with a value of 1 and bits with a value of 0 one by one from a plurality of bits in the third XOR result includes: In the order of the bits with a value of 1 and the bits with a value of 0 determined from the third XOR result, the bits in the target routing node corresponding to the bits with a value of 1 in the third XOR result are inverted to determine a third routing node of the target routing node; Determine a fourth routing node to be routed by the target routing node corresponding to the bit whose value in the third XOR result is 0, wherein the third routing node and the fourth routing node are both routing nodes in a lower routing node layer of the target routing node, and the third routing node and the fourth routing node are respectively in different routing node layers; The second routing path is generated based on the target parent routing node, the third routing node, the fourth routing node, and the target routing node.

11. A network topology structure, characterized in that: include: Multiple routing node layers, each routing node layer includes multiple routing nodes, and the corresponding routing nodes between every two routing node layers are bidirectionally connected; The target routing path between any source routing node and any target routing node in the multi-layer routing node layer is determined by the following steps: Performing an XOR operation on the binary value of the source routing node and the binary value of the target routing node in the multi-layer routing node layer to obtain a first XOR result; In the case where the values ​​of the multiple bits in the first XOR result include non-zero, determining a target routing node layer from the multi-layer routing node layers, wherein the target routing node layer is a routing node layer where a common parent routing node between the source routing node and the target routing node in the multi-layer routing node layers is located; Determine a set of parent routing nodes from the target routing node layer, wherein the set of parent routing nodes includes a plurality of common parent routing nodes between the source routing node and the target routing node; A target routing path between the source routing node and the target routing node is generated based on a target parent routing node determined from the set of parent routing nodes.

12. The structure according to claim 11, characterized in that The number of the multiple routing node layers and the multiple routing nodes are both determined based on the number of source routing nodes in the network topology structure, wherein the source routing nodes are terminal user devices.

13. The structure according to claim 11, characterized in that Each routing node in the i-th routing node layer in the multi-layer routing node layer is bidirectionally connected to at least two routing nodes in the i-1-th routing node layer; Each source routing node in the source routing node layer in the multi-layer routing node layer is bidirectionally connected to at least two of the source routing nodes, and each routing node in the target routing node layer is bidirectionally connected to at least two of the target routing nodes, wherein the source routing node layer is the routing node layer where the source routing node is located, and the target routing node layer is the routing node layer where the target routing node is located.

14. A device for generating a routing path, characterized in that: include: A first operation module, configured to perform an XOR operation on a binary value of a source routing node and a binary value of a target routing node to obtain a first XOR result, wherein the source routing node is any routing node in a multi-layer routing node layer, and the target routing node is any routing node in the multi-layer routing node layer; a first determining module, configured to determine a target routing node layer from the multi-layer routing node layer when the values ​​of the plurality of bits in the first XOR result include non-zero values, wherein the target routing node layer is a routing node layer where a common parent routing node between the source routing node and the target routing node in the multi-layer routing node layer is located; A second determining module, configured to determine a set of parent routing nodes from the target routing node layer, wherein the set of parent routing nodes includes a plurality of common parent routing nodes between the source routing node and the target routing node; The third determining module is used to generate a target routing path between the source routing node and the target routing node based on the target parent routing node determined from the parent routing node set.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 10 when executed by a processor.

17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Method for designing redundancy route in industry wireless communication network

    CN101325545A

  • Method, system and device for implementing dual-host routing and medium

    CN117155842A

  • Routing path determination method and device, electronic equipment and storage medium

    CN117240772A

  • Installation of cached downward paths based on upward data traffic in a non-storing low-power and lossy network

    US20160197829A1

Cited By

  • Three-level transmission network, data transmission method, device, equipment, medium and product

    CN121585593A