A routing method, communication network construction method, device, medium and product

By constructing a multi-node network and dividing routing node groups, and establishing corresponding relationships to connect routing nodes, the problem of large data transmission delays in the Internet communication network is solved, and more efficient routing communication is achieved.

CN118921317BActive Publication Date: 2025-01-21SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411405196.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-21
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

In existing Internet communication networks, the time delay of data transmission is large, mainly due to the extension of routing paths caused by the large network diameter.

Method used

By constructing a multi -node network containing different number of route nodes, the route nodes in the second multi -node network are divided into multiple groups, and the corresponding relationship is established to connect the routing node to form a communication network with the shortest network diameter of not more than 2.

Benefits of technology

The minimum network diameter between the two routing nodes in the communication network is reduced, thereby reducing the time delay of data transmission and improving the efficiency of routing communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118921317B_ABST
    Figure CN118921317B_ABST
Patent Text Reader

Abstract

The present invention discloses a routing method, a communication network construction method, a device, a medium and a product, which relate to the field of communication technology, including: constructing a first multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes, and dividing the second number of routing nodes in the second multi-node network into a first number of routing nodes; the second number is twice the first number; establishing a corresponding relationship between the first number of routing nodes in the first multi-node network and the first number of routing nodes in the second multi-node network, and connecting the routing nodes in the first multi-node network and the second multi-node network based on the corresponding relationship to obtain a communication network in which 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.
Need to check novelty before this filing date? Find Prior Art

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 constructed based on different multi-node networks, 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 multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes, and dividing the second number of routing nodes in the second multi-node network into the first number of groups of routing nodes; the second number is twice the first number;

[0008] Establishing a correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, and connecting the routing nodes in the first multi-node network and the second multi-node network based on the correspondence to obtain a communication network in which the shortest network diameter between any two routing nodes is no 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, dividing the second number of routing nodes in the second multi-node network into the first number of groups of routing nodes includes:

[0011] When the first number is three, any two of the second number of routing nodes in the second multi-node network are divided into three groups of routing nodes.

[0012] Optionally, dividing the second number of routing nodes in the second multi-node network into the first number of groups of routing nodes includes:

[0013] When the first number is four, any two target routing nodes in the second multi-node network that are not mutually opposite nodes are divided into a first group of routing nodes, and two routing nodes that are mutually opposite nodes with each of the target routing nodes are divided into a third group of routing nodes;

[0014] Divide the other routing nodes in the second multi-node network except the first group of routing nodes and the third group of routing nodes into a second group of routing nodes and a fourth group of routing nodes, respectively;

[0015] If the routing nodes in the second group of routing nodes and the fourth group of routing nodes are relative nodes to each other, then the routing nodes in the second group of routing nodes and the routing nodes in the fourth group of routing nodes are adjacent nodes to each other.

[0016] Optionally, the establishing a correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network includes:

[0017] Establish a corresponding relationship between the first number of routing nodes in the first multi-node network and a corresponding group of routing nodes in the second multi-node network one by one in sequence; wherein the corresponding relationship includes that the Nth routing node in the first multi-node network corresponds to the Nth group of routing nodes in the second multi-node network; N is a positive integer.

[0018] Optionally, the connecting the routing nodes in the first multi-node network and the second multi-node network based on the corresponding relationship to obtain a communication network in which the shortest network diameter between any two routing nodes is no more than 2 includes:

[0019] Each routing node in the first multi-node network and a group of routing nodes in the second multi-node network that have the corresponding relationship with each routing node are connected respectively, and the internal routing nodes in the first multi-node network and the second multi-node network are connected respectively based on the preset internal node connection rules to obtain a communication network in which the shortest network diameter between any two routing nodes is no more than 2.

[0020] Optionally, the connecting the internal routing nodes in the first multi-node network and the second multi-node network respectively based on a preset internal node connection rule includes:

[0021] The routing nodes in the first multi-node network and the second multi-node network are connected end to end in sequence one by one, and the routing nodes that are relative nodes to each other are connected in the second multi-node network.

[0022] Optionally, the routing method further includes:

[0023] Corresponding node numbering information is configured for routing nodes in the first multi-node network and the second multi-node network, and the preset internal node connection rule is determined based on the node numbering information.

[0024] Optionally, the node numbering information of any routing node in the second multi-node network includes the group number of any routing node in the second multi-node network and the node number of any routing node in the second multi-node network; the node numbering information of any routing node in the first multi-node network includes the group number of a corresponding group of routing nodes in the second multi-node network to which any routing node in the first multi-node network is connected.

[0025] Optionally, the group number is a binary number, wherein the process of determining the group number of any routing node in the first multi-node network includes: taking a binary value of a first preset number of bits from a first target binary number corresponding to any routing node in the first multi-node network to obtain the group number of any routing node in the first multi-node network;

[0026] Furthermore, the process of determining the first target binary number corresponding to each routing node in the first multi-node network includes:

[0027] configuring the first target binary number corresponding to the first node in the first multi-node network, and then performing a cyclic shift operation on the first target binary number corresponding to the first node in the first multi-node network according to a preset cyclic shift direction, and using a new binary number obtained after each shift operation as the first target binary number corresponding to other corresponding routing nodes in the first multi-node network;

[0028] The preset cyclic shift direction is cyclic left shift or cyclic right shift.

[0029] Optionally, the node number is a binary number, wherein the process of determining the node number of any routing node in the second multi-node network includes: taking a binary value of a second preset number of digits from a second target binary number corresponding to any routing node in the second multi-node network to obtain the node number of any routing node in the second multi-node network;

[0030] Furthermore, the process of determining the second target binary number corresponding to each routing node in the second multi-node network includes:

[0031] A corresponding second target binary number is configured for the first node in the second multi-node network, and then a cyclic shift operation is performed on the second target binary number corresponding to the first node in the second multi-node network according to the preset cyclic shift direction, and a new binary number obtained after each shift operation is used as the second target binary number corresponding to other corresponding routing nodes in the second multi-node network.

[0032] Optionally, the determining the preset internal node connection rule based on the node number information includes:

[0033] Determining a first preset internal node connection rule corresponding to the first multi-node network based on the shift characteristics of the first target binary number corresponding to the group number in the first multi-node network and an XOR operation result of any two of the group numbers in the first multi-node network;

