A routing method, communication network construction method, device, medium and product
By constructing a communication network containing twelve routing nodes and adopting preset node connection rules to ensure that the shortest network diameter between any two routing nodes is not greater than 2, the problem of increased data transmission delay in the Internet communication network is solved. Improved network performance.
Patent Information
- Application Number
- CN202411419476.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-10-12
AI Technical Summary
In existing Internet communication networks, with the explosive growth of data, the data transmission delay of switching devices increases, resulting in a decline in network performance.
By constructing a communication network containing twelve routing nodes and using preset node connection rules, it ensures that the shortest network diameter between any two routing nodes is not greater than 2, thereby optimizing routing communication.
It reduces the time delay of data transmission, improves the efficiency of routing communication, and reduces the data transmission delay of the network.
Smart Images

Figure CN118984294B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a routing method, a communication network construction method, equipment, medium and product. Background Art
[0002] With the rapid popularization and development of the Internet and the continuous deployment of satellite Internet constellation plans, more user terminals are connected to the network, and more Internet applications are derived for various fields of production and life, which has led to an explosive growth trend in the data on the Internet. Furthermore, with the development and application of optical fiber technology and intersatellite laser communication technology, the bottleneck of Internet data transmission has shifted to the switching devices of the Internet switching nodes, such as switches and routers; the core technology of these switching devices is switching technology, which includes two aspects: interconnection network and scheduling algorithm.
[0003] In order to improve the performance of data transmission and meet the explosive growth of Internet data transmission, the construction of an interconnected network is of utmost importance. Its construction goal is to connect a certain number of routing nodes to form an interconnected network at the lowest possible cost, reliably and efficiently. Among them, for a topological network structure with twelve nodes, the commonly used one is Figure 1 The standard double hexagonal topology network shown in FIG. 1 is a network with a minimum network diameter of 3, that is, the network diameter of the shortest routing path between any two nodes is less than or equal to 3. The larger the network diameter, the greater the network data transmission delay.
[0004] It can be seen that how to reduce the time delay of network data transmission is a problem that technical personnel in this field need to solve. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a routing method, a communication network construction method, a device, a medium and a product, which can reduce the shortest network diameter between any two routing nodes in a communication network containing twelve routing nodes, thereby reducing the time delay of data transmission and improving the efficiency of routing communication. The specific scheme is as follows:
[0006] In a first aspect, the present invention provides a routing method, comprising:
[0007] constructing a first six-node network and a second six-node network each including six routing nodes;
[0008] The routing nodes in the first six-node network and the second six-node network are connected based on a preset node connection rule to obtain a communication network including twelve routing nodes; wherein the preset node connection rule is a node connection rule for constraining that the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network is not greater than 2;
[0009] If routing communication is required between the first routing node and the second routing node in the communication network, a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node is searched from the communication network, and corresponding routing communication is performed according to the target routing path.
[0010] Optionally, the connecting the routing nodes in the first six-node network and the second six-node network based on a preset node connection rule to obtain a communication network including twelve routing nodes includes:
[0011] The six routing nodes in each of the first six-node network and the second six-node network are connected respectively based on the preset internal node connection rules, and then the routing nodes in the first six-node network are connected with the routing nodes in the second six-node network based on the preset external node connection rules to form a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is no more than 2.
[0012] Optionally, the connecting the six internal routing nodes in each of the first six-node network and the second six-node network based on a preset internal node connection rule includes:
[0013] The six routing nodes in each of the first six-node network and the second six-node network are connected end to end one by one in sequence, and then the first node and the fourth node, the second node and the sixth node, and the third node and the fifth node are connected in the first six-node network respectively, and the routing nodes that are relative nodes are connected in the second six-node network.
[0014] Optionally, the connecting the routing nodes in the first six-node network and the routing nodes in the second six-node network based on a preset external node connection rule to form a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is no more than 2 includes:
[0015] Divide the six routing nodes in each of the six-node networks into three groups of nodes; wherein the first group of nodes in the three groups of nodes includes the first node and the fourth node in the corresponding six-node network, the second group of nodes includes the second node and the third node in the corresponding six-node network, and the third group of nodes includes the fifth node and the sixth node in the corresponding six-node network;
[0016] Each group of nodes in the first six-node network is connected to a corresponding group of nodes in the second six-node network to form a communication network including twelve routing nodes and wherein the shortest network diameter between any two routing nodes is no greater than 2.
[0017] Optionally, the routing method further includes:
[0018] Corresponding node numbering information is configured for routing nodes in the first six-node network and the second six-node network, and the preset internal node connection rule and the preset external node connection rule are determined based on the node numbering information.
[0019] Optionally, the node number information of any routing node includes the network number of the six-node network where the any routing node is located and the node number of the any routing node.
[0020] Optionally, the network number and the node number are both binary numbers, wherein the process of determining the node number of any routing node includes: taking a binary value of a preset number of bits from a target binary number corresponding to any routing node to obtain the node number of any routing node;
[0021] Furthermore, the process of determining the target binary numbers corresponding to the six routing nodes in the same six-node network includes:
[0022] Configuring the corresponding target binary number for the first node in the same six-node network, and then performing a cyclic shift operation on the target binary number of the first node according to a preset cyclic shift direction, and using a new binary number obtained after each shift operation as the target binary number corresponding to other corresponding routing nodes in the same six-node network;
[0023] The preset cyclic shift direction is cyclic left shift or cyclic right shift.
[0024] Optionally, the determining the preset internal node connection rule and the preset external node connection rule based on the node number information includes:
[0025] Determining a first preset internal node connection rule corresponding to the first six-node network based on the node numbers in the first six-node network and the shift characteristics of the target binary numbers corresponding to the node numbers;
[0026] Determining a second preset internal node connection rule corresponding to the second six-node network based on the shift characteristics of the target binary number corresponding to the node number in the second six-node network and an XOR operation result of any two of the node numbers in the second six-node network;
[0027] The preset external node connection rule is determined based on the node numbers in the first six-node network and the node numbers in the second six-node network.
[0028] Optionally, searching the communication network for a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node includes:
[0029] Comparing the network number of the first routing node with the network number of the second routing node to obtain a corresponding comparison result;
[0030] Performing an XOR operation on the node number of the first routing node and the node number of the second routing node to obtain a corresponding XOR operation result;
[0031] Determine a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node based on the comparison result, the XOR operation result, and the number of preset binary values in the XOR operation result;
[0032] The preset binary value is 1 or 0.
[0033] Optionally, the node-connecting each group of nodes in the first six-node network with a corresponding group of nodes in the second six-node network to form a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is no more than 2 comprises:
[0034] Node connections are respectively performed between the first group of nodes of the first six-node network and the first group of nodes of the second six-node network, between the second group of nodes of the first six-node network and the second group of nodes of the second six-node network, and between the third group of nodes of the first six-node network and the third group of nodes of the second six-node network to form a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is no more than 2.
[0035] Optionally, the node-connecting each group of nodes in the first six-node network with a corresponding group of nodes in the second six-node network to form a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is no more than 2 comprises:
[0036] Node connections are respectively made between the first group of nodes of the first six-node network and the first group of nodes of the second six-node network, between the second group of nodes of the first six-node network and the third group of nodes of the second six-node network, and between the third group of nodes of the first six-node network and the second group of nodes of the second six-node network to form a communication network including twelve routing nodes and in which the shortest network diameter between any two routing nodes is no more than 2.
[0037] Optionally, when connecting any group of nodes in the first six-node network with a corresponding group of nodes in the second six-node network, the corresponding connection method includes connecting the previous node and the next node in any group of nodes one-to-one with the previous node and the next node in the corresponding group of nodes, or connecting the previous node and the next node in any group of nodes one-to-one with the next node and the previous node in the corresponding group of nodes.
[0038] In a second aspect, the present invention provides a communication network construction method, comprising:
[0039] constructing a first six-node network and a second six-node network each including six routing nodes;
[0040] The routing nodes in the first six-node network and the second six-node network are connected based on a preset node connection rule to obtain a communication network including twelve routing nodes; wherein the preset node connection rule is a node connection rule for constraining that the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network is not greater than 2.
[0041] In a third aspect, the present invention provides an electronic device, comprising:
[0042] Memory for storing computer programs;
[0043] A processor is used to execute the computer program to implement the aforementioned method.
[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the aforementioned method when executed by a processor.
[0045] In a fifth aspect, the present invention provides a computer program product, comprising a computer program / instruction, which implements the aforementioned method when executed by a processor.
[0046] In the present invention, a first six-node network and a second six-node network, each containing six routing nodes, are constructed; the routing nodes in the first six-node network and the second six-node network are connected based on preset node connection rules to obtain a communication network containing twelve routing nodes; wherein the preset node connection rules are node connection rules for constraining that the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network is not greater than 2; if routing communication is required between the first routing node and the second routing node in the communication network, a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node is searched from the communication network, and corresponding routing communication is performed according to the target routing path.
[0047] Beneficial effect: The present invention pre-constructs a first six-node network including six routing nodes and a second six-node network including six routing nodes, and connects the routing nodes in the first six-node network and the second six-node network through a node connection rule for constraining that the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network is not greater than 2, thereby obtaining a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is not greater than 2. In this way, the present invention reduces the time delay of data transmission and improves the efficiency of routing communication by reducing the shortest network diameter between any two routing nodes in the communication network. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 A standard double hexagonal topology network provided by an embodiment of the present invention;
[0050] Figure 2 A flow chart of a routing method provided by an embodiment of the present invention;
[0051] FIG3 (a) is a schematic diagram of internal node connections of a six-node network provided by an embodiment of the present invention;
[0052] FIG3( b ) is another schematic diagram of internal node connections of a six-node network provided by an embodiment of the present invention;
[0053] Figure 4 A schematic diagram of external node connections of a first six-node network provided by an embodiment of the present invention;
[0054] Figure 5 A schematic diagram of external node connections of a second six-node network provided by an embodiment of the present invention;
[0055] Figure 6 A schematic diagram of external node connections of a third six-node network provided by an embodiment of the present invention;
[0056] Figure 7 A schematic diagram of external node connections of a fourth six-node network provided by an embodiment of the present invention;
[0057] Figure 8 A schematic diagram of a binary number cyclic right shift provided by an embodiment of the present invention;
[0058] Fig. 9 A schematic diagram of a binary number cyclic left shift provided by an embodiment of the present invention;
[0059] Fig.10 A specific communication network schematic diagram provided for an embodiment of the present invention;
[0060] Fig.11 A routing path search flow chart provided by an embodiment of the present invention;
[0061] Fig.12 A flow chart of a communication network construction method provided by an embodiment of the present invention;
[0062] Fig.13 A structural diagram of an electronic device provided in an embodiment of the present invention.
[0063] Reference numerals:
[0064] 1 - the first node in a six-node network; 2 - the second node in a six-node network; 3 - the third node in a six-node network; 4 - the fourth node in a six-node network; 5 - the fifth node in a six-node network; 6 - the sixth node in a six-node network. DETAILED DESCRIPTION
[0065] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0066] For a topological network structure with twelve nodes, the commonly used one is Figure 1 The standard double hexagonal topology network shown in the figure has a shortest network diameter of 3, that is, the network diameter of the shortest routing path between any two nodes is less than or equal to 3. Since the larger the network diameter, the greater the network data transmission delay. To this end, the present invention provides a routing method, which reduces the time delay of data transmission and improves the efficiency of routing communication by reducing the shortest network diameter between any two routing nodes in a communication network containing twelve routing nodes.
[0067] See also Figure 2 As shown, an embodiment of the present invention provides a routing method, including:
[0068] Step S11: construct a first six-node network and a second six-node network, each of which includes six routing nodes.
[0069] In the embodiment of the present invention, a first six-node network including six routing nodes and a second six-node network including six routing nodes are constructed. A routing node is any system or a group of units with communication requirements, and a routing node can be a processor, a processor and a memory, a graphics processing unit, a storage controller, an I / O (Input / Output) interface, etc., which are not specifically limited here.
[0070] Step S12: connecting the routing nodes in the first six-node network and the second six-node network based on a preset node connection rule to obtain a communication network including twelve routing nodes; wherein the preset node connection rule is a node connection rule for constraining that the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network is no more than 2.
[0071] In an embodiment of the present invention, after the first six-node network and the second six-node network are constructed, the routing nodes in the first six-node network and the second six-node network are connected based on a node connection rule that constrains the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network to be no greater than 2, so as to obtain a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes to be no greater than 2.
[0072] Specifically, the six routing nodes in the first six-node network and the second six-node network are connected respectively based on the preset internal node connection rules, and then the routing nodes in the first six-node network are connected to the routing nodes in the second six-node network based on the preset external node connection rules to form a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is no more than 2.
[0073] Among them, for the preset internal node connection rule, the six routing nodes in the first six-node network and the second six-node network are connected end to end one by one, and then the first node and the fourth node, the second node and the sixth node, and the third node and the fifth node are connected in the first six-node network, and the routing nodes that are mutually opposite nodes are connected in the second six-node network. Taking Figure 3 as an example, Figure 3 (a) connects the six routing nodes in the first six-node network end to end one by one, and connects the first node and the fourth node, the second node and the sixth node, and the third node and the fifth node in the first six-node network; Figure 3 (b) connects the six routing nodes in the second six-node network end to end one by one, and connects the first node and the fourth node, the second node and the fifth node, and the third node and the sixth node in the second six-node network. It should be noted that Figure 3 is only one of the specific situations that meet the preset internal node connection rule. Of course, there are other situations, which will not be explained in detail here.
[0074] Among them, for the preset external node connection rules, the six routing nodes in each six-node network are first divided into three groups of nodes; wherein the first group of nodes in the three groups of nodes includes the first node and the fourth node in the corresponding six-node network, the second group of nodes includes the second node and the third node in the corresponding six-node network, and the third group of nodes includes the fifth node and the sixth node in the corresponding six-node network; then, each group of nodes in the first six-node network is connected to the corresponding group of nodes in the second six-node network respectively.
[0075] According to one embodiment, Figure 4 and Figure 5 As shown, for connecting each group of nodes in the first six-node network with a corresponding group of nodes in the second six-node network, the first group of nodes in the first six-node network and the first group of nodes in the second six-node network, the second group of nodes in the first six-node network and the second group of nodes in the second six-node network, and the third group of nodes in the first six-node network and the third group of nodes in the second six-node network are connected. It should be noted that Figure 4 and Figure 5 These are just two specific cases that meet the preset external node connection rules. Of course, there are other cases, which will not be explained in detail here.
[0076] According to another embodiment, Figure 6 and Figure 7As shown, for connecting each group of nodes in the first six-node network with a corresponding group of nodes in the second six-node network, it includes: connecting the first group of nodes in the first six-node network with the first group of nodes in the second six-node network, connecting the second group of nodes in the first six-node network with the third group of nodes in the second six-node network, and connecting the third group of nodes in the first six-node network with the second group of nodes in the second six-node network. It should be noted that Figure 6 and Figure 7 These are just two specific cases that meet the preset external node connection rules. Of course, there are other cases, which will not be explained in detail here.
[0077] Combination Figures 4 to 7 It can be found that when any group of nodes in the first six-node network is connected to a corresponding group of nodes in the second six-node network, the corresponding connection method includes connecting the previous node and the next node in any group of nodes one-to-one with the previous node and the next node in the corresponding group of nodes, or connecting the previous node and the next node in any group of nodes one-to-one with the next node and the previous node in the corresponding group of nodes.
[0078] by Figure 4 Taking an example for detailed description, when the first group of nodes of the first six-node network is node-connected with the first group of nodes of the second six-node network, the first node of the first group of nodes of the first six-node network is connected to the fourth node of the first group of nodes of the second six-node network, and the fourth node of the first group of nodes of the first six-node network is connected to the first node of the first group of nodes of the second six-node network; and when the second group of nodes of the first six-node network is node-connected with the second group of nodes of the second six-node network, the second node of the second group of nodes of the first six-node network is connected to the second node of the second group of nodes of the second six-node network, and the third node of the second group of nodes of the first six-node network is connected to the third node of the second group of nodes of the second six-node network; and when the third group of nodes of the first six-node network is node-connected with the third group of nodes of the second six-node network, the fifth node of the third group of nodes of the first six-node network is connected to the fifth node of the third group of nodes of the second six-node network, and the sixth node of the third group of nodes of the first six-node network is connected to the sixth node of the third group of nodes of the second six-node network.
[0079] by Figure 6Taking an example to explain in detail, when the first group of nodes of the first six-node network is connected to the first group of nodes of the second six-node network, the first node in the first group of nodes of the first six-node network is connected to the fourth node in the first group of nodes of the second six-node network, and the fourth node in the first group of nodes of the first six-node network is connected to the first node in the first group of nodes of the second six-node network; and when the second group of nodes of the first six-node network is connected to the third group of nodes of the second six-node network, the second node in the second group of nodes of the first six-node network is connected to the sixth node in the third group of nodes of the second six-node network, and the third node in the second group of nodes of the first six-node network is connected to the fifth node in the third group of nodes of the second six-node network; and when the third group of nodes of the first six-node network is connected to the second group of nodes of the second six-node network, the fifth node in the third group of nodes of the first six-node network is connected to the third node in the second group of nodes of the second six-node network, and the sixth node in the third group of nodes of the first six-node network is connected to the second node in the second group of nodes of the second six-node network. In this way, through Figure 6 The node connection relationship can make the shortest network diameter between any two routing nodes in the communication network no greater than 2. By reducing the shortest network diameter, the efficiency of routing communication is improved and the time delay of routing communication is reduced.
[0080] Furthermore, the preset internal node connection rules and the preset external node connection rules can be determined by configuring corresponding node numbering information for the routing nodes in the first six-node network and the second six-node network, and determining the preset internal node connection rules and the preset external node connection rules based on the node numbering information.
[0081] The node numbering information of any routing node in the communication network includes the network number of the six-node network where any routing node is located and the node number of any routing node. That is, different routing nodes in the communication network correspond to different node numbering information; and different six-node networks correspond to different network numbers, different routing nodes in the same six-node network correspond to the same network number, and different routing nodes in the same six-node network correspond to different node numbers.
[0082] In a specific embodiment, the network number and the node number in the node numbering information are both binary numbers. Among them, the number of binary digits of the network number can be determined based on the number of six-node networks in the communication network. For example, if the number of six-node networks in the communication network is two, the number of binary digits of the network number can be one. In this case, the network number can be selected from 0 and 1 to distinguish different six-node networks. Correspondingly, the number of binary digits of the node number can be determined based on the number of routing nodes in the same six-node network. For example, if the number of routing nodes in the same six-node network is six, the number of binary digits of the node number can be three, thereby distinguishing different routing nodes in the same six-node network by three binary digits.
[0083] Among them, the process of determining the node number of any routing node includes: taking out a preset number of binary values from the target binary number corresponding to any routing node to obtain the node number of any routing node. It should be noted that for taking out the preset number of binary values, it is necessary to take out a continuous preset number of binary values from the target binary number corresponding to any routing node. For example, when the node number is a three-digit binary number, the target binary number is a six-digit binary number, and the preset number of bits is three; and the six routing nodes in the same six-node network each correspond to a target binary number, so that the node number of any routing node is obtained by taking out three consecutive binary values from the target binary number corresponding to any routing node; wherein the three consecutive binary values can be the binary values of the first three digits in the target binary number, or the binary values of the last three digits in the target binary number, or the binary values of the middle three digits in the target binary number.
[0084] Furthermore, the process of determining the target binary numbers corresponding to the six routing nodes in the same six-node network includes: configuring the corresponding target binary number for the first node in the same six-node network, and then performing a cyclic shift operation on the target binary number of the first node according to a preset cyclic shift direction, and configuring the new binary number obtained after each shift operation as the target binary number corresponding to other corresponding routing nodes in the same six-node network; wherein the preset cyclic shift direction is a cyclic left shift or a cyclic right shift.
[0085] In two six-node networks, the same preset cyclic shift direction corresponds to different target binary number configuration directions. For example, if the preset cyclic shift direction is cyclic right shift, the configuration direction of the target binary number in the first six-node network is clockwise, and the configuration direction of the target binary number in the second six-node network is counterclockwise.
[0086] by Figure 8For example, if the target binary number is a six-bit binary number and the node number is a three-bit binary number, then after configuring the corresponding target binary number 000111 for the first node in the same six-node network, the target binary number of the first node is circularly shifted by one position according to the circular right shift, and the new six-bit binary number obtained after each shift is configured as the target binary number corresponding to other corresponding routing nodes in the same six-node network. For the first six-node network, the new six-bit binary number obtained after each shift is configured as the target binary number corresponding to other corresponding routing nodes in the clockwise direction of the first six-node network; for the second six-node network, the new six-bit binary number obtained after each shift is configured as the target binary number corresponding to other corresponding routing nodes in the counterclockwise direction of the second six-node network. Further, after configuring the corresponding target binary numbers for the six routing nodes in the same six-node network, the node number of any routing node is obtained by taking the binary values of the upper three positions from the target binary number corresponding to any routing node.
[0087] by Fig. 9 For example, if the target binary number is a six-bit binary number and the node number is a three-bit binary number, then after configuring the corresponding target binary number 000111 for the first node in the same six-node network, the target binary number of the first node is circularly shifted by one position according to the circular left shift, and the new six-bit binary number obtained after each shift is configured as the target binary number corresponding to other corresponding routing nodes in the same six-node network. For the first six-node network, the new six-bit binary number obtained after each shift can be configured as the target binary number corresponding to other corresponding routing nodes in the counterclockwise direction of the first six-node network; for the second six-node network, the new six-bit binary number obtained after each shift can be configured as the target binary number corresponding to other corresponding routing nodes in the clockwise direction of the second six-node network. Further, after configuring the corresponding target binary numbers for the six routing nodes in the same six-node network, the node number of any routing node is obtained by taking the binary values of the upper three positions from the target binary number corresponding to any routing node.
[0088] According to one of the embodiments, preset internal node connection rules and preset external node connection rules are determined based on node number information, specifically, the first preset internal node connection rule corresponding to the first six-node network is determined based on the node numbers in the first six-node network and the shift characteristics of the target binary numbers corresponding to the node numbers; the second preset internal node connection rule corresponding to the second six-node network is determined based on the shift characteristics of the target binary numbers corresponding to the node numbers in the second six-node network and the XOR operation result of any two node numbers in the second six-node network; the preset external node connection rule is determined based on the node numbers in the first six-node network and the node numbers in the second six-node network.
[0089] by Fig.10 For example, for the first preset internal node connection rule corresponding to the first six-node network, in the first six-node network, the routing node with node number 111 is directly connected to the routing node with node number 000, the routing node with node number 110 is directly connected to the routing node with node number 011, the routing node with node number 100 is directly connected to the routing node with node number 001, and the target binary number corresponding to the node number is directly connected to the two same routing nodes by shifting one bit to the left or one bit to the right. For the second preset internal node connection rule corresponding to the second six-node network, the target binary number corresponding to the node number is directly connected to the two same routing nodes by shifting one bit to the left or one bit to the right, and the two routing nodes whose XOR operation result of the node number is 111 are directly connected, for example, the two routing nodes with node number 000 and node number 111 are directly connected. For the preset external node connection rules, the routing node with node number 000 in the first six-node network and the routing node with node number 111 in the second six-node network are directly connected, the routing node with node number 111 in the first six-node network and the routing node with node number 000 in the second six-node network are directly connected, and for other routing nodes in the first six-node network and the second six-node network except the routing nodes with node numbers 000 and 111, two routing nodes with the same node number are directly connected, for example, the routing node with node number 110 in the first six-node network and the routing node with node number 110 in the second six-node network are directly connected.
[0090] It should be noted that the communication network constructed by the above method includes a total of twelve routing nodes, the out-degree and in-degree of each routing node are both 4, and the shortest network diameter between any two routing nodes is less than or equal to 2.
[0091] Step S13: If routing communication is required between the first routing node and the second routing node in the communication network, search the communication network for a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node, and perform corresponding routing communication according to the target routing path.
[0092] In an embodiment of the present invention, after the communication network is constructed, if routing communication is required between a first routing node and a second routing node in the communication network, a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node is searched from the communication network based on the node numbering information of the first routing node and the node numbering information of the second routing node, and corresponding routing communication is performed between the first routing node and the second routing node according to the target routing path.
[0093] Beneficial effect: The present invention pre-constructs a first six-node network including six routing nodes and a second six-node network including six routing nodes, and connects the routing nodes in the first six-node network and the second six-node network through a node connection rule for constraining that the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network is not greater than 2, thereby obtaining a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is not greater than 2. In this way, the present invention reduces the time delay of data transmission and improves the efficiency of routing communication by reducing the shortest network diameter between any two routing nodes in the communication network.
[0094] Based on the previous embodiment, it can be seen that the previous embodiment describes the complete process of building a communication network and routing communication. Next, the embodiment of the present invention will be described in detail. Fig.10 Taking the communication network of as an example, how to search for the target routing path corresponding to the shortest network diameter between the first routing node and the second routing node in the communication network is described in detail. Fig.11 As shown, an embodiment of the present invention provides a process of searching a routing path, including:
[0095] Step S21: compare the network number of the first routing node with the network number of the second routing node to obtain a corresponding comparison result.
[0096] In the embodiment of the present invention, the network number of the first routing node and the network number of the second routing node are compared to obtain a comparison result indicating whether the network number of the first routing node and the network number of the second routing node are the same.
[0097] For example, if the network number of the first routing node and the network number of the second routing node are the same and are 0, it indicates that the first routing node and the second routing node are both located in the first six-node network of the communication network; if the network number of the first routing node and the network number of the second routing node are the same and are 1, it indicates that the first routing node and the second routing node are both located in the second six-node network of the communication network; if the network number of the first routing node and the network number of the second routing node are different, it indicates that the first routing node and the second routing node are located in different six-node networks in the communication network.
[0098] Step S22: performing an XOR operation on the node number of the first routing node and the node number of the second routing node to obtain a corresponding XOR operation result.
[0099] In this embodiment, a bitwise XOR operation is performed on the node number of the first routing node and the node number of the second routing node to obtain a corresponding XOR operation result. Taking the node number of the first routing node as 110 and the node number of the second routing node as 100 as an example, the XOR operation result between the node number of the first routing node and the node number of the second routing node is 010.
[0100] Step S23, determining a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node based on the comparison result, the XOR operation result, and the number of preset binary values in the XOR operation result; wherein the preset binary value is 1 or 0.
[0101] In this embodiment, the number of preset binary values in the XOR operation result is counted, and based on the comparison result, the XOR operation result, and the number of preset binary values in the XOR operation result, a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node is searched from the communication network, and then corresponding routing communication is performed between the first routing node and the second routing node according to the target routing path. The preset binary value is 1 or 0.
[0102] Taking the preset binary value of 1 as an example, when the comparison result indicates that the first routing node and the second routing node are both located in the first six-node network of the communication network, the following four cases can be classified based on the number of 1s in the XOR operation result:
[0103] For the first case, if the number of 1s in the XOR operation result is 0, it indicates that the first routing node and the second routing node are the same routing node, and the search for the target routing path ends.
[0104] For the second case, if the number of 1s in the XOR operation result is 1, it indicates that the first routing node and the second routing node are adjacent routing nodes in the first six-node network, and the path directly from the first routing node to the second routing node is determined as the target routing path corresponding to the shortest network diameter, that is, the first routing node can reach the second routing node through one-step routing.
[0105] For the third case, in one specific implementation, if the number of 1s in the XOR operation result is 2, then when the XOR operation result is 101, it indicates that the first routing node and the second routing node are directly connected in the first six-node network, and the path from the first routing node directly to the second routing node is determined as the target routing path corresponding to the shortest network diameter, that is, the first routing node can reach the second routing node through one-step routing. In another specific implementation, if the number of 1s in the XOR operation result is 2, then when the XOR operation result is not 101, that is, the XOR operation result is 110 or 011, it indicates that the first routing node can reach the second routing node by taking two steps in the clockwise or counterclockwise direction in the first six-node network, that is, the first routing node can reach the second routing node through two-step routing; wherein, whether it is clockwise or counterclockwise, it can be determined according to whether the target binary number corresponding to the first routing node is obtained by cyclically shifting two bits to the left or cyclically shifting two bits to the right to obtain the target binary number corresponding to the second routing node; wherein, cyclic left shift corresponds to the counterclockwise direction, and cyclic right shift corresponds to the clockwise direction.
[0106] For the fourth case, in a specific implementation, if the number of 1s in the XOR operation result is 3, when the node number of the first routing node is 000 or 111, it indicates that the first routing node and the second routing node are directly connected in the first six-node network, and the path from the first routing node directly to the second routing node is determined as the target routing path corresponding to the shortest network diameter, that is, the first routing node can reach the second routing node through one-step routing. In another specific implementation, if the number of 1s in the XOR operation result is 3, when the node number of the first routing node is not 000 or 111, the node number of the first routing node and the specified binary number are bitwise XORed, and the corresponding intermediate routing node is determined in the first six-node network based on the bitwise XOR result, and then the path from the first routing node through the intermediate routing node to the second routing node is determined as the target routing path corresponding to the shortest network diameter, that is, the first routing node can reach the second routing node through two-step routing; wherein, the specified binary number is 101 or 010, and 101 and 010 are two binary numbers obtained by splitting 111.
[0107] Taking the node number of the first routing node as 100 and the node number of the second routing node as 011 as an example, the XOR operation result of the node number of the first routing node and the node number of the second routing node is 111, wherein the number of 1s in the XOR operation result is 3, and the node number of the first routing node is not 000 or 111. At this time, the node number 100 of the first routing node is bitwise XORed with the specified binary number 101 or 010 to obtain the bitwise XOR result 001 or 110, and then the bitwise XOR result is used as the node number to determine the corresponding intermediate routing node from the first six-node network, and the path from the first routing node via the intermediate routing node to the second routing node is determined as the target routing path corresponding to the shortest network diameter.
[0108] Taking the preset binary value of 1 as an example, when the comparison result indicates that the first routing node and the second routing node are both located in the second six-node network of the communication network, the following four cases can be classified based on the number of 1s in the XOR operation result:
[0109] For the first case, if the number of 1s in the XOR operation result is 0, it indicates that the first routing node and the second routing node are the same routing node, and the search for the target routing path ends.
[0110] For the second case, if the number of 1s in the XOR operation result is 1, it indicates that the first routing node and the second routing node are adjacent routing nodes in the second six nodes, and the path directly from the first routing node to the second routing node is determined as the target routing path corresponding to the shortest network diameter, that is, the first routing node can reach the second routing node through one-step routing.
[0111] For the third case, if the number of 1s in the XOR operation result is 2, then the target binary number corresponding to the first routing node can be obtained by cyclically shifting left by two bits or cyclically shifting right by two bits to obtain the target binary number corresponding to the second routing node. In a specific embodiment, if the target binary number corresponding to the first routing node can be obtained by cyclically shifting left by two bits to obtain the target binary number corresponding to the second routing node, then it is possible to reach the second routing node by walking two steps clockwise from the first routing node in the second six-node network; it is also possible to reach the relative node of the first routing node directly connected to it from the first routing node in the second six-node network, and then walk one step counterclockwise from the relative node of the first routing node to reach the second routing node; it is also possible to reach the relative node of the second routing node from the first routing node in the second six-node network and then reach the second routing node directly connected to it from the relative node of the second routing node. In another specific implementation, if the target binary number corresponding to the first routing node can be obtained by cyclically shifting right by two bits to obtain the target binary number corresponding to the second routing node, then the second routing node can be reached by walking two steps counterclockwise from the first routing node in the second six-node network; or the relative node of the first routing node can be reached directly from the first routing node in the second six-node network, and then the relative node of the first routing node can be reached by walking one step clockwise to the second routing node; or the relative node of the second routing node can be reached directly from the first routing node in the second six-node network. The relative node of the second routing node can be reached by walking one step clockwise to the relative node of the second routing node. It can be found that when the number of 1s in the XOR operation result is 2, the first routing node can reach the second routing node by two steps of routing.
[0112] For the fourth case, if the number of 1s in the XOR operation result is 3, it indicates that the first routing node and the second routing node are directly connected in the second six-node network, and the path from the first routing node directly to the second routing node is determined as the target routing path corresponding to the shortest network diameter, that is, the first routing node can reach the second routing node through one-step routing.
[0113] Taking the preset binary value of 1 as an example, when the comparison result indicates that the first routing node and the second routing node are located in different six-node networks of the communication network, the node number of the first routing node and the node number of the second routing node can be first divided into two cases, and then each case is further divided based on the number of 1s in the XOR operation result. The specific division is as follows:
[0114] For the first case, when the node number of the first routing node or the node number of the second routing node is 111 or 000, the number of 1s in the XOR operation result between the node number of the first routing node and the node number of the second routing node can be subdivided into the following four cases:
[0115] In the first specific implementation, if the number of 1s in the XOR operation result is 3, it indicates that the first routing node and the second routing node are directly connected across different six-node networks in the communication network, and the path from the first routing node directly to the second routing node is determined as the target routing path corresponding to the shortest network diameter, that is, the first routing node can reach the second routing node through one-step routing.
[0116] In the second specific implementation, if the number of 1s in the XOR operation result is 0, the node number representing the first routing node is the same as the node number of the second routing node. At this time, you can directly reach the relative node of the first routing node in the same six-node network from the first routing node, and then directly reach the second routing node in a different six-node network from the relative node of the first routing node across the network; you can also directly reach the relative node of the second routing node in a different six-node network from the first routing node across the network, and then directly reach the second routing node in the same six-node network from the relative node of the second routing node. It can be found that the first routing node can reach the second routing node through two-step routing.
[0117] In a third specific implementation, if the node number of the first routing node is 111 or 000, and the node number of the second routing node is not 111 or 000, then first find an intermediate routing node corresponding to the node number of the second routing node from the six-node network where the first routing node is located, that is, the network number of the intermediate routing node is the same as the network number of the first routing node, and the node number of the intermediate routing node is the same as the node number of the second routing node. Then determine whether the first routing node is directly connected to the intermediate routing node in the same six-node network. If directly connected, you can first directly reach the intermediate routing node in the same six-node network from the first routing node, and then directly reach the second routing node in a different six-node network from the intermediate routing node across the network. If they are not directly connected, the node number of the first routing node and 111 are bitwise XORed to obtain the bitwise XOR result, and the intermediate routing node corresponding to the bitwise XOR result is found from the six-node network where the second routing node is located, that is, the network number of the intermediate routing node is the same as the network number of the second routing node, and the node number of the intermediate routing node is the same as the bitwise XOR result. At this time, you can first cross the network from the first routing node to directly reach the intermediate routing node in a different six-node network, and then directly reach the second routing node in the same six-node network from the intermediate routing node. It can be found that the first routing node can reach the second routing node through two-step routing.
[0118] In a fourth specific implementation, if the node number of the first routing node is not 111 or 000, and the node number of the second routing node is 111 or 000, first perform bitwise XOR on the node number of the second routing node and 111 to obtain a bitwise XOR result, and find an intermediate routing node corresponding to the bitwise XOR result from the six-node network where the first routing node is located, that is, the network number of the intermediate routing node is the same as the network number of the first routing node, and the node number of the intermediate routing node is the same as the bitwise XOR result. Then determine whether the first routing node is directly connected to the intermediate routing node in the same six-node network. If directly connected, you can first directly reach the intermediate routing node in the same six-node network from the first routing node, and then directly reach the second routing node in a different six-node network from the intermediate routing node across the network. If they are not directly connected, first find the intermediate routing node corresponding to the node number of the first routing node from the six-node network where the second routing node is located, that is, the network number of the intermediate routing node is the same as the network number of the second routing node, and the node number of the intermediate routing node is the same as the node number of the first routing node. At this time, you can first directly reach the intermediate routing node in a different six-node network from the first routing node across the network, and then directly reach the second routing node in the same six-node network from the intermediate routing node. It can be found that the first routing node can reach the second routing node through two steps of routing.
[0119] For the second case, when the node number of the first routing node and the node number of the second routing node are not 111 or 000, the number of 1s in the XOR operation result between the node number of the first routing node and the node number of the second routing node can be subdivided into the following two cases:
[0120] In the first specific implementation, if the number of 1s in the XOR operation result is 0, the node number representing the first routing node is the same as the node number of the second routing node, and the first routing node is directly connected to the second routing node across the network, that is, the first routing node can directly reach the second routing node located in a different six-node network. At this time, the first routing node can reach the second routing node through one-step routing.
[0121] In the second specific implementation, if the number of 1s in the XOR operation result is not 0, then first find the intermediate routing node corresponding to the node number of the second routing node from the six-node network where the first routing node is located, that is, the network number of the intermediate routing node is the same as the network number of the first routing node, and the node number of the intermediate routing node is the same as the node number of the second routing node. Then determine whether the first routing node is directly connected to the intermediate routing node located in the same six-node network. If directly connected, the intermediate routing node located in the same six-node network can be directly reached from the first routing node, and then the second routing node located in a different six-node network can be directly reached from the intermediate routing node across the network. If not directly connected, find the intermediate routing node corresponding to the node number of the first routing node from the six-node network where the second routing node is located, that is, the network number of the intermediate routing node is the same as the network number of the second routing node, and the node number of the intermediate routing node is the same as the node number of the first routing node, then the intermediate routing node located in a different six-node network can be directly reached from the first routing node across the network, and then the second routing node located in the same six-node network can be directly reached from the intermediate routing node. It can be found that in this case, the first routing node can reach the second routing node through two steps of routing.
[0122] Beneficial effects: The embodiment of the present invention configures corresponding node number information including network number and node number for the routing nodes in the first six-node network and the second six-node network through the characteristics of binary number cyclic shift, and determines the internal node connection rule and the external node connection rule based on the node number information, so as to connect the routing nodes in the first six-node network and the second six-node network through the internal node connection rule and the external node connection rule used to constrain the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network to be no more than 2, thereby obtaining a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes to be no more than 2; in this way, the embodiment of the present invention reduces the time delay of data transmission and improves the efficiency of routing communication by reducing the shortest network diameter between any two routing nodes in the communication network. In addition, the embodiment of the present invention configures the corresponding routing path search rule based on the node number information, so as to easily and quickly find the target routing path corresponding to the shortest network diameter between any two routing nodes by comparing the network numbers of any two routing nodes in the communication network and performing the XOR operation of the node numbers.
[0123] See also Fig.12 As shown, an embodiment of the present invention provides a communication network construction method, including:
[0124] Step S31: construct a first six-node network and a second six-node network, each of which includes six routing nodes.
[0125] Step S32: connecting the routing nodes in the first six-node network and the second six-node network based on a preset node connection rule to obtain a communication network including twelve routing nodes; wherein the preset node connection rule is a node connection rule for constraining that the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network is no more than 2.
[0126] Since the embodiment of the communication network construction method corresponds to the above-mentioned embodiment, the embodiment of the communication network construction method please refer to the embodiment description of the above-mentioned routing method part, which will not be repeated here.
[0127] Beneficial effect: The present invention pre-constructs a first six-node network including six routing nodes and a second six-node network including six routing nodes, and connects the routing nodes in the first six-node network and the second six-node network through a node connection rule for constraining that the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network is not greater than 2, thereby obtaining a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is not greater than 2. In this way, the present invention reduces the time delay of data transmission and improves the efficiency of routing communication by reducing the shortest network diameter between any two routing nodes in the communication network.
[0128] Furthermore, the present application also discloses an electronic device. Fig.13 It is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device may specifically include: at least one processor 11, at least one memory 12, a power supply 13, a communication interface 14, an input and output interface 15 and a communication bus 16. Among them, the memory 12 is used to store a computer program, and the computer program is loaded and executed by the processor 11 to implement the relevant steps in the routing method or communication network construction method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.
[0129] In this embodiment, the power supply 13 is used to provide working voltage for each hardware device on the electronic device; the communication interface 14 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 15 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0130] In addition, the memory 12, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 121, a computer program 122, etc., and the storage method can be temporary storage or permanent storage.
[0131] The operating system 121 is used to manage and control various hardware devices on the electronic device and the computer program 122, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the routing method or communication network construction method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 122 can further include a computer program that can be used to complete other specific tasks.
[0132] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed routing method or communication network construction method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0133] Furthermore, the present application also discloses a computer program product, including a computer program / instruction; wherein, when the computer program / instruction is executed by a processor, the routing method or communication network construction method disclosed above is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0134] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0135] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0136] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0137] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0138] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A routing method, characterized in that: include: constructing a first six-node network and a second six-node network each including six routing nodes; The routing nodes in the first six-node network and the second six-node network are connected based on a preset node connection rule to obtain a communication network including twelve routing nodes; wherein the preset node connection rule is a node connection rule for constraining that the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network is not greater than 2; If routing communication is required between a first routing node and a second routing node in the communication network, searching the communication network for a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node, and performing corresponding routing communication according to the target routing path; The connecting the routing nodes in the first six-node network and the second six-node network based on the preset node connection rule to obtain a communication network including twelve routing nodes includes: The six routing nodes in each of the first six-node network and the second six-node network are connected respectively based on a preset internal node connection rule, and then the routing nodes in the first six-node network are connected with the routing nodes in the second six-node network based on a preset external node connection rule to form a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is no more than 2; The preset internal node connection rule includes: connecting the six internal routing nodes in the first six-node network and the second six-node network one by one in sequence, and then connecting the first node and the fourth node, the second node and the sixth node, and the third node and the fifth node in the first six-node network, and connecting the routing nodes that are relative to each other in the second six-node network; Wherein, the preset external node connection rule includes: dividing the six routing nodes in each of the six-node networks into three groups of nodes; wherein the first group of nodes in the three groups of nodes includes the first node and the fourth node in the corresponding six-node network, the second group of nodes includes the second node and the third node in the corresponding six-node network, and the third group of nodes includes the fifth node and the sixth node in the corresponding six-node network; Node connections are respectively made between each group of nodes in the first six-node network and a corresponding group of nodes in the second six-node network.
2. The routing method according to claim 1, characterized in that: Also includes: Corresponding node numbering information is configured for routing nodes in the first six-node network and the second six-node network, and the preset internal node connection rule and the preset external node connection rule are determined based on the node numbering information.
3. The routing method according to claim 2, characterized in that: The node number information of any routing node includes the network number of the six-node network where the any routing node is located and the node number of the any routing node.
4. The routing method according to claim 3, characterized in that: The network number and the node number are both binary numbers, wherein the process of determining the node number of any routing node includes: taking a binary value of a preset number of bits from a target binary number corresponding to any routing node to obtain the node number of any routing node; Furthermore, the process of determining the target binary numbers corresponding to the six routing nodes in the same six-node network includes: Configuring the corresponding target binary number for the first node in the same six-node network, and then performing a cyclic shift operation on the target binary number of the first node according to a preset cyclic shift direction, and using a new binary number obtained after each shift operation as the target binary number corresponding to other corresponding routing nodes in the same six-node network; The preset cyclic shift direction is cyclic left shift or cyclic right shift.
5. The routing method according to claim 4, characterized in that: The determining the preset internal node connection rule and the preset external node connection rule based on the node number information includes: Determining a first preset internal node connection rule corresponding to the first six-node network based on the node numbers in the first six-node network and the shift characteristics of the target binary numbers corresponding to the node numbers; Determining a second preset internal node connection rule corresponding to the second six-node network based on the shift characteristics of the target binary number corresponding to the node number in the second six-node network and an XOR operation result of any two of the node numbers in the second six-node network; The preset external node connection rule is determined based on the node numbers in the first six-node network and the node numbers in the second six-node network.
6. The routing method according to claim 5, characterized in that: The searching, from the communication network, for a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node comprises: Comparing the network number of the first routing node with the network number of the second routing node to obtain a corresponding comparison result; Performing an XOR operation on the node number of the first routing node and the node number of the second routing node to obtain a corresponding XOR operation result; Determine a target routing path corresponding to the shortest network diameter between the first routing node and the second routing node based on the comparison result, the XOR operation result, and the number of preset binary values in the XOR operation result; The preset binary value is 1 or 0.
7. The routing method according to claim 1, characterized in that: The step of respectively connecting each group of nodes in the first six-node network to a corresponding group of nodes in the second six-node network comprises: Node connections are respectively made between the first group of nodes of the first six-node network and the first group of nodes of the second six-node network, between the second group of nodes of the first six-node network and the second group of nodes of the second six-node network, and between the third group of nodes of the first six-node network and the third group of nodes of the second six-node network.
8. The routing method according to claim 1, characterized in that: The step of respectively connecting each group of nodes in the first six-node network to a corresponding group of nodes in the second six-node network comprises: Node connections are respectively made between the first group of nodes of the first six-node network and the first group of nodes of the second six-node network, between the second group of nodes of the first six-node network and the third group of nodes of the second six-node network, and between the third group of nodes of the first six-node network and the second group of nodes of the second six-node network.
9. The routing method according to claim 7 or 8, characterized in that: When connecting any group of nodes in the first six-node network with a corresponding group of nodes in the second six-node network, the corresponding connection method includes connecting the previous node and the next node in any group of nodes to the previous node and the next node in the corresponding group of nodes one-to-one, or connecting the previous node and the next node in any group of nodes to the next node and the previous node in the corresponding group of nodes one-to-one.
10. A method for constructing a communication network, characterized in that: include: constructing a first six-node network and a second six-node network each including six routing nodes; The routing nodes in the first six-node network and the second six-node network are connected based on a preset node connection rule to obtain a communication network including twelve routing nodes; wherein the preset node connection rule is a node connection rule for constraining that the shortest network diameter between any two routing nodes in the first six-node network and the second six-node network is not greater than 2; The connecting the routing nodes in the first six-node network and the second six-node network based on the preset node connection rule to obtain a communication network including twelve routing nodes includes: The six routing nodes in each of the first six-node network and the second six-node network are connected respectively based on a preset internal node connection rule, and then the routing nodes in the first six-node network are connected with the routing nodes in the second six-node network based on a preset external node connection rule to form a communication network including twelve routing nodes and the shortest network diameter between any two routing nodes is no more than 2; The preset internal node connection rule includes: connecting the six internal routing nodes in the first six-node network and the second six-node network one by one in sequence, and then connecting the first node and the fourth node, the second node and the sixth node, and the third node and the fifth node in the first six-node network, and connecting the routing nodes that are relative to each other in the second six-node network; Wherein, the preset external node connection rule includes: dividing the six routing nodes in each of the six-node networks into three groups of nodes; wherein the first group of nodes in the three groups of nodes includes the first node and the fourth node in the corresponding six-node network, the second group of nodes includes the second node and the third node in the corresponding six-node network, and the third group of nodes includes the fifth node and the sixth node in the corresponding six-node network; Node connections are respectively made between each group of nodes in the first six-node network and a corresponding group of nodes in the second six-node network.
11. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the method according to any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Multi-machine routing method, device and system for fat tree network and storage medium
CN117061423A
Routing path planning method, device, equipment and medium
CN118282927A