Routing method and device of hypercube network, medium and program product
By dividing the hypercube network into m-dimensional subnetworks and combining multicast and unicast routing methods, the problems of routing efficiency and blocking risk in the hypercube network are solved, and efficient parallel computing and performance improvement are achieved.
Patent Information
- Application Number
- CN202511247459.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-10-10
AI Technical Summary
How to achieve efficient routing in a hypercube network, especially routing efficiency and blocking risk under parallel computing requirements. Existing technologies are difficult to meet the system's real-time and scalability requirements.
The hypercube network is divided into several m-dimensional hypercube sub-networks. Multicast routing is used to transmit the message to the target hypercube sub-network, and then the message is transmitted to the target node by unicast within the sub-network, which optimizes the routing path and reduces the blocking risk.
The routing method combining multicast and unicast improves routing efficiency, reduces cost, and enhances the performance and parallel computing capability of the hypercube network.
Smart Images

Figure CN120768830A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of routing technology, and in particular to a routing method, device, medium and program product for a hypercube network. Background Art
[0002] With the advancement of large-scale integrated circuit technology, the bus communication efficiency of bus-based SoCs (System on Chip) has declined, making it difficult to meet the real-time requirements of the system. To address this issue, the Network on Chip (NoC) emerged. Since its introduction, NoC has been a research hotspot in the communications field. In particular, with the continuous expansion of computing scale, users are demanding more parallel computing capabilities from NoCs. This has led to the emergence of the hypercube network, a network topology with excellent overall performance in the research and practice of high-performance parallel computer systems. It can be easily expanded by increasing the network dimension. The number of nodes in the hypercube network increases exponentially with the network dimension, thus accommodating a large number of computing nodes.
[0003] It can be seen that how to implement routing in a hypercube network is a problem that those skilled in the art need to solve. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a routing method, device, medium and program product for a hypercube network, which can solve the routing problem in the hypercube network.
[0005] To solve the above technical problems, an embodiment of the present invention provides a routing method for a hypercube network, comprising:
[0006] The hypercube network is divided into a number of m-dimensional hypercube sub-networks; wherein each m-dimensional hypercube sub-network does not intersect with each other; m is a positive integer greater than or equal to 4;
[0007] Determine the number of target hypercube subnetworks; wherein the target hypercube subnetwork is an m-dimensional hypercube subnetwork containing the target node;
[0008] Based on the source node, k-1 copies of the message are replicated to obtain k messages to be transmitted; where k is the number of the determined target hypercube subnetworks;
[0009] Send k messages to be transmitted one by one to the corresponding k target hypercube sub-networks;
[0010] For any target hypercube sub-network, if a message to be transmitted is received, the target two-dimensional network is accessed in sequence in a unicast manner to transmit the message to be transmitted to each target node in the target hypercube sub-network;
[0011] The target two-dimensional network is a two-dimensional network containing a target node in the target hypercube subnetwork.
[0012] Optionally, determine the number of target hypercube subnetworks, including:
[0013] Determine the first address of all target nodes; wherein the first address is a binary address containing a plurality of bits;
[0014] Identify the most significant bit to the (m+1)th bit of the first address, and determine the affiliation between each target node and each m-dimensional hypercube subnetwork based on the identification result; wherein the least significant bit of the binary address is the first bit;
[0015] For any m-dimensional hypercube subnetwork, a first set is constructed; wherein the first set is a set consisting of first addresses of target nodes in the m-dimensional hypercube subnetwork;
[0016] If the first set is not an empty set, the m-dimensional hypercube subnetwork corresponding to the first set is determined to be the target hypercube subnetwork.
[0017] Optionally, sending the k to-be-transmitted messages to the corresponding k target hypercube sub-networks one by one includes:
[0018] For any target hypercube subnetwork, determine whether the source node belongs to the target hypercube subnetwork;
[0019] If so, the message of the source node is used as the message to be transmitted in the target hypercube sub-network;
[0020] If not, then select a node from the target hypercube subnetwork as the identification node of the target hypercube subnetwork;
[0021] The copy of the message copied by the source node is sent from the source node to the identification node.
[0022] Optionally, selecting a node from the target hypercube sub-network as an identification node of the target hypercube sub-network includes:
[0023] Comparing the second address of the source node with the node addresses of each node in the target hypercube subnetwork; wherein the second address and the node address are both binary addresses containing a plurality of bits;
[0024] The node corresponding to the third address is selected as an identification node of the target hypercube subnetwork; the third address is a node address of any node in the target hypercube subnetwork, and the third address is completely same as the second address from the first bit to the mth bit.
[0025] Optionally, the message copy copied by the source node is sent from the source node to the identification node, comprising:
[0026] An exclusive or result of the third address and the second address is determined.
[0027] The source node is determined as a current node, and a highest bit of the exclusive or result is determined as a current bit.
[0028] It is judged whether the current bit of the exclusive or result is 1.
[0029] If yes, a corresponding bit of a node address of the current node is inverted to obtain a node address of a next hop node, and the message copy is sent from the current node to the next hop node.
[0030] The next hop node is determined as a new current node, a next bit of the exclusive or result is determined as a current bit, and the step of judging whether the current bit of the exclusive or result is 1 is re-jumped.
[0031] If no, the step of determining the next bit of the exclusive or result as the current bit is directly jumped.
[0032] Optionally, before the target two-dimensional network is sequentially accessed in the unicast mode, the method further comprises:
[0033] For any target hypercube subnetwork, each target two-dimensional network in the target hypercube subnetwork is determined.
[0034] Priorities are configured for all target two-dimensional networks.
[0035] The target two-dimensional network is sequentially accessed in the unicast mode, comprising:
[0036] In the order of the priorities, each target two-dimensional network is sequentially accessed in the unicast mode.
[0037] Optionally, the each target two-dimensional network in the target hypercube subnetwork is determined, comprising:
[0038] The mth bit to the third bit of the first address of each target node in the target hypercube subnetwork is identified, and a belonging relationship between each target node in the target hypercube subnetwork and each two-dimensional network in the target hypercube subnetwork is determined based on the identification result.
[0039] For any two-dimensional network, a second set is constructed; the second set is a set composed of the first address of the target node in the two-dimensional network.
[0040] If the second set is not an empty set, the two-dimensional network corresponding to the second set is determined to be the target two-dimensional network.
[0041] Optionally, configure priorities for all target 2D networks, including:
[0042] The priority of each target two-dimensional network is configured based on the minimum number of hops between the target two-dimensional network and the current node; the smaller the minimum number of hops of the target two-dimensional network, the higher its priority;
[0043] If there are target two-dimensional networks with the same minimum hop count, the priority of the target two-dimensional networks with the same minimum hop count is configured based on the number of target nodes in the target two-dimensional networks; wherein, the more target nodes in the target two-dimensional network, the higher its priority.
[0044] Optionally, m is 4 to configure priorities for all target 2D networks, including:
[0045] A first network subset, a second network subset, a third network subset, and a fourth network subset are defined; wherein the first network subset has the highest priority, the second network subset has the second highest priority, and the fourth network subset has the lowest priority;
[0046] The binary number composed of the fourth and third digits of the node address of each two-dimensional network in the target hypercube subnetwork is defined as the sequence number of the two-dimensional network;
[0047] Determine a first number; wherein the first number is a binary number composed of the fourth and third digits of the source node;
[0048] The first digit of the first number is inverted to obtain the second number, the second digit of the first number is inverted to obtain the third number, and the first and second digits of the first number are inverted simultaneously to obtain the fourth number;
[0049] Determine whether the first node number is 0; wherein the first node number is the number of target nodes in the two-dimensional network whose sequence numbers are equal to the first number;
[0050] If the number of the first nodes is 0, the first network subset is set to an empty set;
[0051] If the first number of nodes is not 0, determining the second set of two-dimensional networks corresponding to the first number of nodes as the first network subset;
[0052] Determining whether the second node number is less than the third node number; wherein the second node number is the number of target nodes in the two-dimensional network whose sequence numbers are equal to the second number, and the third node number is the number of target nodes in the two-dimensional network whose sequence numbers are equal to the third number;
[0053] If the second node number is greater than or equal to the third node number, determining whether the second node number is 0, and determining whether the third node number is 0;
[0054] If the number of the second nodes is 0, the second network subset is set to an empty set;
[0055] If the second number of nodes is not 0, determining a second set of two-dimensional networks corresponding to the second number of nodes as a second network subset;
[0056] If the number of the third nodes is 0, the fourth network subset is set to an empty set;
[0057] If the third number of nodes is not 0, determining the second set of two-dimensional networks corresponding to the third number of nodes as the fourth network subset;
[0058] If the second node number is less than the third node number, determining whether the second node number is 0, and determining whether the third node number is 0;
[0059] If the number of the third nodes is 0, the second network subset is set to an empty set;
[0060] If the third number of nodes is not 0, determining the second set of two-dimensional networks corresponding to the third number of nodes as the second network subset;
[0061] If the number of the second nodes is 0, the fourth network subset is set to an empty set;
[0062] If the second number of nodes is not 0, determining the second set of two-dimensional networks corresponding to the second number of nodes as the fourth network subset;
[0063] Determine whether the fourth node number is 0; wherein the fourth node number is the number of target nodes in the two-dimensional network whose sequence number is equal to the fourth number;
[0064] If the number of the fourth node is 0, the third network subset is set to an empty set;
[0065] If the fourth node quantity is not 0, the second set of two-dimensional networks corresponding to the fourth node quantity is determined as the third network subset.
[0066] Optionally, each target two-dimensional network is accessed in sequence in unicast mode in order of priority, including:
[0067] Determine the first network subset as the current network subset, and determine whether the current network subset is an empty set;
[0068] If yes, the message to be transmitted is sent from the current node to the two-dimensional network corresponding to the next network subset in the priority order, and the next network subset is determined as the current network subset, and the process jumps to the step of determining whether the current network subset is an empty set;
[0069] If the current network subset is the first network subset, the current node is the routing starting point of the message to be transmitted in the target hypercube subnetwork;
[0070] If not, the message to be transmitted is transmitted from the current node to the target node of the current network subset, and the count value is controlled to be reduced by 1; the initial value of the count value is 4;
[0071] Determine whether the count value is 0;
[0072] If the count value is 0, the routing ends;
[0073] If the count value is not 0, the process jumps to the step of sending the message to be transmitted from the current node to the two-dimensional network corresponding to the next network subset in the priority order, and determining the next network subset as the current network subset.
[0074] Optionally, transmitting the message to be transmitted from the current node to a target node in the current network subset includes:
[0075] Transmit the message to be transmitted from the current node to the target node in the current network subset based on the neighboring nodes.
[0076] Optionally, transmitting the message to be transmitted from the current node to a target node in the current network subset based on the neighboring node includes:
[0077] For any target two-dimensional network, construct a third set; wherein the third set is a set of addresses of target nodes in the target two-dimensional network obtained by retaining only the first and second bits of the first address;
[0078] Determine an exclusive OR result between each element in the third set and the two-dimensional address suffix of the initial node; wherein the initial node is the routing starting point of the message to be transmitted in the target two-dimensional network;
[0079] Sort the XOR results corresponding to the elements in the third set in ascending order to obtain a fourth set, and adjust the elements in the third set to the corresponding order; wherein the fourth set is a set consisting of the XOR results corresponding to the elements in the third set;
[0080] Determine the initial node as the current node, and determine whether the current node is the target node based on the first element of the fourth set;
[0081] If the current node is the target node, the message to be transmitted is copied to the current node, and the element corresponding to the current node in the third set and the XOR result corresponding to the current node in the fourth set are deleted;
[0082] Determine whether the remaining elements in the third set are 3;
[0083] If the number of remaining elements is 3, swap the positions of the last two elements in the third set and swap the position of the last element in the fourth set;
[0084] If the remaining elements are not 3, determine whether there are remaining elements in the third set;
[0085] If there are no remaining elements in the third set, the routing ends;
[0086] If there are remaining elements in the third set, identifying the non-zero bit of the first element of the fourth set;
[0087] Inverting a specific bit of each element in the fourth set to obtain a new fourth set; wherein the specific bit is a bit corresponding to a non-zero bit of the first element of the fourth set;
[0088] Invert the specific bit in the node address of the current node to obtain the node address of the next hop node;
[0089] Sending the message to be transmitted to the next hop node based on the obtained node address, determining the next hop node as the new current node, and jumping back to the step of determining whether the current node is the target node by the first element of the fourth set;
[0090] If the current node is not the target node, jump directly to the step of determining whether the remaining elements in the third set are 3.
[0091] To solve the above technical problems, an embodiment of the present invention further provides an electronic device, including:
[0092] memory for storing computer programs;
[0093] A processor is configured to execute a computer program to implement the steps of the aforementioned hypercube network routing method.
[0094] To solve the above technical problems, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the aforementioned hypercube network routing method are implemented.
[0095] To solve the above technical problems, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the aforementioned hypercube network routing method when executed by a processor.
[0096] As can be seen from the above technical solution, multicast routing of messages is first performed using m-dimensional hypercube subnetworks as units, with multiple messages to be transmitted being routed from the source node to each m-dimensional hypercube subnetwork. Unicast routing of the messages to the destination nodes is then performed within the m-dimensional hypercube subnetworks. The beneficial effect of the present invention is that by dividing the m-dimensional hypercube subnetworks for multicast routing, parallel routing of messages to be transmitted is achieved, improving routing efficiency and reducing costs. Furthermore, unicast routing is then performed within the m-dimensional hypercube subnetworks, reducing the risk of congestion and improving the performance of the entire hypercube network. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to 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 any creative work.
[0098] Figure 1 A schematic diagram of a flow chart of a routing method for a hypercube network provided by an embodiment of the present invention;
[0099] Figure 2 A schematic diagram of forming a three-dimensional hypercube subnetwork provided by an embodiment of the present invention;
[0100] Figure 3 A schematic diagram of the structure of a four-dimensional hypercube subnetwork provided by an embodiment of the present invention;
[0101] Figure 4 A schematic diagram of the structure and routing of a two-dimensional network provided in an embodiment of the present invention;
[0102] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0103] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0104] The terms "include", "includes" and "including", as well as any forms of these terms, such as "including", "includes" and "including", in the specification and the above-mentioned drawings of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but can include steps or units not listed.
[0105] In order to better understand the present application by those skilled in the art, the present application will be further described in detail below in combination with the drawings and specific embodiments.
[0106] Next, a routing method of a hypercube network provided by the embodiment of the present application will be described in detail. Referring to Figure 1 shown, Figure 1 A flowchart of a routing method of a hypercube network provided by the embodiment of the present application; the routing method of the hypercube network comprises:
[0107] S11: dividing the hypercube network into a plurality of m-dimensional hypercube sub-networks; wherein each m-dimensional hypercube sub-network is mutually exclusive; m is a positive integer greater than or equal to 4;
[0108] As can be easily understood, in order to meet the development needs of parallel computing, hypercube networks have developed rapidly, and the dimensions of hypercube networks are also constantly extending. High-dimensional hypercubes are realized based on low-dimensional hypercubes. Referring to Figure 2 shown, Figure 2 A formation diagram of a three-dimensional hypercube sub-network provided by the embodiment of the present application; a three-dimensional hypercube is composed of two two-dimensional hypercubes connected according to certain connection rules. The two two-dimensional hypercubes will number the four nodes corresponding to each other in the same way, such as Figure 2 shown, node 00, node 01, node 10 and node 11, then connect the nodes with the same number in the two two-dimensional hypercubes with dimension edges, add 0 before the number of all nodes in one two-dimensional hypercube, and add 1 before the number of all nodes in the other two-dimensional hypercube, to obtain a three-dimensional hypercube as shown on the right. Figure 2 The connectivity of the nodes of the three-dimensional hypercube is 3, the diameter is 3, there are 8 vertices (corresponding to 8 nodes) and 12 edges. Further, an n-dimensional hypercube is composed of two n-1-dimensional hypercubes connected according to certain connection rules. The connection mode is: connect the nodes with the same number in the two n-1-dimensional hypercubes with dimension edges, and add 0 before the number of all nodes in one n-1-dimensional hypercube, and add 1 before the number of all nodes in the other n-1-dimensional hypercube.
[0109] It can be understood that, based on this architecture, in order to optimize the routing path in the hypercube network, this application divides an n-dimensional hypercube network into several m-dimensional hypercube sub-networks. An n-dimensional hypercube network is composed of two independent n-1-dimensional hypercubes connected according to certain connection rules. An n-1-dimensional hypercube network is composed of two independent n-2-dimensional hypercubes connected according to certain connection rules. Therefore, an n-dimensional hypercube network is composed of four independent n-2-dimensional hypercubes connected according to certain connection rules. By analogy, an n-dimensional hypercube network is composed of two independent n-2-dimensional hypercubes connected according to certain connection rules. n-m The network consists of independent m-dimensional hypercube subnetworks, each of which does not intersect with each other. This means that several m-dimensional hypercube subnetworks can form a complete hypercube network. To improve network performance and reduce the risk of network congestion, this application implements multicast routing of messages using the divided m-dimensional hypercube subnetworks as units. This application does not specifically limit the specific value of m or the implementation method. However, considering that unicast routing will ultimately be performed using a two-dimensional network as a unit, the optimal value of m is 4.
[0110] Furthermore, the value of m can be determined specifically based on the number of target nodes of the message to be transmitted. If the number of target nodes of the message to be transmitted is small, the value of m can be appropriately increased; if the number of target nodes of the message to be transmitted is large, the value of m can be appropriately reduced; so that the number of target nodes in each m-dimensional hypercube subnetwork is maintained at an appropriate preset value, avoiding excessive delays when performing unicast routing in the m-dimensional hypercube subnetwork; the value of m also needs to be determined according to the dimension of the hypercube network, that is, m needs to be less than n, where n is the dimension of the hypercube network. For an n-dimensional hypercube network, when dividing the m-dimensional hypercube subnetwork, you can first determine its corresponding two n-1-dimensional hypercube networks, and then determine the n-2-dimensional hypercube networks corresponding to each of the two n-1-dimensional hypercube networks, until the 2 hypercube networks that make up the hypercube network are determined. n-m m-dimensional hypercube subnetworks. This application does not specifically limit the specific method of dividing the hypercube network, nor does it specifically limit the implementation method of the hypercube network itself. The division of the hypercube network does not affect the topology of the hypercube network itself, but is only used to facilitate routing and grouping of nodes in different areas of the network.
[0111] S12: Determine the number of target hypercube subnetworks; wherein the target hypercube subnetwork is an m-dimensional hypercube subnetwork including the target node;
[0112] It should be noted that considering that target nodes do not necessarily exist in each m-dimensional hypercube subnetwork in actual application, after the division of the m-dimensional hypercube subnetwork is completed, it is further needed to determine the target hypercube subnetworks in which target nodes exist, and subsequently only the target hypercube subnetworks need to be routed. The specific determination manner of the target hypercube subnetworks is not particularly limited herein.
[0113] As a specific embodiment, refer to Figure 3 , Figure 3 which is a structural schematic diagram of a four-dimensional hypercube subnetwork provided by an embodiment of the present application; taking m=4 as an example, taking a four-dimensional hypercube as a minimum unit, for an n (n>4) dimensional hypercube network, the hypercube network is divided into two n-4 four-dimensional hypercube units. For each node in the n-dimensional hypercube network, an n-bit binary number is used to represent the node address of the node. When the n-bit binary number is used to represent the node address, for all nodes in the same m-dimensional hypercube in the n-dimensional hypercube network, the binary numbers corresponding to the continuous n-m bits starting from the highest bit are consistent, and for all nodes in the same four-dimensional hypercube in the n-dimensional hypercube network, the binary numbers corresponding to the continuous n-4 bits starting from the highest bit are consistent. The source node s in the hypercube network is defined as , wherein represents the n-bit node address of the source node s, a message needs to be transmitted from the source node to a plurality of target nodes, and the set of node addresses of the plurality of target nodes is defined as D. First, the n-dimensional hypercube network is divided into two n-4 four-dimensional hypercube units, all target nodes belonging to the same four-dimensional hypercube are saved into a set , that is, the part of the same four-dimensional hypercube in which the node addresses are consistent, assuming that the number of target hypercube subnetworks is k, finally k target node subsets are obtained, that is, k first sets which are not empty sets.
[0114] For example, for a 6-dimensional hypercube network, the 6-dimensional hypercube network is divided into four four-dimensional hypercube units, the first two addresses of the nodes in the four four-dimensional hypercube units are 00, 01, 10 and 11 respectively, and the first set corresponding to each four-dimensional hypercube unit is:
[0115] ;
[0116] ;
[0117] ;
[0118] ;
[0119] in, Represents any element in the first set.
[0120] S13: Based on the source node, replicate k-1 copies of the message to obtain k messages to be transmitted; where k is the number of the determined target hypercube subnetworks;
[0121] It will be appreciated that, for packets from a source node to each target hypercube subnetwork, this application utilizes multicast routing, where k is a positive integer. Once the number of target hypercube subnetworks is determined, the packet is replicated directly at the source node, resulting in a total of k packets to be transmitted, including the original packet, corresponding one-to-one to the k determined target hypercube subnetworks.
[0122] S14: sending the k to-be-transmitted messages to the corresponding k target hypercube sub-networks one by one;
[0123] It is not difficult to understand that after obtaining k messages to be transmitted, each message to be transmitted can be sent to each target hypercube sub-network one by one, so that each message to be transmitted can be further routed to each target node in the target hypercube sub-network. Considering the mutual relationship between each target hypercube sub-network, in order to further improve network performance and reduce routing delay, it is possible to choose to transmit k messages to be transmitted to the corresponding k target hypercube sub-networks at the same time. For example, taking the 6-dimensional hypercube network mentioned above as an example, it is necessary to copy k-1 messages at the source node and transmit k messages to the first set containing the target node at the same time. The corresponding four-dimensional hypercube unit.
[0124] S15: For any target hypercube sub-network, if a message to be transmitted is received, the target two-dimensional network is accessed in sequence in a unicast manner to transmit the message to be transmitted to each target node in the target hypercube sub-network; wherein the target two-dimensional network is a two-dimensional network containing the target node in the target hypercube sub-network.
[0125] It is understood that after a message to be transmitted is sent to the corresponding target hypercube subnetwork, each target hypercube subnetwork can then route the message to be transmitted within it. Within any target hypercube subnetwork, the message to be transmitted accesses the target two-dimensional network in sequence, using the two-dimensional network as a unit. Each time a target two-dimensional network is accessed, it is transmitted to the target node in the target two-dimensional network, and the message to be transmitted is copied and uploaded until all target two-dimensional networks are accessed, completing the message transmission to all target nodes in the target hypercube subnetwork. Since each target hypercube subnetwork is independent of each other, the routing of the message to be transmitted within it does not affect each other. If necessary, k messages to be transmitted can be routed in parallel, saving routing time. This application does not specifically limit the specific methods by which the message to be transmitted accesses the target two-dimensional network or how it is routed to the target node within the two-dimensional network. To further optimize the routing path, when performing unicast routing within the target hypercube subnetwork, the target two-dimensional network containing the target node is first determined, and two-dimensional networks that do not contain the target node can be directly skipped. At the same time, access priorities can be set for each target two-dimensional network to implement a multicast routing algorithm based on group priority.
[0126] This paper proposes a packet-based interconnected network multicast routing algorithm for hypercube networks. This algorithm divides an n-dimensional hypercube network into m (e.g., four)-dimensional hypercubes, using m-dimensional (e.g., four-dimensional) hypercubes as the smallest unit. Messages are then routed from source nodes to each four-dimensional hypercube unit via multicast transmission. Within each four-dimensional hypercube unit, the messages are then routed to each destination node by sequentially accessing each two-dimensional network, completing multicast routing. This algorithm optimizes the path length of message routing in hypercube networks, particularly high-dimensional ones, improving network performance and reducing costs.
[0127] As an optional embodiment, determining the number of target hypercube sub-networks includes:
[0128] Determine the first address of all target nodes; wherein the first address is a binary address containing a plurality of bits;
[0129] Identify the most significant bit to the (m+1)th bit of the first address, and determine the affiliation between each target node and each m-dimensional hypercube subnetwork based on the identification result; wherein the least significant bit of the binary address is the first bit;
[0130] For any m-dimensional hypercube subnetwork, a first set is constructed; wherein the first set is a set consisting of first addresses of target nodes in the m-dimensional hypercube subnetwork;
[0131] If the first set is not an empty set, the m-dimensional hypercube subnetwork corresponding to the first set is determined to be the target hypercube subnetwork.
[0132] It is not difficult to understand that the present application uses n-bit binary numbers to represent node addresses. The first address is also the node address of the target node represented by an n-bit binary number. Considering that the first nm bits of the binary numbers corresponding to the nodes in the same m-dimensional hypercube subnetwork are consistent, that is, for the node address In terms of Indicates the nth node address of node d, where node d is any node in the hypercube network, starting from the highest bit (nth bit) Start from the m+1th position , the binary numbers in this part will be completely consistent, so the ownership relationship between each target node and each m-dimensional hypercube subnetwork can be determined by identifying the binary numbers of these bits, that is, for any target node, determine which m-dimensional hypercube subnetwork it belongs to. At the same time, the first address of the target node is used to construct the first set of each m-dimensional hypercube subnetwork. If there is a target node in the m-dimensional hypercube subnetwork, the first set is a set composed of the first addresses of the corresponding target nodes, indicating that the m-dimensional hypercube subnetwork is the target hypercube subnetwork; if there is no target node in the m-dimensional hypercube subnetwork, the first set is an empty set, indicating that the m-dimensional hypercube subnetwork is not the target hypercube subnetwork. For example, when m is 4, by comparing This part of the address is used to realize the correspondence between the target node and each m-dimensional hypercube sub-network, and as shown in the above 6-dimensional hypercube network, the first set corresponding to the four 4-dimensional hypercube units is constructed according to the first two bits of the address.
[0133] Specifically, the correspondence between the target node and each m-dimensional hypercube sub-network can be determined directly by comparing and identifying the bits at a specific position in the first address, and based on this, the target hypercube sub-network can be located, so as to subsequently determine the number of message copies that the source node needs to replicate, and selectively send the message to be transmitted to the target hypercube sub-network. This is simple, effective, and easy to implement.
[0134] As an optional embodiment, k to-be-transmitted messages are sent one-to-one to corresponding k target hypercube sub-networks, including:
[0135] For any target hypercube subnetwork, determine whether the source node belongs to the target hypercube subnetwork;
[0136] If so, the message of the source node is used as the message to be transmitted in the target hypercube sub-network;
[0137] If not, then select a node from the target hypercube subnetwork as the identification node of the target hypercube subnetwork;
[0138] The copy of the message copied by the source node is sent from the source node to the identification node.
[0139] It will be appreciated that after the target hypercube subnetwork is determined, message transmission from the source node to the target hypercube subnetwork can begin. At this point, it is necessary to further determine the affiliation between the source node and the target hypercube subnetwork. If the source node belongs to a target hypercube subnetwork, this indicates that the message to be transmitted, currently located at the source node, is already in the target hypercube subnetwork. At this point, the process of sending the message to be transmitted to the target hypercube subnetwork has already been completed. Therefore, the message can be directly determined as having been transmitted to the target hypercube subnetwork, and the subsequent step S15 can be directly performed. If the source node does not belong to a target hypercube subnetwork, a copy of the message must be sent to the target hypercube subnetwork. Since the target hypercube subnetwork contains multiple nodes, a node in the target hypercube subnetwork must be selected as the identification node of the target hypercube subnetwork to provide a routing destination address for the message copy. Thus, routing the message to the target hypercube subnetwork is completed by sending the message copy from the source node to the identification node. If the source node does not belong to any target hypercube subnetwork, the message will also be sent as a message copy from the source node to the identification node of one of the target hypercube subnetworks. The specific method of selecting the identification node is not specifically limited in this application.
[0140] It should be noted that both the original message and the message copy at the source node are treated as separate messages to implement multicast routing between the source node and the target hypercube subnetwork. There is no specific distinction between the two. In practical applications, a message copy can also be retained in the target hypercube subnetwork corresponding to the source node, while the original message is transmitted to the identification node of another target hypercube subnetwork. This is not limited to the implementation of this embodiment. Considering that after the source node replicates k messages to be transmitted, the transmission of the messages to be transmitted by each target hypercube subnetwork is independent of each other, this embodiment uses one target hypercube subnetwork as an example to illustrate multicast routing of messages from the source node to the target hypercube subnetwork. The message transmission method for each target hypercube subnetwork can also be implemented using this method, and this application will not elaborate further. The messages to be transmitted refer to the messages sent to the target hypercube subnetwork, waiting to be sent from the identification node of the target hypercube subnetwork or the source node to the target node in a two-dimensional network unit. These messages are the k messages obtained by replicating the original message at the source node and sending them to each target hypercube subnetwork. The specific method for determining whether the source node belongs to the target hypercube subnetwork can refer to the previous embodiment, which is achieved by comparing the binary numbers corresponding to the first nm bits of the node address. Other methods can also be used, and this application does not make any special restrictions here.
[0141] Specifically, the specific manner of multicast routing the message to each target hypercube subnetwork is determined according to different relationships between the source node and the target hypercube subnetwork, so as to ensure that each target hypercube subnetwork receives a valid message to be transmitted.
[0142] As an optional embodiment, selecting a node from the target hypercube sub-network as an identification node of the target hypercube sub-network includes:
[0143] Comparing the second address of the source node with the node addresses of each node in the target hypercube subnetwork; wherein the second address and the node address are both binary addresses containing a plurality of bits;
[0144] The node corresponding to the third address is selected as the identification node of the target hypercube subnetwork; wherein the third address is the node address of any node in the target hypercube subnetwork, and the third address is identical to the second address in bits from the first bit to the mth bit.
[0145] It is easy to understand that to further optimize the routing path, when determining the identification node of the target hypercube subnetwork, preference is given to selecting the node closest to the source node in the target hypercube subnetwork. A preferred embodiment is to select the node closest to the source node as the identification node. Closest distance means the minimum number of hops required from the source node to the identification node. Specifically, the node corresponding to the third address whose bits from the first to the mth position are identical can be directly determined as the identification node. Because the first to the mth positions of this node are identical to those of the source node, this node is directly or indirectly connected to the source node in the hypercube network via a dimensional edge of the hypercube network and is therefore closest to the source node in the target hypercube subnetwork.
[0146] As a specific embodiment, taking m as 4 as an example, the first set is defined as ,in, The first n-4 bits of the node addresses in the first set are consistent. If the first set of target nodes corresponding to a target hypercube subnetwork is , the part of the set with the same address and the first n-4 bits of the source node Completely consistent, that is, the target node in the first set and the source node are in the same four-dimensional hypercube unit, then directly go to step S15. in , it means that the target node and the source node in the first set are not in the same four-dimensional hypercube unit. At this time, the message needs to be transmitted from the source node to the identification node in the four-dimensional hypercube unit corresponding to the first set. Among them, the first to fourth bits representing the node are directly taken as the bits corresponding to the source node , the other bits retain the first n-4 bits of the corresponding target hypercube subnetwork. After the message is transmitted from the source node to the identification node of the first set using the routing method described in the next embodiment, the process proceeds to step S15.
[0147] Specifically, the identification node is determined by directly using the source node to define the node address, and the node closest to the source node in the target hypercube subnetwork is determined as the identification node through the address relationship between the nodes, so as to shorten the routing path of the message multicast routing from the source node to the identification node.
[0148] As an optional embodiment, sending the message copy copied by the source node from the source node to the identification node includes:
[0149] determining an exclusive OR result of the third address and the second address;
[0150] The source node is determined as the current node, and the highest bit of the XOR result is determined as the current bit;
[0151] Determine whether the current bit of the XOR result is 1;
[0152] If yes, then the corresponding bit of the node address of the current node is inverted to obtain the node address of the next hop node, and a copy of the message is sent from the current node to the next hop node;
[0153] Determine the next hop node as the new current node, determine the next bit of the XOR result as the current bit, and jump again to the step of determining whether the current bit of the XOR result is 1;
[0154] If not, jump directly to the step of determining the next bit of the XOR result as the current bit.
[0155] It is understandable that the process of transmitting directly from one node to its adjacent node is called a hop, and an adjacent node refers to a node that is directly connected to it through an edge. In a hypercube network, each node is responsible for forwarding the message to the next hop node. This next hop node must be an adjacent node that can be reached by one hop, and the message is transmitted from the source node to the destination through multiple one-hop routing. The transmission of the message in this application also needs to be implemented in this hop-by-hop routing manner. Taking into account that the source node and the identification node are not necessarily directly adjacent, it is necessary to use the node addresses of the source node and the identification node to determine the intermediate nodes that the message needs to pass through in sequence from the source node to the identification node. Specifically, after performing an XOR operation on the third address and the second address, the specific situation of each bit needs to be determined starting from the highest bit of the XOR result. At the same time, starting from the source node, the message is sent from the current node to the next hop node in sequence. If a bit is 1 (non-zero bit), the corresponding bit in the current node is inverted to obtain the address of the next hop node. This process is repeated to obtain all intermediate nodes. Starting from the highest bit, the intermediate nodes determined are the first intermediate node, the second intermediate node, and so on to the last intermediate node. After each next hop node address is determined, the message is sent to the next hop node. That is, the source node is first used as the current node, and the bit corresponding to the first non-zero bit (the highest non-zero bit) in the node address of the source node is inverted to obtain the next hop node. The message is sent to the next hop node. At this time, the next hop node is used as the new current node, and the bit corresponding to the second non-zero bit in the node address of this new current node is inverted to obtain the next hop node. This process is repeated, so that the message is controlled to pass through these intermediate nodes in this order and reach the identification node.
[0156] Assume that the XOR result is ,but , and then determine in order from left to right Each non-zero bit in the source node is inverted in turn to obtain the address of the intermediate node, and the message is sent to each intermediate node in turn until the message is transmitted to the identification node. .
[0157] As a specific embodiment, taking a 7-dimensional hypercube network as an example, m is 4, and assuming that the source node is , through the first address recognition of the above embodiment, the target node in the same four-dimensional hypercube is saved into the corresponding first set, and three first sets containing the target node are obtained. 、 and At this time, k-1=2 message copies need to be replicated at the source node, and three messages (including two message copies and one message original) need to be transmitted to the three four-dimensional hypercube units corresponding to the first set.
[0158] Among them, for the first set Since the first three digits of the source node are also 010, the first set With the source node In the same four-dimensional hypercube unit, go directly to step S15. , since the first set With the source node If they are not in the same 4D hypercube unit, you need to first determine the identification node , and then send the message from the source node Transfer to the identification node The routing process is as follows: First, With the source node XOR, we get:
[0159] ;
[0160] XOR result The first bit on the left of the source node is non-zero, so the first bit of the source node address is inverted to determine the first intermediate node is 1100111, and the message is sent from the source node Transmitted to node 1100111 through one hop. Since the second bit on the left is non-zero, the second bit of the current node 1100111 is inverted to determine that the second intermediate node is 1000111, and the message is transmitted from node 1100111 to node 1000111 through one hop. The third bit from the left of is non-zero, so the third bit of the current node 1000111 is inverted to determine the next hop node as 1010111 (i.e., the identification node), and the message is transmitted from node 1000111 to node 1010111 through one hop. Then, the process goes to step S15.
[0161] For the first set , since the first set With the source node If they are not in the same 4D hypercube unit, you need to first determine the identification node , and then send the message from the source node Transfer to the identification node The routing process is as follows: First, With the source node XOR, we get:
[0162] ;
[0163] XOR result The first bit on the left of the source node is non-zero, so the first bit of the source node address is inverted to determine the first intermediate node is 1100111, and the message is sent from the source node Transmitted to node 1100111 through one hop. Then The third bit from the left of is non-zero, so the third bit of the current node 1100111 is inverted to obtain the identification node 1110111. The message is then transmitted from the current node 1100111 to the identification node 1110111, and the process proceeds to step S15. Step S15 completes the process by transmitting the message from the current node (source node or identification node) to each destination node in the first set using sequential access unicast routing within the four-dimensional hypercube unit.
[0164] Specifically, the XOR calculation and address inversion operations are used to determine the next hop node corresponding to each current node in turn, so that the message is routed from the source node to each identification node in a hop-by-hop manner, realizing multicast routing of the message from the source node to each target hypercube subnetwork.
[0165] As an optional embodiment, before sequentially accessing the target two-dimensional network in a unicast manner, the method further includes:
[0166] For any target hypercube subnetwork, determining each target two-dimensional network in the target hypercube subnetwork;
[0167] Configure priorities for all target 2D networks;
[0168] Use unicast to access the target two-dimensional network in sequence, including:
[0169] In order of priority, each target two-dimensional network is accessed in turn using unicast.
[0170] It is not difficult to understand that in order to further optimize the routing efficiency in the target hypercube subnetwork, the present application will further pre-configure the priority of each target two-dimensional network in the target hypercube subnetwork when accessed in sequence, implement a priority-based routing algorithm within the m-dimensional hypercube subnetwork group, and combine it with dividing the hypercube network into m-dimensional hypercube subnetworks to implement an interconnected network multicast routing algorithm based on group priority. The target two-dimensional networks in the target hypercube subnetwork are calibrated according to specific rules, and then, according to the order of the calibrated priorities, the messages to be transmitted are routed from the source node or identification node to the target nodes corresponding to each target two-dimensional network. The present application does not make any special restrictions on the specific configuration method of the priority.
[0171] Specifically, through appropriate priority calibration, the routing path of the message to be transmitted when accessing the target two-dimensional network can be further optimized, thereby improving the performance of the entire hypercube network.
[0172] As an optional embodiment, determining each target two-dimensional network in the target hypercube sub-network includes:
[0173] Identify the mth to third bits of the first address of each target node in the target hypercube subnetwork, and determine the ownership relationship between each target node in the target hypercube subnetwork and each two-dimensional network in the target hypercube subnetwork based on the identification result;
[0174] For any two-dimensional network, construct a second set; wherein the second set is a set consisting of first addresses of target nodes in the two-dimensional network;
[0175] If the second set is not an empty set, the two-dimensional network corresponding to the second set is determined to be the target two-dimensional network.
[0176] It is understandable that each target node in the same target hypercube subnetwork will belong to a different two-dimensional network. The binary numbers corresponding to the first n-2 bits of each node in the same two-dimensional network are consistent. At the same time, since this is for the same target hypercube subnetwork, it is only necessary to identify the mth to third bits of the first address of the target node to determine the correspondence between each target node and the two-dimensional network, and thereby generate the second set corresponding to each two-dimensional network. If the first set of each target hypercube subnetwork has been generated previously, the elements in the corresponding first set can be directly divided into several second sets based on the mth to third bits of the address. The specific implementation of the second set is similar to that of the first set, and this application will not repeat them here.
[0177] Specifically, the target nodes are directly divided into second sets corresponding to the respective two-dimensional networks according to the address rules by means of address identification. Subsequently, the target two-dimensional network can be configured by prioritizing the second sets, so that the subsequent target hypercube subnetwork can implement message routing according to the second set.
[0178] As an optional embodiment, priorities are configured for all target two-dimensional networks, including:
[0179] The priority of each target two-dimensional network is configured based on the minimum number of hops between the target two-dimensional network and the current node; the smaller the minimum number of hops of the target two-dimensional network, the higher its priority;
[0180] If there are target two-dimensional networks with the same minimum hop count, the priority of the target two-dimensional networks with the same minimum hop count is configured based on the number of target nodes in the target two-dimensional networks; wherein, the more target nodes in the target two-dimensional network, the higher its priority.
[0181] It's easy to understand that, considering the hop-by-hop routing of messages and the varying number of target nodes in different two-dimensional networks, this application prioritizes the distance between the target two-dimensional network and the current node. If the distance between the target two-dimensional network and the current node is consistent, the priority of the target two-dimensional network with the same distance is further assigned based on the number of target nodes. Because messages constantly change position as hop-by-hop routing proceeds, any target two-dimensional network will have different distances from different target two-dimensional networks. Therefore, priority assignment needs to be adjusted as the message's position changes. Initially, a message originates from a source node or an identifier node. At this point, the priority of the target two-dimensional network needs to be assigned based on its distance from the source node or identifier node. After completing message transmission to the target node in the highest-priority target two-dimensional network, the current node becomes a target network within the highest-priority target two-dimensional network. Subsequent priority assignments need to be based on the distance between each target two-dimensional network and the current node. It's best to pre-configure the priorities of all target two-dimensional networks in the target hypercube subnetwork based on the message's path before routing the message.
[0182] Specifically, priority configuration is performed based on the distance corresponding to the minimum number of hops to ensure that the routing of the message in the target hypercube subnetwork can access all target two-dimensional networks in sequence according to the shortest path, thereby optimizing the routing path; at the same time, a secondary priority configuration basis is provided to avoid priority conflicts caused by consistent distances.
[0183] As an optional embodiment, m is 4, and priorities are configured for all target two-dimensional networks, including:
[0184] A first network subset, a second network subset, a third network subset, and a fourth network subset are defined; wherein the first network subset has the highest priority, the second network subset has the second highest priority, and the fourth network subset has the lowest priority;
[0185] The binary number composed of the fourth and third digits of the node address of each two-dimensional network in the target hypercube subnetwork is defined as the sequence number of the two-dimensional network;
[0186] Determine a first number; wherein the first number is a binary number composed of the fourth and third digits of the source node;
[0187] The first bit of the first number is inverted to obtain a second number, the second bit of the first number is inverted to obtain a third number, and the first and second bits of the first number are simultaneously inverted to obtain a fourth number;
[0188] determining whether the first node quantity is 0; wherein the first node quantity is the number of target nodes in the two-dimensional network with the same serial number and first number;
[0189] if the first node quantity is 0, setting the first network subset as an empty set;
[0190] if the first node quantity is not 0, determining the second set of the two-dimensional network corresponding to the first node quantity as the first network subset;
[0191] determining whether the second node quantity is less than the third node quantity; wherein the second node quantity is the number of target nodes in the two-dimensional network with the same serial number and second number, and the third node quantity is the number of target nodes in the two-dimensional network with the same serial number and third number;
[0192] if the second node quantity is greater than or equal to the third node quantity, determining whether the second node quantity is 0 and determining whether the third node quantity is 0;
[0193] if the second node quantity is 0, setting the second network subset as an empty set;
[0194] if the second node quantity is not 0, determining the second set of the two-dimensional network corresponding to the second node quantity as the second network subset;
[0195] if the third node quantity is 0, setting the fourth network subset as an empty set;
[0196] if the third node quantity is not 0, determining the second set of the two-dimensional network corresponding to the third node quantity as the fourth network subset;
[0197] if the second node quantity is less than the third node quantity, determining whether the second node quantity is 0 and determining whether the third node quantity is 0;
[0198] if the third node quantity is 0, setting the second network subset as an empty set;
[0199] if the third node quantity is not 0, determining the second set of the two-dimensional network corresponding to the third node quantity as the second network subset;
[0200] if the second node quantity is 0, setting the fourth network subset as an empty set;
[0201] if the second node quantity is not 0, determining the second set of the two-dimensional network corresponding to the second node quantity as the fourth network subset;
[0202] determining whether the fourth node quantity is 0, wherein the fourth node quantity is the number of target nodes in the two-dimensional network with the same index as the fourth index;
[0203] if the fourth node quantity is 0, setting the third network subset as an empty set;
[0204] if the fourth node quantity is not 0, determining the second set of the two-dimensional network corresponding to the fourth node quantity as the third network subset.
[0205] It can be understood that, taking the target hypercube sub-network as an example, the four-dimensional hypercube sub-network includes four two-dimensional networks, and therefore four network subsets can be defined in advance to configure the priority of the four sequences, and then the distance relationship between the nodes and the source node is determined according to the index corresponding to the last two bits of the node address, and then the priority configuration of the two-dimensional network with the same distance corresponding to the target node is performed, and if there is no target node in the two-dimensional network, the corresponding network subset is directly defined as an empty set, so that subsequent steps can be directly skipped. The first network subset, the second network subset, the third network subset and the fourth network subset are used to configure the priority, and do not have elements themselves, but the second set of the two-dimensional network is assigned to the corresponding network subset through subsequent judgment to complete the priority configuration. When applied to an m-dimensional hypercube sub-network, the selection of the index can be adaptively modified to the mth bit to the third bit, and the implementation process is similar, which will not be described herein.
[0206] Specifically, the network subset is introduced to facilitate the configuration of the priority, and the distance between the two-dimensional networks is determined by using the relationship between the last two bits of the node address, so as to determine the priority order.
[0207] As an optional embodiment, each target two-dimensional network is sequentially accessed in the order of the priority by using the unicast mode, including:
[0208] determining the first network subset as the current network subset, and determining whether the current network subset is an empty set;
[0209] if yes, transmitting the to-be-transmitted packet from the current node to the two-dimensional network corresponding to the next network subset in the priority order, and determining the next network subset as the current network subset, and jumping to the step of determining whether the current network subset is an empty set;
[0210] wherein, if the current network subset is the first network subset, and the current node is the routing starting point of the to-be-transmitted packet in the target hypercube sub-network;
[0211] if no, transmitting the to-be-transmitted packet from the current node to the target node of the current network subset, and controlling the count value to be reduced by 1; the initial value of the count value is 4;
[0212] Determine whether the count value is 0;
[0213] If the count value is 0, the routing ends;
[0214] If the count value is not 0, the process jumps to the step of sending the message to be transmitted from the current node to the two-dimensional network corresponding to the next network subset in the priority order, and determining the next network subset as the current network subset.
[0215] It is not difficult to understand that after the priority is configured, the message will be transmitted according to the configured priority, and a count value will be introduced to determine whether the access to all target two-dimensional networks is completed. This application does not specifically limit the specific type of the count value and the implementation method. The count value can be configured directly according to the total number of network subsets, or only the network subsets of the non-empty set can be considered for the configuration of the count value. The process of routing a message from one two-dimensional network to another two-dimensional network is also implemented based on the adjacent nodes. For example, a node belonging to another two-dimensional network is determined, and the node is used as the next hop node to realize the message transmission between the two two-dimensional networks.
[0216] As a specific embodiment, taking the four-dimensional hypercube subnetwork as the target hypercube subnetwork in this embodiment as an example, assuming that the source node , the first set of corresponding four-dimensional hypercube subnetworks is , the current node is At the beginning of the message to be transmitted being sent to the four-dimensional hypercube sub-network, the current node is the source node (the four-dimensional hypercube sub-network where the source node is located) or the identification node. First, the two-dimensional network in the four-dimensional hypercube sub-network is divided. On the basis of the first set, the first set is divided into Divide into two target node subsets corresponding to two three-dimensional hypercube sub-networks and ,in:
[0217] ;
[0218] ;
[0219] Then continue to divide and , and obtain the second set corresponding to each two-dimensional network:
[0220] ; Set the number of target nodes in the second set to ;
[0221] ; Set the number of target nodes in the second set to ;
[0222] ; Set the number of target nodes in the second set to ;
[0223] ; Set the number of target nodes in the second set to .
[0224] Then we start to determine the priority of each second set in the routing process. The first number corresponding to the source node is , so the second number is , the third number is , the fourth number is . judge and The size of Indicates the third number The number of target nodes in the corresponding second set, if , then let ;if , then let Set the sequence number t and the count value k2, configure the initial values of both, let t=1, k2=0, and define the first network subset , the second network subset , the third network subset and the fourth network subset , where k2 represents , , , Then configure the priority (the first priority is the highest):
[0225] First priority: If ,but , control k2+1; if , ;
[0226] Second priority: If ,but , control k2 to continue to increase by 1; if , ;
[0227] Third priority: If ,but , control k2 to continue to increase by 1; if , .
[0228] Fourth priority: If ,but , control k2 to continue to increase by 1; if , .
[0229] Then start routing, step S21: first determine Is it an empty set? If , then go to step S22; if , then go to step S23.
[0230] Step S22: According to the routing algorithm in the two-dimensional network, the message is sent from the current node Transfer to 2D network Among all target nodes in , update k2, k2=k2-1, and go to step S24.
[0231] Step S23: Send the message from the current node Routing to Collections In the corresponding two-dimensional network, the message is sent from the node Routing to nodes , update t, t=t+1, and then re-enter step S11.
[0232] Step S24: Determine whether k2 is 0. If k2=0, end routing; if k2 is not equal to 0, go to step S23.
[0233] As a specific embodiment, the source node in the four-dimensional hypercube subnetwork For example, assuming that the first set of target nodes is .like Figure 3 As shown, step 1: divide the first set of target nodes into two subsets corresponding to the three-dimensional hypercube subnetwork and , respectively:
[0234] ;
[0235] ;
[0236] Then continue to divide and , we get the second set of target nodes, each second set is:
[0237] ; The number of target nodes is ;
[0238] ; The number of target nodes is ;
[0239] ; The number of target nodes is ;
[0240] ; The number of target nodes is ;
[0241] The partitioning results in 4 second sets, and k2=4.
[0242] Step 2: Determine the priority of the two-dimensional network in the multicast routing process.
[0243] because , , ,so , let t=1, k2=0.
[0244] First priority: , k2=1;
[0245] Second priority: , k2=2;
[0246] Third priority: , k2=3;
[0247] Fourth priority: , k2=4.
[0248] Step 3: Judgment Is it an empty set? , go to step S22.
[0249] Step 4: According to the routing algorithm in the two-dimensional network, the message is sent from the current node Transfer to Collection Among all target nodes in , the routing path is: 0110→0100, k2=k2-1=3, and the process goes to step S24.
[0250] Step 5: Since k2=3, which is not equal to 0, go to step S23.
[0251] Step 6: Send the message from the current node Routing to Collections In the corresponding two-dimensional network, the message is sent from the node Routing to nodes , t=2, go to step S11.
[0252] Step 7: Due to , go to step S22.
[0253] Step 8: According to the routing algorithm in the two-dimensional network, the message is sent from the current node Transfer to Collection Among all target nodes in , the routing path is 1100→1101→1111→1110, k2=k2-1=2, and the process goes to step S24.
[0254] Step 9: Since k2=2, which is not equal to 0, go to step S23.
[0255] Step 10: Send the message from the current node Routing to Collections In the corresponding two-dimensional network, the message is sent from the node Routing to nodes , t=3, go to step S11.
[0256] Step 11: Because , go to step S22.
[0257] Step 12: According to the routing algorithm in the two-dimensional network, the message is sent from the current node Transfer to a 2D set Among all target nodes in , the routing path is: 1010→1000, k2=k2-1=1, and the process goes to step S24.
[0258] Step 13: k2=1, not equal to 0, go to step S23.
[0259] Step 14: Send the message from the current node Routing to Collections In the corresponding two-dimensional network, the message is sent from the node Routing to nodes , t=4, go to step S11.
[0260] Step 15: Because , go to step S22.
[0261] Step 16: According to the routing algorithm in the two-dimensional network, the message is sent from the current node Transfer to Collection Among all target nodes in , the routing path is: 0000→0001→0011→0010, k2=k2-1=0, and the process goes to step S24.
[0262] Step 17: Since k2=0, routing ends.
[0263] Specifically, by sequentially accessing each target two-dimensional network, the target nodes in each target hypercube sub-network can accurately and effectively receive the message to be transmitted, thereby completing message routing.
[0264] As an optional embodiment, transmitting the message to be transmitted from the current node to the target node in the current network subset includes:
[0265] Transmit the message to be transmitted from the current node to the target node in the current network subset based on the neighboring nodes.
[0266] It is understood that routing algorithms in two-dimensional networks also require a hop-by-hop approach. When a message is sent to a network subset corresponding to a two-dimensional network, the next hop node adjacent to the current node is determined, and the next hop node from the current node to the target node is determined in turn, thus completing the message routing. This application does not specifically limit the specific method for determining adjacent nodes.
[0267] Specifically, hop-by-hop routing can ensure that messages are effectively and reliably transmitted to each target node, with better flexibility and scalability, stronger fault tolerance, and improved accuracy and reliability of message routing.
[0268] As an optional embodiment, transmitting the message to be transmitted from the current node to the target node of the current network subset based on the neighboring node includes:
[0269] For any target two-dimensional network, construct a third set; wherein the third set is a set of addresses of target nodes in the target two-dimensional network obtained by retaining only the first and second bits of the first address;
[0270] Determine an exclusive OR result between each element in the third set and the two-dimensional address suffix of the initial node; wherein the initial node is the routing starting point of the message to be transmitted in the target two-dimensional network;
[0271] Sort the XOR results corresponding to the elements in the third set in ascending order to obtain a fourth set, and adjust the elements in the third set to the corresponding order; wherein the fourth set is a set consisting of the XOR results corresponding to the elements in the third set;
[0272] Determine the initial node as the current node, and determine whether the current node is the target node based on the first element of the fourth set;
[0273] If the current node is the target node, the message to be transmitted is copied to the current node, and the element corresponding to the current node in the third set and the XOR result corresponding to the current node in the fourth set are deleted;
[0274] Determine whether the remaining elements in the third set are 3;
[0275] If the number of remaining elements is 3, swap the positions of the last two elements in the third set and swap the position of the last element in the fourth set;
[0276] If the remaining elements are not 3, determine whether there are remaining elements in the third set;
[0277] If there are no remaining elements in the third set, the routing ends;
[0278] If there are remaining elements in the third set, identifying the non-zero bit of the first element of the fourth set;
[0279] Inverting a specific bit of each element in the fourth set to obtain a new fourth set; wherein the specific bit is a bit corresponding to a non-zero bit of the first element of the fourth set;
[0280] Invert the specific bit in the node address of the current node to obtain the node address of the next hop node;
[0281] Sending the message to be transmitted to the next hop node based on the obtained node address, determining the next hop node as the new current node, and jumping back to the step of determining whether the current node is the target node by the first element of the fourth set;
[0282] If the current node is not the target node, jump directly to the step of determining whether the remaining elements in the third set are 3.
[0283] It is easy to understand that this embodiment specifically describes the specific implementation of the routing algorithm in a two-dimensional network. Taking any two-dimensional network in the target hypercube subnetwork as an example, only the lowest two bits of the node addresses that are different in the same two-dimensional network are used for illustration. , current node The third set corresponding to the target node in this two-dimensional network is ;in, , is the number of target nodes in the third set. The initial node, i.e., the first node to be reached when the message is transmitted to this two-dimensional network, needs to be determined based on the priority configuration of the two-dimensional network and the routing path of the message in the previous two-dimensional network. The initial node must be an adjacent node to the last node to which the message was routed in the previous two-dimensional network.
[0284] For the routing algorithm in a two-dimensional network, step 1: Sort the target nodes in the set. The target nodes in are XORed with the source nodes, namely: ;get .according to In order from small to large, Target nodes and collections in Sort the elements in the set. The first element in is defined as , the second element is defined as , and so on; set The first element in is defined as , the second element is defined as , and so on.
[0285] Step 2: Determine the current node Is it the target node? The first element in , it means that the current node is the target node, and the message is copied and absorbed at the current node. , , , go to step 4; if , it means the current node is not the target node, and go to step 3. At the same time, no matter which case, before going to step 3 or step 4, if , exchange set The last two target nodes in the list, swap the set The last two elements in the .
[0286] Step 3: Send the message from the current node One-hop routing to adjacent nodes . From right to left, identify the set The first element of The binary bit with value 1, the first bit with value 1 (assuming that this bit is Bit , or ) is set to 0 to negate, that is . Will gather The other elements from right to left Invert the bit to get the new fourth set. At the same time, the message is sent from the current node One-hop routing to the node ,node By the current node From right to left The bit is inverted to get , the values of other bits remain the same. Then go back to step 2.
[0287] Step 4: Judgment Is it equal to 0. If , it means that the message has been transmitted to all target nodes and the routing is completed. , then go to step three.
[0288] As a specific embodiment, see Figure 4 As shown, Figure 4 A schematic diagram of a two-dimensional network structure and routing provided by an embodiment of the present invention; assuming that the source node , the third set is Step 1: Set Sort the target nodes in the set The target nodes in are XORed with the source nodes, namely:
[0289] ;
[0290] ;
[0291] ;
[0292] Finally got ;according to In order from small to large, Target nodes and collections in Sort the elements in and get , . After sorting, the set The first element in is , and so on; set The same applies to the elements in .
[0293] Step 2: Determine the current node Is it the target node? The first element in , it means that the current node is the target node, and the message is copied and absorbed at the current node. , , . Go to step 4.
[0294] Step 4: Because , so go to step three.
[0295] Step 3: Send the message from the current node One-hop routing to adjacent nodes . Due to the collection The first element of , the first binary value from right to left is 1, so the bit is inverted and set to 0, that is , will be collected The other elements in the 1st position are reversed from right to left, and finally we get . Set the current node of Negate the node , so the message is sent from the current node One-hop routing to the node . Re-enter step 2.
[0296] Step 2: Determine the current node Is it the target node? the first element in the set , the current node is not the target node, re-enter step three. , , Enter step four.
[0297] Step four: since , re-enter step three.
[0298] Step three: route the message from the current node to the adjacent node . Since the first element in the set is , the value of the first bit from right to left is 1, so set this position to 0, that is , and finally get . Take the complement of the first bit from right to left of the current node to get the node , so route the message from the current node to the node by one-hop. Re-enter step two. Step two: determine whether the current node
[0299] is the target node. Since the first element in the set is , the current node is not the target node, re-enter step three. Step three: route the message from the current node
[0300] to the adjacent node . Since the first element in the set is , the value of the second bit from right to left is 1, so set this position to 0, that is , and finally get . Take the complement of the second bit from right to left of the current node to get the node , so route the message from the current node to the node by one-hop. Re-enter step two. Step two: determine whether the current node is the target node. Since the first element in the set
[0301] is , the current node is the target node, copy the message at the current node and absorb, , , , , . Re-enter step 4.
[0302] Step 4: Because , the routing ends. Therefore, the final routing path is: 01→00→01→11.
[0303] Specifically, the adjacent nodes corresponding to each current node are determined by performing a negation operation to determine the next hop node to implement hop-by-hop routing of the message, which is simple, effective and easy to implement.
[0304] See also Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. To solve the above technical problems, an embodiment of the present invention further provides an electronic device, including:
[0305] Memory 60, for storing computer programs;
[0306] The processor 61 is configured to execute a computer program to implement the steps of the aforementioned hypercube network routing method.
[0307] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing content required to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor for handling computational operations related to machine learning.
[0308] The memory 60 can include one or more computer-readable storage media that can be non-transitory. The memory 60 can also include high-speed random access memory and nonvolatile, computer-readable storage media such as one or more magnetic disk storage devices, flash memory devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein the computer program is loaded and executed by the processor 61 and can realize the related steps of the routing method of the hypercube network disclosed in any of the preceding embodiments. In addition, the resources stored in the memory 60 can also include an operating system 602 and data 603, etc., and the storage mode can be temporary storage or permanent storage. The operating system 602 can include Windows, Unix, Linux, etc. The data 603 can include but is not limited to data in the routing method of the hypercube network, etc.
[0309] In some embodiments, the electronic device can further include a display screen 62, an input / output interface 63, a communication interface 64, a power supply 65, and a communication bus 66.
[0310] Those skilled in the art can understand that the structure shown in the above embodiments does not constitute a limitation on the electronic device, and can include more or fewer components than those shown in the figure. Figure 5
[0311] For the description of the features of the electronic device provided in the embodiments of the present application, reference can be made to the related description of the routing method of the hypercube network, which will not be repeated here.
[0312] It can be understood that if the routing method of the hypercube network in the above embodiments is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and executes all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable ROM, a register, a hard disk, a removable magnetic disk, a CD-ROM, a magnetic disk or an optical disk, and various media that can store program codes.
[0313] To solve the above technical problems, the embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the routing method of the hypercube network are realized.
[0314] For descriptions of features in the computer-readable storage medium provided in the embodiments of the present invention, reference may be made to the relevant descriptions of the embodiments of the routing method for a hypercube network, which will not be described in detail here.
[0315] To solve the above technical problems, an embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the aforementioned hypercube network routing method when executed by a processor.
[0316] For descriptions of features in the computer program product provided by the embodiments of the present invention, reference may be made to the relevant descriptions of the embodiments of the routing method for a hypercube network, which will not be described in detail here.
[0317] To solve the above technical problems, an embodiment of the present invention further provides a routing device for a hypercube network, comprising:
[0318] a partitioning unit, configured to partition the hypercube network into a plurality of m-dimensional hypercube sub-networks; wherein each of the m-dimensional hypercube sub-networks does not intersect with each other; and m is a positive integer greater than or equal to 4;
[0319] a target number determination unit, configured to determine the number of target hypercube subnetworks; wherein the target hypercube subnetwork is an m-dimensional hypercube subnetwork including a target node;
[0320] a replication unit, configured to replicate k-1 message copies based on the source node to obtain k messages to be transmitted; wherein k is the number of the determined target hypercube subnetworks;
[0321] A first routing unit is configured to send the k to-be-transmitted messages to the corresponding k target hypercube sub-networks in a one-to-one correspondence;
[0322] The second routing unit is configured to, for any target hypercube sub-network, access the target two-dimensional network in sequence in a unicast manner upon receiving the message to be transmitted, so as to transmit the message to be transmitted to each target node in the target hypercube sub-network.
[0323] For descriptions of features of the routing device for a hypercube network provided by an embodiment of the present invention, reference may be made to the relevant descriptions of an embodiment of a routing method for a hypercube network, which will not be described in detail here.
[0324] The above describes in detail the hypercube network routing method, device, medium, and program product provided by the embodiments of the present invention. The various embodiments are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between the various embodiments can be referenced for reference. The devices disclosed in the embodiments are described briefly because they correspond to the methods disclosed in the embodiments. For relevant details, refer to the method description.
[0325] 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 above description has generally described the components and steps of each example according to their functions. 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 beyond the scope of the present invention.
[0326] The above describes in detail the hypercube network routing method, device, medium, and program product provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is intended only to facilitate understanding of the method and core concepts of the present invention. It should be noted that those skilled in the art may make various improvements and modifications to the present invention without departing from the principles of the present invention, and such improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A routing method for a hypercube network, characterized in that: include: Dividing the hypercube network into a plurality of m-dimensional hypercube sub-networks; wherein each of the m-dimensional hypercube sub-networks does not intersect with each other; m is a positive integer greater than or equal to 4; Determining the number of target hypercube subnetworks; wherein the target hypercube subnetwork is an m-dimensional hypercube subnetwork including the target node; Based on the source node, k-1 copies of the message are replicated to obtain k messages to be transmitted; wherein k is the number of the determined target hypercube subnetworks; Sending the k to-be-transmitted messages to the corresponding k target hypercube sub-networks one by one; For any target hypercube sub-network, if the message to be transmitted is received, the target two-dimensional network is accessed in sequence in a unicast manner to transmit the message to be transmitted to each target node in the target hypercube sub-network; The target two-dimensional network is a two-dimensional network including the target node in the target hypercube sub-network.
2. The routing method of a hypercube network according to claim 1, characterized in that: Determine the number of target hypercube subnetworks, including: Determine a first address of all target nodes; wherein the first address is a binary address comprising a plurality of bits; Identifying the most significant bit to the (m+1)th bit of the first address, and determining the affiliation relationship between each of the target nodes and each of the m-dimensional hypercube subnetworks based on the identification result; wherein the least significant bit of the binary address is the first bit; For any m-dimensional hypercube subnetwork, construct a first set; wherein the first set is a set consisting of first addresses of target nodes in the m-dimensional hypercube subnetwork; If the first set is not an empty set, the m-dimensional hypercube sub-network corresponding to the first set is determined to be the target hypercube sub-network.
3. The routing method of a hypercube network according to claim 1, wherein: Sending the k to-be-transmitted messages to the corresponding k target hypercube sub-networks one by one, including: For any target hypercube sub-network, determining whether the source node belongs to the target hypercube sub-network; If so, the message of the source node is used as the message to be transmitted by the target hypercube sub-network; If not, selecting a node from the target hypercube subnetwork as an identification node of the target hypercube subnetwork; The message copy copied by the source node is sent from the source node to the identification node.
4. The routing method of a hypercube network according to claim 3, characterized in that: Selecting a node from the target hypercube sub-network as an identification node of the target hypercube sub-network includes: Comparing the second address of the source node with the node addresses of each node in the target hypercube subnetwork; wherein the second address and the node addresses are both binary addresses containing a plurality of bits; A node corresponding to a third address is selected as an identification node of the target hypercube subnetwork; wherein the third address is a node address of any node in the target hypercube subnetwork, and the third address is identical to the second address in bits from the first bit to the mth bit.
5. The routing method of a hypercube network according to claim 4, characterized in that: Sending the message copy copied by the source node from the source node to the identification node includes: Determine an exclusive OR result of the third address and the second address; Determine the source node as the current node, and determine the highest bit of the XOR result as the current bit; Determine whether the current bit of the XOR result is 1; If yes, invert the corresponding bit of the node address of the current node to obtain the node address of the next hop node, and send the message copy from the current node to the next hop node; Determine the next hop node as the new current node, determine the next bit of the XOR result as the current bit, and jump again to the step of determining whether the current bit of the XOR result is 1; If not, the process directly jumps to the step of determining the next bit of the XOR result as the current bit.
6. The hypercube network routing method according to any one of claims 1 to 5, characterized in that: Before accessing the target two-dimensional network in sequence in unicast mode, the following steps are also included: For any target hypercube sub-network, determining each target two-dimensional network in the target hypercube sub-network; configuring priorities for all of the target two-dimensional networks; Use unicast to access the target two-dimensional network in sequence, including: The target two-dimensional networks are accessed in sequence in a unicast manner according to the order of priority.
7. The hypercube network routing method according to claim 6, characterized in that: Determining each target two-dimensional network in the target hypercube sub-network includes: Identifying the mth to third bits of the first address of each target node in the target hypercube subnetwork, and determining, based on the identification result, the attribution relationship between each target node in the target hypercube subnetwork and each two-dimensional network in the target hypercube subnetwork; For any two-dimensional network, construct a second set; wherein the second set is a set consisting of first addresses of target nodes in the two-dimensional network; If the second set is not an empty set, it is determined that the two-dimensional network corresponding to the second set is the target two-dimensional network.
8. The routing method of a hypercube network according to claim 7, characterized in that: Configure priorities for all target 2D networks, including: configuring a priority for each target two-dimensional network based on the minimum number of hops between the target two-dimensional network and the current node; wherein the smaller the minimum number of hops of the target two-dimensional network, the higher its priority; If there are target two-dimensional networks with the same minimum hop count, the priority of the target two-dimensional networks with the same minimum hop count is configured based on the number of target nodes in the target two-dimensional networks; wherein, the more target nodes in the target two-dimensional network, the higher its priority.
9. The routing method of a hypercube network according to claim 8, characterized in that: m is 4, configuring priorities for all target two-dimensional networks, including: defining a first network subset, a second network subset, a third network subset, and a fourth network subset; wherein the first network subset has the highest priority, the second network subset has the second highest priority, and the fourth network subset has the lowest priority; defining a binary number composed of the fourth and third digits of the node address of each two-dimensional network in the target hypercube subnetwork as the sequence number of the two-dimensional network; Determine a first number; wherein the first number is a binary number consisting of the fourth and third digits of the source node; Invert the first digit of the first number to obtain a second number, invert the second digit of the first number to obtain a third number, and invert both the first and second digits of the first number to obtain a fourth number; Determining whether the first node number is 0; wherein the first node number is the number of target nodes in the two-dimensional network whose sequence numbers are equal to the first number; If the number of the first nodes is 0, setting the first network subset to an empty set; If the first number of nodes is not 0, determining a second set of two-dimensional networks corresponding to the first number of nodes as the first network subset; Determining whether the second node number is less than the third node number; wherein the second node number is the number of target nodes in the two-dimensional network whose sequence numbers are equal to the second number, and the third node number is the number of target nodes in the two-dimensional network whose sequence numbers are equal to the third number; If the second node number is greater than or equal to the third node number, determining whether the second node number is 0, and determining whether the third node number is 0; If the number of the second nodes is 0, setting the second network subset to an empty set; If the second number of nodes is not 0, determining a second set of two-dimensional networks corresponding to the second number of nodes as a second network subset; If the number of the third nodes is 0, setting the fourth network subset to an empty set; If the third number of nodes is not 0, determining the second set of two-dimensional networks corresponding to the third number of nodes as a fourth network subset; If the second node number is less than the third node number, determining whether the second node number is 0, and determining whether the third node number is 0; If the number of the third nodes is 0, setting the second network subset to an empty set; If the third number of nodes is not 0, determining the second set of two-dimensional networks corresponding to the third number of nodes as the second network subset; If the number of the second nodes is 0, setting the fourth network subset to an empty set; If the second number of nodes is not 0, determining the second set of two-dimensional networks corresponding to the second number of nodes as a fourth network subset; Determining whether the fourth node number is 0; wherein the fourth node number is the number of target nodes in the two-dimensional network whose sequence numbers are equal to the fourth number; If the number of the fourth nodes is 0, setting the third network subset to an empty set; If the fourth number of nodes is not 0, the second set of two-dimensional networks corresponding to the fourth number of nodes is determined as the third network subset.
10. The hypercube network routing method according to claim 9, characterized in that: Accessing each of the target two-dimensional networks in sequence in a unicast manner according to the priority order includes: Determining the first network subset as a current network subset, and determining whether the current network subset is an empty set; If yes, the message to be transmitted is sent from the current node to the two-dimensional network corresponding to the next network subset in the priority order, and the next network subset is determined as the current network subset, and the process jumps to the step of determining whether the current network subset is an empty set; Wherein, if the current network subset is the first network subset, the current node is the routing starting point of the message to be transmitted in the target hypercube subnetwork; If not, the message to be transmitted is transmitted from the current node to the target node of the current network subset, and the count value is controlled to be reduced by 1; the initial value of the count value is 4; Determine whether the count value is 0; If the count value is 0, the routing is terminated; If the count value is not 0, the process jumps to the step of sending the message to be transmitted from the current node to the two-dimensional network corresponding to the next network subset in the priority order, and determining the next network subset as the current network subset.
11. The hypercube network routing method according to claim 10, characterized in that: Transmitting the message to be transmitted from the current node to the target node of the current network subset includes: The message to be transmitted is transmitted from the current node to the target node of the current network subset based on the neighboring nodes.
12. The hypercube network routing method according to claim 11, characterized in that: Transmitting the message to be transmitted from the current node to the target node of the current network subset based on the neighboring node, comprising: For any target two-dimensional network, construct a third set; wherein the third set is a set of addresses of target nodes in the target two-dimensional network obtained by retaining only the first and second bits of the first address; Determine an exclusive OR result between each element in the third set and the two-dimensional address suffix of the initial node; wherein the initial node is the routing starting point of the message to be transmitted in the target two-dimensional network; Sort the XOR results corresponding to the elements in the third set in ascending order to obtain a fourth set, and adjust the elements in the third set to the corresponding order; wherein the fourth set is a set consisting of the XOR results corresponding to the elements in the third set; Determine the initial node as the current node, and determine whether the current node is the target node based on the first element of the fourth set; If the current node is the target node, copy the message to be transmitted to the current node, and delete the element corresponding to the current node in the third set and the XOR result corresponding to the current node in the fourth set; Determine whether the remaining elements in the third set are 3; If the remaining element is 3, swap the positions of the last two elements in the third set, and swap the position of the last element in the fourth set; If the remaining elements are not 3, determining whether there are any remaining elements in the third set; If there are no remaining elements in the third set, then ending the routing; If there are remaining elements in the third set, identifying a non-zero bit of the first element of the fourth set; Inverting a specific bit of each element in the fourth set to obtain a new fourth set; wherein the specific bit is a bit corresponding to a non-zero bit of the first element of the fourth set; Invert a specific bit in the node address of the current node to obtain the node address of the next hop node; Sending the to-be-transmitted message to the next-hop node based on the obtained node address, determining the next-hop node as a new current node, and re-jumping to the step of determining whether the current node is a target node based on the first element of the fourth set; If the current node is not the target node, directly jump to the step of determining whether the remaining elements in the third set are 3.
13. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the hypercube network routing method according to any one of claims 1 to 12.
14. 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 steps of the routing method for a hypercube network according to any one of claims 1 to 12 are implemented.
15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the routing method for a hypercube network according to any one of claims 1 to 12 are implemented.