[0034] The second preset internal node connection rule corresponding to the second multi-node network is determined based on the shift characteristics of the second target binary number corresponding to the node number in the second multi-node network and the XOR operation result of any two node numbers in the second multi-node network.

[0035] 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, and performing corresponding routing communication according to the target routing path, includes:

[0036] Comparing the node number information of the first routing node with the node number information of the second routing node to obtain a corresponding comparison result;

[0037] Based on the comparison result, performing an XOR operation on a corresponding number in the node number information of the first routing node and a corresponding number in the node number information of the second routing node to obtain an XOR operation result;

[0038] Based on the comparison result, the XOR operation result, and the number of preset binary values ​​in the XOR operation result, 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;

[0039] The preset binary value is 1 or 0.

[0040] In a second aspect, the present invention provides a communication network construction method, comprising:

[0041] Constructing a first multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes, and dividing the second number of routing nodes in the second multi-node network into the first number of groups of routing nodes; the second number is twice the first number;

[0042] Establish a correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, and connect the routing nodes in the first multi-node network and the second multi-node network based on the correspondence to obtain a communication network in which the shortest network diameter between any two routing nodes is no more than 2.

[0043] In a third aspect, the present invention provides an electronic device, comprising:

[0044] Memory for storing computer programs;

[0045] A processor is used to execute the computer program to implement the aforementioned method.

[0046] 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.

[0047] 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.

[0048] In the present invention, a first multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes are constructed, and the second number of routing nodes in the second multi-node network are divided into the first number of groups of routing nodes; the second number is twice the first number; a correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network is established, and based on the correspondence, the routing nodes in the first multi-node network and the second multi-node network are connected to obtain a communication network in which the shortest network diameter between any two routing nodes 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.

[0049] Beneficial effect: The present invention pre-constructs a first multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes, and divides the second number of routing nodes in the second multi-node network into a first number of groups of routing nodes, and then establishes a corresponding relationship between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, so as to connect the routing nodes in the first multi-node network and the second multi-node network, thereby obtaining a communication network in which the shortest network diameter between any two routing nodes is not greater than 2. In this way, when routing communication is required between any two routing nodes in the communication network, the present invention can search for a target routing path corresponding to the shortest network diameter between any two routing nodes from the communication network, that is, the network diameter of the target routing path is less than or equal to 2, thereby reducing the time delay of data transmission and improving 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

[0050] 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.

[0051] Figure 1 A standard double hexagonal topology network provided by an embodiment of the present invention;

[0052] Figure 2 A flow chart of a routing method provided by an embodiment of the present invention;

[0053] Figure 3 A schematic diagram of node grouping when the first number is three provided by an embodiment of the present invention;

[0054] Figure 4 Another schematic diagram of node grouping when the first number is three provided by an embodiment of the present invention;

[0055] Figure 5 A schematic diagram of node grouping when the first number is four provided by an embodiment of the present invention;

[0056] Figure 6 Another schematic diagram of node grouping when the first number is four provided by an embodiment of the present invention;

[0057] Figure 7 A schematic diagram of a cyclic shift of a four-bit binary number provided in an embodiment of the present invention;

[0058] Figure 8 A schematic diagram of group number configuration of a routing node provided by an embodiment of the present invention;

[0059] Fig. 9 A schematic diagram of cyclic shift of an eight-bit binary number provided by an embodiment of the present invention;

[0060] Fig.10 A schematic diagram of node number configuration of a routing node provided by an embodiment of the present invention;

[0061] Fig.11 A specific communication network schematic diagram provided for an embodiment of the present invention;

[0062] Fig.12 A routing path search flow chart provided by an embodiment of the present invention;

[0063] Fig.13 Another specific communication network schematic diagram provided for an embodiment of the present invention;

[0064] Fig.14A flow chart of a communication network construction method provided by an embodiment of the present invention;

[0065] Fig.15 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0066] 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.

[0067] 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 constructed based on different multi-node networks.

[0068] See also Figure 2 As shown, an embodiment of the present invention provides a routing method, including:

[0069] Step S11, constructing a first multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes, and dividing the second number of routing nodes in the second multi-node network into the first number of groups of routing nodes; the second number is twice the first number.

[0070] In an embodiment of the present invention, a first multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes are constructed; wherein the second number is twice the first number; and then the second number of routing nodes in the second multi-node network are divided into first number groups of routing nodes in pairs. Wherein, 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.

[0071] According to one of the embodiments, when the first number is three and the second number is six, a first multi-node network including three routing nodes and a second multi-node network including six routing nodes are constructed, and any two of the six routing nodes in the second multi-node network are divided into three groups of routing nodes.

[0072] like Figure 3 As shown in FIG. 1 , the outer ring is the first multi-node network including three routing nodes, and the inner ring is the second multi-node network including six routing nodes. Figure 3 In the second multi-node network, the first routing node and the second routing node are divided into a first group of routing nodes, the third routing node and the fourth routing node are divided into a second group of routing nodes, and the fifth routing node and the sixth routing node are divided into a third group of routing nodes. Figure 4 In the second multi-node network, the first routing node and the third routing node are divided into the first group of routing nodes, the second routing node and the fourth routing node are divided into the second group of routing nodes, and the fifth routing node and the sixth routing node are divided into the third group of routing nodes. It should be noted that the above are only two specific cases, and other cases are not described in detail here.

[0073] According to another embodiment, when the first number is four and the second number is eight, a first multi-node network including four routing nodes and a second multi-node network including eight routing nodes are constructed, any two target routing nodes in the second multi-node network that are not relative nodes to each other are divided into a first group of routing nodes, and two routing nodes that are relative nodes to each target routing node are divided into a third group of routing nodes, and then the other routing nodes in the second multi-node network except the first group of routing nodes and the third group of routing nodes are divided into a second group of routing nodes and a fourth group of routing nodes in pairs; wherein, if the routing nodes within each of the second group of routing nodes and the fourth group of routing nodes are relative nodes to each other, that is, two routing nodes in the second group of routing nodes are relative nodes to each other, and two routing nodes in the fourth group of routing nodes are relative nodes to each other, then it is necessary to make the routing nodes in the second group of routing nodes and the routing nodes in the fourth group of routing nodes adjacent nodes to each other in pairs.

[0074] like Figure 5 As shown in FIG. 1 , the outer ring is a first multi-node network including four routing nodes, and the inner ring is a second multi-node network including eight routing nodes. Figure 5In the method, the first routing node and the second routing node that are not relative nodes to each other are first divided into a first group of routing nodes in the second multi-node network, and the fifth routing node that is a relative node to the first routing node and the sixth routing node that is a relative node to the second routing node are divided into a third group of routing nodes; for other routing nodes (i.e., the third routing node, the fourth routing node, the seventh routing node, and the eighth routing node) except the first group of routing nodes and the third group of routing nodes in the second multi-node network, the third routing node and the fourth routing node that are not relative nodes to each other can be divided into a second group of routing nodes, and the seventh routing node and the eighth routing node that are not relative nodes to each other can be divided into a fourth group of routing nodes.

[0075] And in Figure 6 In the method, the first routing node and the second routing node that are not relative nodes to each other are first divided into a first group of routing nodes in the second multi-node network, and the fifth routing node that is a relative node to the first routing node and the sixth routing node that is a relative node to the second routing node are divided into a third group of routing nodes; for other routing nodes except the first group of routing nodes and the third group of routing nodes in the second multi-node network, the third routing node and the seventh routing node that are relative nodes to each other can be divided into a second group of routing nodes, and the fourth routing node and the eighth routing node that are relative nodes to each other can be divided into a fourth group of routing nodes, but in this case, it is necessary to ensure that the routing nodes in the second group of routing nodes and the routing nodes in the fourth group of routing nodes are adjacent nodes to each other, that is, the third routing node in the second group of routing nodes and the fourth routing node in the fourth group of routing nodes are adjacent nodes to each other, and the seventh routing node in the second group of routing nodes and the eighth routing node in the fourth group of routing nodes are adjacent nodes to each other.

[0076] Step S12: establish a correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, and connect the routing nodes in the first multi-node network and the second multi-node network based on the correspondence to obtain a communication network in which the shortest network diameter between any two routing nodes is no more than 2.

[0077] In this embodiment, for the correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, a correspondence can be established by sequentially establishing the first number of routing nodes in the first multi-node network with a corresponding group of routing nodes in the second multi-node network one by one; wherein the correspondence includes that the Nth routing node in the first multi-node network corresponds to the Nth group of routing nodes in the second multi-node network, and N is a positive integer.

[0078] According to one of the embodiments, when the first number is three, a corresponding relationship can be established between the first routing node in the first multi-node network and the first group of routing nodes in the second multi-node network, a corresponding relationship can be established between the second routing node in the first multi-node network and the second group of routing nodes in the second multi-node network, and a corresponding relationship can be established between the third routing node in the first multi-node network and the third group of routing nodes in the second multi-node network.

[0079] According to another embodiment, when the first number is four, a corresponding relationship may be established between the first routing node in the first multi-node network and the first group of routing nodes in the second multi-node network, a corresponding relationship may be established between the second routing node in the first multi-node network and the second group of routing nodes in the second multi-node network, a corresponding relationship may be established between the third routing node in the first multi-node network and the third group of routing nodes in the second multi-node network, and a corresponding relationship may be established between the fourth routing node in the first multi-node network and the fourth group of routing nodes in the second multi-node network.

[0080] Furthermore, after establishing the correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, the routing nodes in the first multi-node network and the second multi-node network are connected based on the correspondence, thereby obtaining a communication network in which the shortest network diameter between any two routing nodes is no greater than 2. In this way, by reducing the shortest network diameter between any two routing nodes in the communication network, the time delay of routing communication is reduced, and the efficiency of routing communication is improved.

[0081] Specifically, each routing node in the first multi-node network is connected to a group of routing nodes in the second multi-node network that have a corresponding relationship with each routing node, and the routing nodes in each of the first multi-node network and the second multi-node network are connected based on the preset internal node connection rule to obtain a communication network in which the shortest network diameter between any two routing nodes is no more than 2. The preset internal node connection rule is to connect the internal routing nodes in each of the first multi-node network and the second multi-node network one by one in sequence, and connect the routing nodes that are relative to each other in the second multi-node network. When the first number is three, the node connection diagram of the communication network can be as follows: Figure 3 and Figure 4 When the first number is four, the node connection diagram of the communication network can be as shown in Figure 5 and Figure 6 It should be noted that Figures 3 to 6 These are only some of the feasible solutions in the present invention, and other feasible solutions will not be listed one by one.

[0082] In this embodiment, the preset internal node connection rule can be determined by configuring corresponding node numbering information for routing nodes in the first multi-node network and the second multi-node network, and determining the preset internal node connection rule based on the node numbering information, wherein different routing nodes correspond to different node numbering information.

[0083] Among them, the node numbering information of any routing node in the second multi-node network includes the group number of any routing node and the node number of any routing node; the node numbering information of any routing node in the first multi-node network includes the group number of a corresponding group of routing nodes in the second multi-node network to which any routing node is connected. That is, different routing nodes in the second multi-node network correspond to different node numbers, the same group of routing nodes in the second multi-node network has the same group number, different groups of routing nodes have different group numbers, and any routing node in the first multi-node network and a group of routing nodes in the second multi-node network that have a corresponding relationship with any routing node have the same group number. It can be found that the number of numbers contained in the node numbering information of the routing nodes of the second multi-node network is different from the number of numbers contained in the node numbering information of the routing nodes of the first multi-node network.

[0084] In a specific implementation, the group number and the node number in the node number information are both binary numbers. The number of binary digits of the group number can be determined based on the number of routing nodes in the first multi-node network. For example, the number of routing nodes in the first multi-node network is 3 or 4, and the number of binary digits of the group number is two. The number of binary digits of the node number can be determined based on the number of routing nodes in the second multi-node network. For example, the number of routing nodes in the second multi-node network is 6, and the number of binary digits of the node number is three; the number of routing nodes in the second multi-node network is 8, and the number of binary digits of the node number is four.

[0085] The process of determining the group number of any routing node in the first multi-node network includes: taking out the binary value of the first preset digit from the first target binary number corresponding to any routing node in the first multi-node network to obtain the group number of any routing node in the first multi-node network. It should be noted that, for taking out the binary value of the first preset digit, it is necessary to take out the binary value of the first preset digit from the first target binary number corresponding to any routing node in the first multi-node network. For example, when the group number is a two-bit binary number, the first target binary number is a four-bit binary number, and the first preset digit is two; and each routing node in the first multi-node network corresponds to a first target binary number, so that the group number of any routing node in the first multi-node network is obtained by taking out the binary value of two consecutive digits from the first target binary number corresponding to any routing node in the first multi-node network; wherein the binary value of the two consecutive digits can be the binary value of the first two digits in the first target binary number, can also be the binary value of the last two digits in the first target binary number, and can also be the binary value of the middle two digits in the first target binary number.

[0086] Furthermore, the process of determining the first target binary number corresponding to each routing node in the first multi-node network includes: configuring the corresponding first target binary number for the first node in the first multi-node network, and then performing a cyclic shift operation on the first target binary number corresponding to the first node in the first multi-node network according to a preset cyclic shift direction, and configuring the new binary number obtained after each shift operation as the first target binary number corresponding to other corresponding routing nodes in the first multi-node network; wherein the preset cyclic shift direction is a cyclic left shift or a cyclic right shift.

[0087] by Figure 7 and Figure 8 For example, if the first target binary number is a four-bit binary number and the group number is a two-bit binary number, then after configuring the corresponding first target binary number 0011 for the first node in the first multi-node network, the first target binary number corresponding to the first node in the first multi-node network is circularly shifted by one bit according to a circular left shift or a circular right shift, and the new binary number obtained after each shift operation is configured as the first target binary number corresponding to other corresponding routing nodes in the first multi-node network in the clockwise direction or counterclockwise direction. It should be noted that the circular left shift corresponds to the clockwise direction, and the circular right shift corresponds to the counterclockwise direction. Furthermore, after configuring the corresponding first target binary numbers for the four routing nodes in the first multi-node network, the group number of any routing node in the first multi-node network is obtained by taking out the binary values ​​of the upper two bits from the first target binary number corresponding to any routing node in the first multi-node network.

[0088] Among them, the process of determining the node number of any routing node in the second multi-node network includes: taking out the binary value of the second preset number of bits from the second target binary number corresponding to any routing node in the second multi-node network to obtain the node number of any routing node in the second multi-node network. It should be noted that, in order to take out the binary value of the second preset number of bits, it is necessary to take out the binary value of the second preset number of bits continuously from the second target binary number corresponding to any routing node in the second multi-node network. For example, when the node number is a four-bit binary number, the second target binary number is an eight-bit binary number, and the second preset number of bits is four; and each routing node in the second multi-node network corresponds to a second target binary number, so that the node number of any routing node in the second multi-node network is obtained by taking out the binary value of four consecutive bits from the second target binary number corresponding to any routing node in the second multi-node network.

[0089] Furthermore, the process of determining the second target binary number corresponding to each routing node in the second multi-node network includes: configuring the corresponding second target binary number for the first node in the second multi-node network, and then performing a cyclic shift operation on the second target binary number corresponding to the first node in the second multi-node network according to a preset cyclic shift direction, and configuring the new binary number obtained after each shift operation as the second target binary number corresponding to other corresponding routing nodes in the second multi-node network; wherein the preset cyclic shift direction is a cyclic left shift or a cyclic right shift.

[0090] by Fig. 9 and Fig.10 For example, if the second target binary number is an eight-bit binary number and the node number is a four-bit binary number, then after configuring the corresponding second target binary number 00001111 for the first node in the second multi-node network, the second target binary number corresponding to the first node in the second multi-node network is circularly shifted by one position according to a circular left shift or a circular right shift, and the new binary number obtained after each shift operation is configured as the second target binary number corresponding to other corresponding routing nodes in the second multi-node network in the clockwise direction or counterclockwise direction. It should be noted that the circular left shift corresponds to the clockwise direction, and the circular right shift corresponds to the counterclockwise direction. Furthermore, after configuring the corresponding second target binary numbers for the eight routing nodes in the second multi-node network, the node number of any routing node in the second multi-node network is obtained by taking out the binary values ​​of the upper four bits from the second target binary number corresponding to any routing node in the second multi-node network.

[0091] In this embodiment, the preset internal node connection rules are determined based on the node number information, specifically, the first preset internal node connection rules corresponding to the first multi-node network are determined based on the shift characteristics of the first target binary number corresponding to the group number in the first multi-node network and the XOR operation result of any two group numbers in the first multi-node network; the second preset internal node connection rules corresponding to the second multi-node network are determined based on the shift characteristics of the second target binary number corresponding to the node number in the second multi-node network and the XOR operation result of any two node numbers in the second multi-node network.

[0092] by Fig.11 For example, Fig.11 It is a communication network obtained after the routing nodes in the first multi-node network and the second multi-node network are connected to each other internally and externally. Among them, for the first preset internal node connection rule corresponding to the first multi-node network, in the first multi-node network, the first target binary number corresponding to the group number is directly connected to the two identical 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 group number is 11 are not connected. And for the second preset internal node connection rule corresponding to the second multi-node network, in the second multi-node network, the second target binary number corresponding to the node number is directly connected to the two identical 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 1111 are directly connected. It should be noted that Fig.11 This is just one specific case, and other cases will not be given examples one by one here.

[0093] It should be noted that, for the communication network constructed by the above method, whether it is for the communication network with the first number of three or for the communication network with the first number of four, the out-degree and in-degree of each routing node in the communication network are both 4, and the shortest network diameter between any two routing nodes in the communication network is less than or equal to 2.

[0094] 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.

[0095] In an embodiment of the present invention, after a communication network is constructed based on two multi-node networks including different numbers of routing nodes, 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.

[0096] Beneficial effect: The present invention pre-constructs a first multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes, and divides the second number of routing nodes in the second multi-node network into a first number of groups of routing nodes, and then establishes a corresponding relationship between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, so as to connect the routing nodes in the first multi-node network and the second multi-node network, thereby obtaining a communication network in which the shortest network diameter between any two routing nodes is not greater than 2. In this way, when routing communication is required between any two routing nodes in the communication network, the present invention can search for a target routing path corresponding to the shortest network diameter between any two routing nodes from the communication network, that is, the network diameter of the target routing path is less than or equal to 2, thereby reducing the time delay of data transmission and improving the efficiency of routing communication by reducing the shortest network diameter between any two routing nodes in the communication network.

[0097] 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.11 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.12 As shown, an embodiment of the present invention provides a process of searching a routing path, including:

[0098] Step S21: compare the node number information of the first routing node with the node number information of the second routing node to obtain a corresponding comparison result.

[0099] In the embodiment of the present invention, the number of binary digits contained in the node numbering information of the first routing node and the number of binary digits contained in the node numbering information of the second routing node are compared to obtain a corresponding comparison result, wherein the group number in the node numbering information is a two-bit binary number, and the node number in the node numbering information is a four-bit binary number.

[0100] If the number of binary digits included in the node numbering information of the first routing node and the number of binary digits included in the node numbering information of the second routing node are the same and both are two, it indicates that the first routing node and the second routing node are both located in the first multi-node network of the outer ring.

[0101] If the number of binary digits included in the node numbering information of the first routing node and the number of binary digits included in the node numbering information of the second routing node are the same and both are six digits, it indicates that the first routing node and the second routing node are both located in the second multi-node network of the inner ring.

[0102] If the number of binary digits included in the node number information of the first routing node is different from the number of binary digits included in the node number information of the second routing node, it indicates that the first routing node and the second routing node are located in different multi-node networks of the communication network.

[0103] Step S22: Based on the comparison result, perform an XOR operation on the corresponding number in the node number information of the first routing node and the corresponding number in the node number information of the second routing node to obtain an XOR operation result.

[0104] In the embodiment of the present invention, based on different comparison results, an XOR operation needs to be performed on the corresponding number in the node number information of the first routing node and the corresponding number in the node number information of the second routing node to obtain a corresponding XOR operation result.

[0105] If the comparison result indicates that the first routing node and the second routing node are both located in the first multi-node network of the outer ring, or the first routing node and the second routing node are located in different multi-node networks of the communication network, an XOR operation is performed on the group number in the node number information of the first routing node and the group number in the node number information of the second routing node to obtain a corresponding XOR operation result.

[0106] If the comparison result shows that the first routing node and the second routing node are both located in the second multi-node network of the inner ring, an XOR operation is performed on the node number in the node number information of the first routing node and the node number in the node number information of the second routing node to obtain a corresponding XOR operation result.

[0107] Step S23: based on the comparison result, the XOR operation result and the number of preset binary values ​​in the XOR operation result, 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; wherein the preset binary value is 1 or 0.

[0108] 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.

[0109] 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 multi-node network of the outer ring, the XOR operation result between the group number of the first routing node and the group number of the second routing node may include four cases of 00, 01, 10, and 11, so that the number of 1s in the XOR operation result can be divided into the following three cases:

[0110] 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.

[0111] 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 multi-node network of the outer ring, 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.

[0112] For the third case, if the number of 1s in the XOR operation result is 2, it indicates that the first routing node and the second routing node are relative routing nodes in the first multi-node network of the outer ring. At this time, the first routing node can reach the second routing node by taking two steps in the clockwise or counterclockwise direction in the first multi-node network of the outer ring, that is, the first routing node can reach the second routing node through two steps of 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 both located in the second multi-node network of the inner ring, an XOR operation is performed on the node number of the first routing node and the node number of the second routing node, and based on the number of 1s in the XOR operation result obtained after the XOR operation, the following five cases can be divided:

[0114] 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.

[0115] 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 multi-node network of the inner ring, 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] For the third case, if the number of 1s in the XOR operation result is 2, it indicates that the first routing node and the second routing node are separated by one routing node in the second multi-node network of the inner ring. At this time, you only need to find the intermediate routing node to achieve two-step routing from the first routing node to the second routing node. Specifically, the XOR operation result is first split into two unique hot codes, where the unique hot code is a binary number that only includes one 1, and then the node number of the first routing node and the two unique hot codes are bitwise XORed to obtain two bitwise XOR results, and the target XOR result in which 0 and 1 are both continuous is found from the two bitwise XOR results, and the intermediate routing node corresponding to the target XOR result is found from the second multi-node network, that is, the node number of the intermediate routing node is the same as the target XOR result, so that you can first directly reach the intermediate routing node from the first routing node, and then directly reach the second routing node from the intermediate routing node. At this time, the first routing node can reach the second routing node through two-step routing.

[0117] For the third case, taking the node number of the first routing node as 1100 and the node number of the second routing node as 1111 as an example, the XOR result between the node number of the first routing node and the node number of the second routing node is 0011, the XOR result 0011 is split into two unique hot codes 0010 and 0001, and the node number 1100 of the first routing node and the two unique hot codes (0010, 0001) are bitwise XORed to obtain two bitwise XOR results 1110 and 1101. At this time, it can be found that 0 and 1 in 1110 are both continuous, while 1 in 1101 is not continuous, so 1110 can be used as the target XOR result, and the intermediate routing node with the node number of the target XOR result 1110 can be found from the second multi-node network, so that the intermediate routing node can be directly reached from the first routing node, and then the second routing node can be directly reached from the intermediate routing node, so as to realize the routing communication between the first routing node and the second routing node through two-step routing.

[0118] For the fourth case, if the number of 1s in the XOR operation result is 3, in a specific implementation, the group number of the first routing node and 11 can be bitwise XORed to obtain a first bitwise XOR result, and the node number of the first routing node and 1111 can be bitwise XORed to obtain a second bitwise XOR result, and then an intermediate routing node corresponding to the first bitwise XOR result and the second bitwise XOR result is found from the second multi-node network, that is, the group number of the intermediate routing node is the same as the first bitwise XOR result, and the node number of the intermediate routing node is the same as the second bitwise XOR result; at this time, the intermediate routing node can be directly reached from the first routing node, and then the second routing node can be directly reached from the intermediate routing node. In another specific implementation, the group number of the second routing node and 11 can be bitwise XORed to obtain a first bitwise XOR result, and the node number of the second routing node and 1111 can be bitwise XORed to obtain a second bitwise XOR result, and then an intermediate routing node corresponding to the first bitwise XOR result and the second bitwise XOR result can be found from the second multi-node network, that is, the group number of the intermediate routing node is the same as the first bitwise XOR result, and the node number of the intermediate routing node is the same as the second bitwise XOR result; at this time, the intermediate routing node can be directly reached from the first routing node, and then the second routing node 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-step routing.

[0119] For the fifth case, if the number of 1s in the XOR operation result is 4, it indicates that the first routing node and the second routing node are relative routing nodes in the second multi-node network of the inner ring, and the first routing node and the second routing node are directly connected in the second multi-node network of the inner ring, so that the path from the first routing node directly to the second routing node can be 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.

[0120] 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 multi-node networks of the communication network, two cases can be first divided based on the node number information of the first routing node and the node number information of the second routing node, and then in each case, the division is specifically performed based on the number of 1s in the XOR operation result between the group number of the first routing node and the group number of the second routing node. The specific division is as follows:

[0121] For the first case, if the number of binary digits contained in the node numbering information of the first routing node is six, and the number of binary digits contained in the node numbering information of the second routing node is two, that is, the first routing node is located in the second multi-node network of the inner ring, and the second routing node is located in the first multi-node network of the outer ring, and the node numbering information of the first routing node includes the group number and the node number, and the node numbering information of the second routing node includes only the group number, then the following three specific implementation methods can be divided based on the number of 1s in the XOR operation result between the group number of the first routing node and the group number of the second routing node:

[0122] In the first specific implementation, if the number of 1s in the XOR operation result is 0, it indicates that there is a corresponding relationship between the first routing node and the second routing node, that is, the first routing node in the second multi-node network is directly connected to the second routing node in the first multi-node network across the network, so that the path from the first routing node directly to the second routing node across the network can be 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.

[0123] In the second specific implementation, if the number of 1s in the XOR operation result is 1, it indicates that the routing node corresponding to the group number of the first routing node in the first multi-node network of the outer ring is adjacent to the second routing node. Therefore, the intermediate routing node corresponding to the group number of the first routing node can be found in the first multi-node network of the outer ring, that is, the group number of the intermediate routing node is the same as the group number of the first routing node, and then the first routing node can be directly reached from the first routing node across the network in the first multi-node network of the outer ring, and then the second routing node in the same multi-node network can be directly reached from the intermediate routing node. It can be found that the first routing node can reach the second routing node through two-step routing.

[0124] In the third specific implementation, if the number of 1s in the XOR operation result is 2, it indicates that the routing node corresponding to the group number of the first routing node in the first multi-node network of the outer ring is a relative node to the second routing node, and considering that the two routing nodes whose XOR operation results of the node numbers in the second multi-node network are 1111 are connected; therefore, the node number of the first routing node can be first bitwise XORed with 1111, and based on the bitwise XOR result and the group number of the second routing node, the corresponding intermediate routing node can be found from the second multi-node network of the inner ring, that is, the group number of the intermediate routing node is the same as the group 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, the first routing node can be directly reached from the first routing node to the intermediate routing node in the same multi-node network, and then the intermediate routing node can be directly reached from the second routing node in the first multi-node network of the outer ring across the network. In this specific implementation, the first routing node can reach the second routing node through two-step routing.

[0125] For the second case, if the number of binary digits contained in the node numbering information of the first routing node is two, and the number of binary digits contained in the node numbering information of the second routing node is six, that is, the first routing node is located in the first multi-node network of the outer ring, and the second routing node is located in the second multi-node network of the inner ring, and the node numbering information of the first routing node only includes the group number, and the node numbering information of the second routing node includes the group number and the node number, then the following three specific implementation methods can be divided based on the number of 1s in the XOR operation result between the group number of the first routing node and the group number of the second routing node:

[0126] In the first specific implementation, if the number of 1s in the XOR operation result is 0, it indicates that there is a corresponding relationship between the first routing node and the second routing node, that is, the first routing node in the first multi-node network is directly connected to the second routing node in the second multi-node network across the network, so that the path from the first routing node directly to the second routing node across the network can be 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.

[0127] In the second specific implementation, if the number of 1s in the XOR operation result is 1, it indicates that the routing node corresponding to the group number of the second routing node in the first multi-node network of the outer ring is an adjacent node to the first routing node, so the intermediate routing node corresponding to the group number of the second routing node can be found from the first multi-node network of the outer ring, that is, the group number of the intermediate routing node is the same as the group number of the second routing node, and then the first routing node is directly reached from the intermediate routing node in the same multi-node network, and then the intermediate routing node is directly reached from the network across the network in the second multi-node network of the inner ring. It can be found that the first routing node can reach the second routing node through two-step routing.

[0128] In the third specific implementation, if the number of 1s in the XOR operation result is 2, it indicates that the routing node corresponding to the group number of the second routing node in the first multi-node network of the outer ring is a relative node to the first routing node, and considering that the two routing nodes whose XOR operation result of the node number in the second multi-node network is 1111 are directly connected; therefore, the node number of the second routing node can be firstly XORed with 1111, and based on the bitwise XOR result and the group number of the first routing node, the corresponding intermediate routing node can be found from the second multi-node network of the inner ring, that is, the group number of the intermediate routing node is the same as the group number of the first routing node, and the node number of the intermediate routing node is the same as the bitwise XOR result; at this time, it is possible to first directly reach the intermediate routing node in the second multi-node network of the inner ring from the first routing node across the network, and then directly reach the second routing node in the same multi-node network from the intermediate routing node. In this specific implementation, the first routing node can reach the second routing node through two-step routing.

[0129] It should also be noted that Fig.13Taking the communication network shown 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 from the communication network can specifically include: comparing the binary digits contained in the node numbering information of the first routing node and the binary digits contained in the node numbering information of the second routing node to obtain a corresponding comparison result; wherein the group number in the node numbering information is a two-bit binary number, and the node number in the node numbering information is a three-bit binary number. Based on the comparison result, an XOR operation is performed on the corresponding number in the node numbering information of the first routing node and the corresponding number in the node numbering information of the second routing node to obtain a corresponding XOR operation result; wherein, if the comparison result indicates that the first routing node and the second routing node are both located in the first multi-node network of the outer ring, or the first routing node and the second routing node are located in different multi-node networks of the communication network, an XOR operation is performed on the group number in the node numbering information of the first routing node and the group number in the node numbering information of the second routing node; if the comparison result indicates that the first routing node and the second routing node are both located in the second multi-node network of the inner ring, an XOR operation is performed on the node number in the node numbering information of the first routing node and the node number in the node numbering information of the second routing node. Then, based on the comparison result, the XOR operation result and the number of preset binary values ​​in the XOR operation result, the 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; wherein the preset binary value is 1 or 0.

[0130] 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 multi-node network of the outer ring, considering that the three routing nodes in the first multi-node network are adjacent to each other, when the number of 1s in the XOR operation result between the group number of the first routing node and the group number of the second routing node is not 0, it is possible to directly reach the adjacent second routing node from the first routing node, that is, the first routing node can reach the second routing node through one-step routing.

[0131] 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 multi-node network of the inner ring, 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 divided into the following four cases:

[0132] 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.

[0133] 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 multi-node network of the inner ring, 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.

[0134] For the third case, if the number of 1s in the XOR operation result is 2, then in one specific implementation, the node number of the first routing node can be firstly XORed with 111 to obtain a bitwise XOR result, and an intermediate routing node whose node number is the bitwise XOR result can be found from the second multi-node network. In this case, the intermediate routing node can be directly reached from the first routing node, and then the second routing node can be directly reached from the intermediate routing node. In another specific implementation, the node number of the second routing node can be firstly XORed with 111 to obtain a bitwise XOR result, and an intermediate routing node whose node number is the bitwise XOR result can be found from the second multi-node network. In this case, the intermediate routing node can be directly reached from the first routing node, and then the second routing node can be directly reached from the intermediate routing node. In another specific implementation, the XOR operation result can be split into two unique hot codes, and then the node number of the first routing node and the two unique hot codes are bitwise XORed to obtain two bitwise XOR results, and a target XOR result with both 0 and 1 being continuous is found from the two bitwise XOR results, and an intermediate routing node with a node number being the target XOR result is found from the second multi-node network, so that the first routing node can be directly reached to the intermediate routing node, and then the second routing node can be directly reached from the intermediate routing node. It can be found that in the third case, the first routing node can reach the second routing node through two-step routing.

[0135] 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 relative routing nodes in the second multi-node network of the inner ring, and the first routing node and the second routing node are directly connected in the second multi-node network of the inner ring, so that the path from the first routing node directly to the second routing node can be 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.

[0136] 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 multi-node networks of the communication network, if the first routing node is located in the second multi-node network of the inner ring and the second routing node is located in the first multi-node network of the outer ring, then the number of 1s in the XOR operation result between the group number of the first routing node and the group number of the second routing node can be divided into the following two specific implementations:

[0137] In the first specific implementation, if the number of 1s in the XOR operation result is 0, the group number representing the first routing node is the same as the group number of the second routing node, that is, there is a corresponding relationship between the first routing node and the second routing node, and the first routing node is directly connected to the second routing node across the network. At this time, the path from the first routing node directly to the second routing node across the network can be 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.

[0138] In the second specific implementation, if the number of 1s in the XOR operation result is not 0, it indicates that the routing node corresponding to the group number of the first routing node in the first multi-node network and the second routing node are adjacent nodes to each other, so the intermediate routing node corresponding to the group number of the first routing node can be found in the first multi-node network, that is, the group number of the intermediate routing node is the same as the group number of the first routing node, and then the first routing node can be directly reached from the first routing node across the network to the intermediate routing node in the first multi-node network, and then the intermediate routing node can be directly reached from the second routing node in the same multi-node network. It can be found that at this time, the first routing node can reach the second routing node through two-step routing.

[0139] 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 multi-node networks of the communication network, if the first routing node is located in a first multi-node network of the outer ring and the second routing node is located in a second multi-node network of the inner ring, then based on the number of 1s in the XOR operation result between the group number of the first routing node and the group number of the second routing node, the following two specific implementations can be divided:

[0140] In the first specific implementation, if the number of 1s in the XOR operation result is 0, the group number representing the first routing node is the same as the group number of the second routing node, that is, the first routing node is directly connected to the second routing node across the network. At this time, the path from the first routing node directly to the second routing node across the network can be 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.

[0141] In the second specific implementation, if the number of 1s in the XOR operation result is not 0, it indicates that the routing node corresponding to the group number of the second routing node in the first multi-node network is an adjacent node to the first routing node, so the intermediate routing node corresponding to the group number of the second routing node can be found in the first multi-node network, that is, the group number of the intermediate routing node is the same as the group number of the second routing node, and then the first routing node is directly reached from the intermediate routing node in the same multi-node network, and then the intermediate routing node is directly reached from the second routing node across the network. It can be found that at this time, the first routing node can reach the second routing node through two-step routing.

[0142] Beneficial effects: The embodiment of the present invention configures corresponding node numbering information for routing nodes in the first multi-node network and the second multi-node network, wherein the configuration of the group number and the configuration of the node number in the node numbering information both follow the characteristics of binary number cyclic shift, and the embodiment of the present invention determines the network internal node connection rule based on the characteristics of binary number cyclic shift and the result of binary number XOR operation, thereby connecting the routing nodes in the first multi-node network and the second multi-node network based on the network internal node connection rule and the corresponding relationship between each routing node in the first multi-node network and each group of routing nodes in the second multi-node network, so as to obtain a communication network in which the shortest network diameter between any two routing nodes is less than or equal to 2; it can be found that 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. Further, the embodiment of the present invention can more conveniently and quickly search for the target routing path corresponding to the shortest network diameter between any two routing nodes from the communication network based on the characteristics of binary number cyclic shift and the result of binary number XOR operation, thereby improving the efficiency of target routing path search.

[0143] See also Fig.14 As shown, an embodiment of the present invention provides a communication network construction method, including:

[0144] Step S31, constructing a first multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes, and dividing the second number of routing nodes in the second multi-node network into the first number of groups of routing nodes; the second number is twice the first number.

[0145] Step S32: establish a correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, and connect the routing nodes in the first multi-node network and the second multi-node network based on the correspondence to obtain a communication network in which the shortest network diameter between any two routing nodes is no more than 2.

[0146] 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.

[0147] Beneficial effect: The present invention pre-constructs a first multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes, and divides the second number of routing nodes in the second multi-node network into a first number of groups of routing nodes, and then establishes a corresponding relationship between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, so as to connect the routing nodes in the first multi-node network and the second multi-node network, thereby obtaining a communication network in which the shortest network diameter between any two routing nodes is not greater than 2. In this way, when routing communication is required between any two routing nodes in the communication network, the present invention can search for a target routing path corresponding to the shortest network diameter between any two routing nodes from the communication network, that is, the network diameter of the target routing path is less than or equal to 2, thereby reducing the time delay of data transmission and improving the efficiency of routing communication by reducing the shortest network diameter between any two routing nodes in the communication network.

[0148] Furthermore, the present application also discloses an electronic device. Fig.15 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.

[0149] 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.

[0150] 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.

[0151] 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.

[0152] 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.

[0153] 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.

[0154] 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.

[0155] 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.

[0156] 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.

[0157] 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.

[0158] 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 multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes, and dividing the second number of routing nodes in the second multi-node network into the first number of groups of routing nodes; the second number is twice the first number; Establishing a correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, and connecting the routing nodes in the first multi-node network and the second multi-node network based on the correspondence, and connecting the internal routing nodes in the first multi-node network and the second multi-node network based on a preset internal node connection rule, so as to obtain a communication network in which the shortest network diameter between any two routing nodes is no more 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; Wherein, the establishing a correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network includes: Establish a corresponding relationship between the first number of routing nodes in the first multi-node network and a corresponding group of routing nodes in the second multi-node network one by one in sequence; wherein the corresponding relationship includes that the Nth routing node in the first multi-node network corresponds to the Nth group of routing nodes in the second multi-node network; N is a positive integer.

2. The routing method according to claim 1, characterized in that: The dividing the second number of routing nodes in the second multi-node network into the first number of groups of routing nodes includes: When the first number is three, any two of the second number of routing nodes in the second multi-node network are divided into three groups of routing nodes.

3. The routing method according to claim 1, characterized in that: The dividing the second number of routing nodes in the second multi-node network into the first number of groups of routing nodes includes: When the first number is four, any two target routing nodes in the second multi-node network that are not mutually opposite nodes are divided into a first group of routing nodes, and two routing nodes that are mutually opposite nodes with each of the target routing nodes are divided into a third group of routing nodes; Divide the other routing nodes in the second multi-node network except the first group of routing nodes and the third group of routing nodes into a second group of routing nodes and a fourth group of routing nodes, respectively; If the routing nodes in the second group of routing nodes and the fourth group of routing nodes are relative nodes to each other, then the routing nodes in the second group of routing nodes and the routing nodes in the fourth group of routing nodes are adjacent nodes to each other.

4. The routing method according to claim 1, characterized in that: The connecting the internal routing nodes in the first multi-node network and the second multi-node network respectively based on the preset internal node connection rule includes: The routing nodes in the first multi-node network and the second multi-node network are connected end to end in sequence one by one, and the routing nodes that are relative nodes to each other are connected in the second multi-node network.

5. The routing method according to claim 4, characterized in that: Also includes: Corresponding node numbering information is configured for routing nodes in the first multi-node network and the second multi-node network, and the preset internal node connection rule is determined based on the node numbering information.

6. The routing method according to claim 5, characterized in that: The node numbering information of any routing node in the second multi-node network includes the group number of any routing node in the second multi-node network and the node number of any routing node in the second multi-node network; the node numbering information of any routing node in the first multi-node network includes the group number of a corresponding group of routing nodes in the second multi-node network to which any routing node in the first multi-node network is connected.

7. The routing method according to claim 6, characterized in that: The group number is a binary number, wherein the process of determining the group number of a corresponding group of routing nodes in the second multi-node network connected to any routing node in the first multi-node network comprises: taking a binary value of a first preset number of bits from a first target binary number corresponding to any routing node in the first multi-node network to obtain the group number; Furthermore, the process of determining the first target binary number corresponding to each routing node in the first multi-node network includes: configuring the first target binary number corresponding to the first node in the first multi-node network, and then performing a cyclic shift operation on the first target binary number corresponding to the first node in the first multi-node network according to a preset cyclic shift direction, and using a new binary number obtained after each shift operation as the first target binary number corresponding to other corresponding routing nodes in the first multi-node network; The preset cyclic shift direction is cyclic left shift or cyclic right shift.

8. The routing method according to claim 7, characterized in that: The node number is a binary number, wherein the process of determining the node number of any routing node in the second multi-node network includes: taking a binary value of a second preset number of bits from a second target binary number corresponding to any routing node in the second multi-node network to obtain the node number of any routing node in the second multi-node network; Furthermore, the process of determining the second target binary number corresponding to each routing node in the second multi-node network includes: A corresponding second target binary number is configured for the first node in the second multi-node network, and then a cyclic shift operation is performed on the second target binary number corresponding to the first node in the second multi-node network according to the preset cyclic shift direction, and a new binary number obtained after each shift operation is used as the second target binary number corresponding to other corresponding routing nodes in the second multi-node network.

9. The routing method according to claim 8, characterized in that: The determining the preset internal node connection rule based on the node number information includes: Determining a first preset internal node connection rule corresponding to the first multi-node network based on the shift characteristics of the first target binary number corresponding to the group number of a corresponding group of routing nodes in the second multi-node network connected to any routing node in the first multi-node network and an exclusive OR operation result of any two of the group numbers; The second preset internal node connection rule corresponding to the second multi-node network is determined based on the shift characteristics of the second target binary number corresponding to the node number in the second multi-node network and the XOR operation result of any two node numbers in the second multi-node network.

10. The routing method according to claim 9, characterized in that: The step of 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, includes: Comparing the node number information of the first routing node with the node number information of the second routing node to obtain a corresponding comparison result; Based on the comparison result, performing an XOR operation on a corresponding number in the node number information of the first routing node and a corresponding number in the node number information of the second routing node to obtain an XOR operation result; Based on the comparison result, the XOR operation result, and the number of preset binary values ​​in the XOR operation result, 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; The preset binary value is 1 or 0.

11. A method for constructing a communication network, characterized in that: include: Constructing a first multi-node network including a first number of routing nodes and a second multi-node network including a second number of routing nodes, and dividing the second number of routing nodes in the second multi-node network into the first number of groups of routing nodes; the second number is twice the first number; Establishing a correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network, and connecting the routing nodes in the first multi-node network and the second multi-node network based on the correspondence, and connecting the internal routing nodes in the first multi-node network and the second multi-node network based on a preset internal node connection rule, so as to obtain a communication network in which the shortest network diameter between any two routing nodes is no more than 2; Wherein, the establishing a correspondence between the first number of routing nodes in the first multi-node network and the first number of groups of routing nodes in the second multi-node network includes: Establish a corresponding relationship between the first number of routing nodes in the first multi-node network and a corresponding group of routing nodes in the second multi-node network one by one in sequence; wherein the corresponding relationship includes that the Nth routing node in the first multi-node network corresponds to the Nth group of routing nodes in the second multi-node network; N is a positive integer.

12. 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 11.

13. 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 11 is implemented.

14. 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 11 is implemented.

Citation Information

Patent Citations

  • Network topology structure, construction method, routing algorithm, equipment and medium

    CN117135059A

  • Network-on-chip communication method and device, computer equipment and storage medium

    CN118714019A