CN117240772A - Routing path determining method and device, electronic equipment and storage medium - Google Patents

Routing path determining method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117240772A
CN117240772A CN202311481739.4A CN202311481739A CN117240772A CN 117240772 A CN117240772 A CN 117240772A CN 202311481739 A CN202311481739 A CN 202311481739A CN 117240772 A CN117240772 A CN 117240772A
Authority
CN
China
Prior art keywords
node
routing
bit
routing node
source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311481739.4A
Other languages
Chinese (zh)
Other versions
CN117240772B (en
Inventor
陈静静
孙华锦
李婧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311481739.4A priority Critical patent/CN117240772B/en
Publication of CN117240772A publication Critical patent/CN117240772A/en
Application granted granted Critical
Publication of CN117240772B publication Critical patent/CN117240772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application provides a routing path determining method, a routing path determining device, electronic equipment and a storage medium. The method comprises the following steps: performing exclusive OR processing on a first node number of a source routing node where a source terminal node is located and a second node number of a target routing node where a target terminal node is located to obtain an exclusive OR node number, wherein the first node number and the second node number are numbers of binary digits; determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and a valid bit in the exclusive or node number; and determining a routing path between the source terminal node and the target terminal node based on the intermediate routing node, the source routing node and the target routing node. The application can avoid the problem that the data packet reaches the target terminal node in sequence to cause data disorder error at the receiving end, thereby achieving the purpose of data order preservation.

Description

Routing path determining method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of network routing technologies, and in particular, to a routing path determining method, a device, an electronic device, and a storage medium.
Background
Fat tree network traditional shortest path routing algorithm: a nearest father node F of a source node s and a terminal node d is randomly selected, and s is firstly from F, and then F is from d. There are multiple parent nodes for source node s and end node d, i.e., there is path diversity from source node s to end node d.
When a certain initial terminal node initiates multi-packet data transmission to the same target terminal node, different packet data can be matched with different routing paths to carry out data routing transmission due to the path diversity of a topological structure, and the sequence of transmitting data to the target terminal node through different secondary routing nodes cannot be controlled due to the different blocking degree of each secondary routing node, so that the multi-packet data transmission initiated at the source terminal node cannot be sequentially output from the corresponding target terminal node according to the initial corresponding sequence of the source terminal node, namely, the disorder phenomenon of the data occurs, and the data transmission is wrong. For example, suppose that input terminal node 0 sends 3 packets of data to output terminal node 6, the order of these 3 packets of data when input terminal node 0 initiates transmission is packet 1→packet 2→packet 3, due to the route diversity of the topology.
Because of the diversity of data routing paths in the interconnection structure, each routing node can have routing requests of different paths for arbitration, and because of the influence of an arbitration method, three-packet data are blocked in the routing node to different degrees, the sequence of the data packets reaching the target node is changed, and the data disorder error occurs at the receiving end.
Disclosure of Invention
The embodiment of the application provides a routing path determining method, a routing path determining device, electronic equipment and a storage medium, which are used for solving the problems that in the prior art, routing requests with different paths are arbitrated by each routing node, three-packet data are blocked in the routing nodes to different degrees due to the influence of the arbitration method, the sequence of the data packets reaching a target node is changed, and the data disorder error occurs at a receiving end.
In order to solve the technical problems, the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a routing path determining method, where the method includes:
performing exclusive OR processing on a first node number of a source routing node where a source terminal node is located and a second node number of a target routing node where a target terminal node is located to obtain an exclusive OR node number, wherein the first node number and the second node number are numbers of binary digits;
Determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and a valid bit in the exclusive or node number;
and determining a routing path between the source terminal node and the target terminal node based on the intermediate routing node, the source routing node and the target routing node.
Optionally, when the preset routing algorithm is a routing algorithm that completes direct upward jump and then starts downward routing,
the determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and the valid bit in the exclusive or node number includes:
acquiring a valid bit in the exclusive or node number and a numerical value K of the valid bit, wherein K is a positive integer;
starting from the source routing node, obtaining a first routing node through K times of direct upward hops; the direct upward jump refers to the direct upward jump from the current node to the routing node with the same number of the higher layer;
starting from the highest-layer routing node in the first routing nodes, taking the valid bit as a starting position, and inverting the value of the bit of the first node number to obtain a second routing node which is routed downwards; the downward routing refers to routing nodes which are routed to routing nodes with different numbers at the lower layer according to a routing algorithm;
And taking the first routing node and the second routing node as the intermediate routing nodes.
Optionally, the obtaining the valid bit in the xor node number includes:
acquiring the position of the highest bit of the numerical value 1 in the exclusive or node number;
and determining the valid bit according to the position of the highest bit.
Optionally, starting from the source routing node, obtaining a first routing node through K direct upward hops, including:
starting from the source routing node, through K times of direct upward hops, the routing node with the same number as the first node in the K+1 layer is reached;
taking the route node which directly jumps upwards to pass through as the first route node; the node number of the first routing node is the same as the first node number.
Optionally, the taking the valid bit as a starting position, inverting the value of the bit of the first node number to obtain a second routing node routed downwards, including:
sequentially inverting bit values of corresponding bits in the first node number from the starting position to obtain the node number of each layer after the highest layer, and directly jumping downwards when the bit value of the effective bit is 0, wherein the direct jumping downwards refers to directly jumping downwards from the current node to a routing node with the same number of the lower layer;
And determining a second routing node of the downward route according to the node number of each layer.
Optionally, the determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and a valid bit in the xor node number includes:
acquiring the value of the lowest bit of the first node number;
when the value of the lowest bit is 0, determining the preset routing algorithm as a routing algorithm for finishing direct upward jump and then starting downward routing;
and determining an intermediate routing node between the source routing node and the target routing node based on the routing algorithm which completes direct upward jump and then starts downward routing and the valid bit in the exclusive or node number.
Optionally, the determining a routing path between the source terminal node and the target terminal node based on the intermediate routing node, the source routing node and the target routing node includes:
acquiring bit information of the last bit of the second node number;
a routing path between the source terminal node and the target terminal node is determined based on the intermediate routing node, the source routing node, the target routing node, and the bit information.
Optionally, when the preset routing algorithm is a routing algorithm that finishes upward routing and then directly hops downward,
the determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and the valid bit in the exclusive or node number includes:
determining a valid bit in the exclusive-or node number based on the position of the highest bit of the numerical value 1 in the exclusive-or node number, wherein the numerical value N of the valid bit is a positive integer;
starting from the least significant bit of the exclusive or node number, inverting the value of the significant bit of the first node number to obtain a third routing node of upward routing; the upward routing refers to routing nodes with different numbers from a higher layer according to a routing algorithm;
starting from the highest-layer routing node of the third routing node, obtaining a fourth routing node through N times of direct downward hops; the direct downward jump refers to the direct downward jump from the current node to the routing node with the same number of the lower layer;
and taking the third routing node and the fourth routing node as the intermediate routing nodes.
Optionally, the inverting the value of the bit of the first node number from the least significant bit of the valid bit of the exclusive or node number to obtain a third routing node routed upwards, including:
sequentially inverting bit values of corresponding bits in the first node number from the lowest bit of the valid bit to obtain the node number of each layer after the layer where the first node number is located, wherein when the bit value of the valid bit is 0, the direct upward jump is that the current node directly jumps upward to a routing node with the same higher layer number;
and determining a third routing node for upward routing according to the node number of each layer.
Optionally, the obtaining a fourth routing node from the highest layer routing node of the third routing node through N direct downward hops includes:
starting from the highest-layer routing node of the third routing node, directly jumping downwards for N times to reach the target terminal node;
taking other routing nodes except the target terminal node in the routing nodes directly jumping downwards as the fourth routing node; the node number of the fourth routing node is the same as the second node number.
Optionally, the determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and a valid bit in the xor node number includes:
acquiring the value of the lowest bit of the first node number;
when the value of the lowest bit is 1, determining the preset routing algorithm as a routing algorithm for completing upward routing and then directly jumping downward;
and determining an intermediate routing node between the source routing node and the target routing node based on the routing algorithm which completes upward routing and then directly hops downward and the valid bit in the exclusive or node number.
Optionally, after performing exclusive or processing on the first node number of the source routing node where the source terminal node is located and the second node number of the target routing node where the target terminal node is located, obtaining an exclusive or node number, the method further includes:
determining whether values of all bits of the exclusive or node number are 0;
and determining that the source routing node and the target routing node are the same routing node according to the condition that the value of all bits of the exclusive OR node numbers is 0, and ending the routing flow.
In a second aspect, an embodiment of the present application provides a routing path determining apparatus, including:
The node number acquisition module is used for carrying out exclusive or processing on a first node number of a source route node where a source terminal node is located and a second node number of a target route node where a target terminal node is located to obtain an exclusive or node number, wherein the first node number and the second node number are numbers of binary digits;
the intermediate routing node determining module is used for determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and the valid bit in the exclusive or node number;
and the routing path determining module is used for determining a routing path between the source terminal node and the target terminal node based on the intermediate routing node, the source routing node and the target routing node.
Optionally, when the preset routing algorithm is a routing algorithm that completes direct upward jump and then starts downward routing,
the intermediate routing node determining module includes:
the valid bit acquisition unit is used for acquiring valid bits in the exclusive or node numbers and the numerical value K of the valid bits, wherein K is a positive integer;
the first node acquisition unit is used for obtaining a first routing node from the source routing node through K times of direct upward hops; the direct upward jump refers to the direct upward jump from the current node to the routing node with the same number of the higher layer;
A second node obtaining unit, configured to, starting from a highest-layer routing node in the first routing nodes, invert the value of the bit of the first node number with the valid bit as a starting position, and obtain a second routing node routed downward; the downward routing refers to routing nodes which are routed to routing nodes with different numbers at the lower layer according to a routing algorithm;
and the first intermediate node acquisition unit is used for taking the first routing node and the second routing node as the intermediate routing nodes.
Optionally, the valid bit acquiring unit includes:
a position obtaining subunit, configured to obtain a position of a highest bit where the value 1 in the xor node number is located;
and the valid bit determining subunit is used for determining the valid bit according to the position of the highest bit.
Optionally, the first node obtaining unit includes:
a routing node obtaining subunit, configured to start from the source routing node, reach a routing node with the same number as the first node number in the k+1 layer through K direct upward hops;
a first node obtaining subunit, configured to use a routing node that directly hops upward through as the first routing node; the node number of the first routing node is the same as the first node number.
Optionally, the second node obtaining unit includes:
a first node number obtaining subunit, configured to sequentially invert bit values of corresponding bits in the first node number from the starting position to obtain a node number of each layer after the highest layer, and directly skip downwards when the bit value of the valid bit is 0, where the directly skip downwards refers to directly skip downwards from a current node to a routing node with the same number of the lower layer;
and the second node determining subunit is used for determining a second routing node of the downward route according to the node number of each layer.
Optionally, the intermediate routing node determining module includes:
a first bit value acquisition unit configured to acquire a value of a least significant bit of the first node number;
a first routing algorithm determining unit, configured to determine, when the value of the lowest bit is 0, that the preset routing algorithm is a routing algorithm that finishes direct upward jump and then starts downward routing;
and the intermediate routing node determining unit is used for determining an intermediate routing node between the source routing node and the target routing node based on the routing algorithm for finishing direct upward jump and then starting downward routing and the valid bit in the exclusive or node number.
Optionally, the routing path determining module includes:
a bit information obtaining unit, configured to obtain bit information of a last bit of the second node number;
and the routing path determining subunit is used for determining a routing path between the source terminal node and the target terminal node based on the intermediate routing node, the source routing node, the target routing node and the bit information.
Optionally, when the preset routing algorithm is a routing algorithm that finishes upward routing and then directly hops downward,
the intermediate routing node determining module includes:
the valid bit determining unit is used for determining a valid bit in the exclusive-or node number based on the position of the highest bit of the numerical value 1 in the exclusive-or node number, and the numerical value N of the valid bit is a positive integer;
a third node obtaining unit, configured to invert the value of the bit of the first node number from the lowest bit of the valid bit of the exclusive or node number, to obtain a third routing node that routes upward; the upward routing refers to routing nodes with different numbers from a higher layer according to a routing algorithm;
A fourth node obtaining unit, configured to obtain a fourth routing node from the highest layer routing node of the third routing node through N direct downward hops; the direct downward jump refers to the direct downward jump from the current node to the routing node with the same number of the lower layer;
and the second intermediate node acquisition unit is used for taking the third routing node and the fourth routing node as the intermediate routing nodes.
Optionally, the third node obtaining unit includes:
a second node number obtaining subunit, configured to sequentially invert bit values of corresponding bits in the first node number from a lowest bit of the valid bit to obtain a node number of each layer after the layer where the first node number is located, where when the bit value of the valid bit is 0, directly jump upwards, where directly jump upwards refers to directly jumping from a current node to a routing node with the same higher layer number;
and the third node determining subunit is used for determining a third routing node for upward routing according to the node number of each layer.
Optionally, the fourth node obtaining unit includes:
a target node obtaining subunit, configured to start from a highest layer routing node of the third routing node, and reach the target terminal node through N direct downward hops;
A fourth node obtaining subunit, configured to use, as the fourth routing node, other routing nodes, except the target terminal node, among routing nodes that directly hop downward through; the node number of the fourth routing node is the same as the second node number.
Optionally, the intermediate routing node determining module includes:
a second bit value acquisition unit configured to acquire a value of a least significant bit of the first node number;
a second routing algorithm determining unit, configured to determine, when the value of the lowest bit is 1, that the preset routing algorithm is a routing algorithm that finishes upward routing first and then directly hops downward;
and the intermediate node determining unit is used for determining an intermediate routing node between the source routing node and the target routing node based on the routing algorithm which completes upward routing and then directly hops downward and the valid bit in the exclusive or node number.
Optionally, the apparatus further comprises:
a node number value determining module, configured to determine whether values of all bits of the exclusive or node number are all 0;
and the routing flow ending module is used for determining that the source routing node and the target routing node are the same routing node and ending the routing flow in response to the value of all bits of the exclusive or node number is 0.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed by the processor, implements the routing path determination method of any of the above.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the routing path determination method described in any one of the above.
In the embodiment of the application, the exclusive or node number is obtained by exclusive or processing the first node number of the source routing node where the source terminal node is located and the second node number of the target routing node where the target terminal node is located, and the first node number and the second node number are both numbers of binary digits. And determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and valid bits in the exclusive or node numbers. A routing path between the source terminal node and the target terminal node is determined based on the intermediate routing node, the source routing node, and the target routing node. According to the embodiment of the application, the only intermediate routing node between the source routing node and the target terminal node is determined by combining the valid bit in the exclusive OR node number and the preset routing algorithm, so that the source routing node and the target terminal node transmit according to the fixed path, the problem that the sequence of the data packet reaching the target terminal node changes, and the data disorder error occurs at the receiving end is avoided, and the purpose of data sequence preservation is achieved.
The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent.
Drawings
Fig. 1 is a flowchart of steps of a method for determining a routing path according to an embodiment of the present application;
fig. 2 is a flowchart of steps of an intermediate routing node obtaining method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating steps of a method for determining an effective bit according to an embodiment of the present application;
fig. 4 is a flowchart of steps of a method for obtaining a first routing node according to an embodiment of the present application;
fig. 5 is a flowchart of steps of a second routing node determining method according to an embodiment of the present application;
fig. 6 is a flowchart of steps of a method for determining an intermediate routing node according to an embodiment of the present application;
fig. 7 is a flowchart of steps of a method for determining a routing path according to an embodiment of the present application;
fig. 8 is a flowchart illustrating steps of another method for obtaining an intermediate routing node according to an embodiment of the present application;
fig. 9 is a flowchart illustrating steps of a third routing node determining method according to an embodiment of the present application;
Fig. 10 is a flowchart of steps of a fourth routing node obtaining method according to an embodiment of the present application;
fig. 11 is a flowchart illustrating steps of another method for determining an intermediate routing node according to an embodiment of the present application;
fig. 12 is a flowchart of a step of a routing procedure ending method according to an embodiment of the present application;
fig. 13 is a schematic diagram of a routing process according to an embodiment of the present application;
FIG. 14 is a schematic diagram of another routing process according to an embodiment of the present application;
fig. 15 is a schematic diagram of a routing path according to an embodiment of the present application;
FIG. 16 is a schematic diagram of another routing path according to an embodiment of the present application;
fig. 17 is a schematic diagram of a routing algorithm selection manner according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of a routing path determining apparatus according to an embodiment of the present application;
fig. 19 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, a step flowchart of a routing path determining method provided by an embodiment of the present application is shown, and as shown in fig. 1, the routing path determining method may include: step 101, step 102 and step 103.
Step 101: performing exclusive OR processing on a first node number of a source routing node where a source terminal node is located and a second node number of a target routing node where a target terminal node is located to obtain an exclusive OR node number, wherein the first node number and the second node number are numbers of binary digits.
The embodiment of the application can be applied to the scene of screening the unique routing paths of the source routing node and the target terminal node by combining the preset routing algorithm with the valid bit of the exclusive OR node numbers of the source routing node and the target terminal node.
The embodiment can be applied to a scene of selecting a routing path of a fat tree network.
The first node number refers to the node number of the source routing node where the source terminal node is located. The second node number is the node number of the target routing node where the target terminal node is located.
In a specific implementation, the unused routing nodes may be numbered first, such as 001, 002, 110, 010, etc., and it is understood that in fat-tree network structures, the number of bits of the node numbers of all routing nodes is the same, e.g., the number of bits of the node numbers of all routing nodes is 3 bits, or 5 bits, etc. The number of the number bits for the routing node number may be determined according to the service requirement, which is not limited in this embodiment.
In this example, the first node number and the second node number are each numbers of binary digits, i.e., the node number contains only two values of 0 and 1.
When the unique route path is selected between the source terminal node and the target terminal node, a first node number of the source route node where the source terminal node is located and a second node number of the target route node where the target terminal node is located can be obtained.
Then, the first node number and the second node number may be exclusive-ored, so that an exclusive-ored node number may be obtained. For example, the node number of the routing node S where the source terminal node is located is 010, the node number of the routing node D where the destination terminal node is located is 001, and 010 and 001 are exclusive or 011 can be obtained, and at this time, the exclusive or result 011 can be used as an exclusive or node number or the like.
It will be appreciated that the above examples are only examples listed for better understanding of the technical solution of the embodiments of the present application, and are not to be construed as the only limitation of the present embodiments.
And after performing exclusive or processing on the first node number of the source routing node where the source terminal node is located and the second node number of the target routing node where the target terminal node is located to obtain an exclusive or node number, executing step 102.
Step 102: and determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and the valid bit in the exclusive or node number.
When the value of all bits of the exclusive or node numbers is 0, the source routing node and the target routing node are the same routing node, and the routing flow is ended. This implementation may be described in detail below in conjunction with fig. 12.
Referring to fig. 12, a step flowchart of a routing procedure ending method provided by an embodiment of the present application is shown. As shown in fig. 12, the routing procedure ending method may include: step 1201 and step 1202.
Step 1201: it is determined whether the exclusive or node numbers have values of 0 for all bits.
In the embodiment of the application, after the exclusive-or node number is obtained, whether the values of all bits in the exclusive-or node number are 0 can be judged.
Step 1202: and determining that the source routing node and the target routing node are the same routing node according to the condition that the value of all bits of the exclusive OR node numbers is 0, and ending the routing flow.
If the values of all the bits in the exclusive or node number are all 0, the source routing node and the target routing node are determined to be the same routing node in response to the values of all the bits in the exclusive or node number being 0, and the routing flow is ended. For example, after obtaining the xor node number I, if each bit of the valid bit in I: if the source terminal node and the target terminal node are both 0, the source terminal node and the target terminal node are proved to be in the same routing node, the routing is directly carried out in the routing node, and the routing is finished.
The embodiment of the application judges whether all bits of the exclusive or node numbers are 0, if the bits are 0, the source routing node and the target routing node are determined to be the same routing node, so that the routing is directly carried out in the routing node, and the problem of data disorder is avoided. And the subsequent routing node selection process is not required.
The intermediate routing node refers to a routing node between a source routing node and a target terminal node screened from the fat tree network, namely, a routing path between the source terminal node and the target terminal node is formed by the source routing node, the intermediate routing node and the target terminal node together.
After the exclusive or processing is performed on the first node number of the source routing node where the source terminal node is located and the second node number of the target routing node where the target terminal node is located, the intermediate routing node between the source routing node and the target routing node can be determined based on a preset routing algorithm and valid bits in the exclusive or node numbers after the exclusive or node numbers are obtained.
In this example, the preset routing algorithm may be a routing algorithm that completes the direct upward jump and then starts the downward route, and the implementation process for determining the intermediate routing node may be described in detail below with reference to fig. 2.
Referring to fig. 2, a step flowchart of an intermediate routing node obtaining method provided by an embodiment of the present application is shown. As shown in fig. 2, the method for obtaining the intermediate routing node may include: step 201, step 202, step 203 and step 204.
Step 201: and acquiring the valid bit in the exclusive or node number, wherein the value K of the valid bit is a positive integer.
In the embodiment of the present application, the preset routing algorithm may be a routing algorithm that completes direct upward jump and then starts downward routing.
In this embodiment, when the value of the lowest bit of the node number of the source routing node is 0, the routing algorithm that finishes the direct upward jump first and then starts the downward route may be selected. This implementation may be described in detail below in conjunction with fig. 6.
Referring to fig. 6, a flowchart illustrating steps of a method for determining an intermediate routing node according to an embodiment of the present application is shown. As shown in fig. 6, the intermediate routing node determining method may include: step 601, step 602 and step 603.
Step 601: and acquiring the value of the least significant bit of the first node number.
In the embodiment of the application, when the preset routing algorithm is selected, the value of the lowest bit of the number of the first node, namely the value of the lowest bit of the number of the node of the source routing node, can be obtained.
Step 602: and when the value of the lowest bit is 0, determining the preset routing algorithm as a routing algorithm for finishing direct jump upwards and then starting downward routing.
After the value of the lowest bit of the first node number is obtained, whether the value is 0 can be judged, and if the value is 0, the preset routing algorithm can be determined as the routing algorithm for completing direct upward jump and then starting downward routing.
Step 603: and determining an intermediate routing node between the source routing node and the target routing node based on the routing algorithm which completes direct upward jump and then starts downward routing and the valid bit in the exclusive or node number.
Finally, an intermediate routing node between the source routing node and the target routing node can be determined based on a routing algorithm that completes direct upward hopping and then begins downward routing and valid bits in the exclusive or node number.
The direct upward jump refers to the jump from the current node to the route node with the same number of the higher layer.
The downward route refers to the routing node routing to the routing node with different layer numbers below according to the routing algorithm.
After the xor node number is obtained, the valid bit in the xor node number and the value K of the valid bit may be obtained, where K is a positive integer.
In a specific implementation, the position of the highest bit where the value 1 in the xor node number is located may be obtained, and the position of the highest bit is used as the valid bit. This implementation may be described in detail below in conjunction with fig. 3.
Referring to fig. 3, a flowchart illustrating steps of a method for determining a valid bit according to an embodiment of the present application is shown. As shown in fig. 3, the significance determination method may include: step 301 and step 302.
Step 301: and acquiring the position of the highest bit of the numerical value 1 in the exclusive or node number.
In this embodiment, after the xor node number is obtained, the position of the highest bit where the value 1 in the xor node number is located may be obtained.
Step 302: and determining the valid bit according to the position of the highest bit.
Further, the valid bit of the xor node number may be determined from the position of the highest bit where the value 1 is located in the xor node number. For example, the node number of the routing node S where the source terminal node is located is 110, the node number of the routing node D where the destination terminal node is located is 011, the exclusive or node number is 101, the highest bit where 1 is located is the third bit, the third bit is the valid bit, and the value of the valid bit is 3. Or the node number of the routing node S where the source terminal node is located is 010, the node number of the routing node D where the target terminal node is located is 001, the exclusive OR node number is 011, the highest bit where 1 is located is the second bit, the second bit is the valid bit, and the value of the valid bit is 2.
It will be appreciated that the above examples are only examples listed for better understanding of the technical solution of the embodiments of the present application, and are not to be construed as the only limitation of the present embodiments.
The embodiment of the application determines the valid bit according to the most bit of the numerical value 1 in the exclusive or node number, thereby being convenient for the subsequent selection of the intermediate routing node.
After the significant bit in the xor node number and the value K of the significant bit are obtained, step 202 is performed.
Step 202: starting from the source routing node, obtaining a first routing node through K times of direct upward hops; the direct upward jump refers to the jump from the current node to the route node with the same number of the higher layer.
After the valid bit in the exclusive or node number and the value K of the valid bit are obtained, the method indicates that the first layer number is the source routing node, and the first layer number reaches the routing node, namely the first routing node, of which the number is the same as the node number of the source routing node, through K upward hops.
The implementation process for acquiring the first routing node may be described in detail below in connection with fig. 4.
Referring to fig. 4, a flowchart illustrating steps of a first routing node obtaining method according to an embodiment of the present application is shown. As shown in fig. 4, the first routing node obtaining method may include: step 401 and step 402.
Step 401: and starting from the source routing node, through K times of direct upward hops, the routing node with the same number as the first node in the K+1 layer is reached.
In the embodiment of the present application, after obtaining the value K of the valid bit, the valid bit may start from the source routing node, and go through direct upward jump K times, to reach the routing node with the same number as the first node number in the k+1 layer.
Step 402: taking the route node which directly jumps upwards to pass through as the first route node; the node number of the first routing node is the same as the first node number.
Furthermore, the routing node through which the direct upward jump passes may be used as the first routing node, where the node number of the first routing node is the same as the first node number. For example, the node number of the routing node S where the source terminal node is located is 010, and the node number of the routing node D where the destination terminal node is located is 001. The xor node number is 11, and the valid bit is 2 bits, so that the xor node needs to go through 2 upward hops, and reaches the routing node 2 of the 010 layer 3 from the routing node (i.e. the source routing node) of the 010 layer first through 2 upward hops. At this time, the routing node of layer 2 numbered 010 and the routing node of layer 3 numbered 010 may be collectively used as the first routing node or the like.
It will be appreciated that the above examples are only examples listed for better understanding of the technical solutions provided by the embodiments of the present application, and are not to be construed as the only limitation on the present embodiments.
The embodiment of the application can directly identify the intermediate routing nodes with the same node numbers as the source routing nodes in the routing path by a direct upward jump mode, thereby being convenient for selecting the intermediate routing nodes.
After K direct upward hops from the source routing node, a first routing node is obtained, step 203 is performed.
Step 203: starting from the highest-layer routing node in the first routing nodes, taking the valid bit as a starting position, and inverting the value of the bit of the first node number to obtain a second routing node which is routed downwards; the downward routing refers to the routing nodes routing to the routing nodes with different lower layer numbers according to a routing algorithm.
After the first routing node is obtained by directly jumping upwards from the source routing node for K times, starting from the highest layer routing node in the first routing node, taking the valid bit as a starting position, and inverting the value of the bit of the serial number of the first node to obtain the second routing node of the downward route. Specifically, the inversion may be sequentially performed according to the value of the bit of the first node number, and the node number of each layer may be determined. This implementation may be described in detail below in conjunction with fig. 5.
Referring to fig. 5, a flowchart illustrating steps of a second routing node determining method according to an embodiment of the present application is shown. As shown in fig. 5, the second routing node determining method may include: step 501 and step 502.
Step 501: and starting from the starting position, sequentially inverting the bit value of the corresponding bit in the first node number to obtain the node number of each layer after the highest layer, and directly jumping downwards when the bit value of the effective bit is 0, wherein the direct downwards jumping refers to directly jumping downwards from the current node to the routing node with the same number of the lower layer.
In this embodiment, after a first routing node is obtained by directly jumping up K times from a source routing node, the bit values of the corresponding bits in the first node number may be inverted in sequence from the starting position corresponding to the valid bit to obtain the node number of each layer after the highest layer, where when the bit value of the valid bit is 0, the first routing node directly jumps down, and the direct jump down refers to the direct jump from the current node down to the routing node with the same layer number below.
Step 502: and determining a second routing node of the downward route according to the node number of each layer.
After the bit values of the first node numbers are sequentially inverted to obtain the node numbers of each layer after the highest layer, the second routing node of the downward route can be determined according to the node numbers of each layer. For example, following the example in step 402 above, after reaching routing node 2 of tier 3 numbered 010, a downward route is initiated, I is 11, and the 2 bits (11) from the lower bits in I perform the following operations: and (3) inverting bits corresponding to S from the position of '1' from the high position to obtain a routing node of downward routing, and directly jumping downwards from the position of '0'. Such as layer three routing node 010 (I: _11) - > layer two routing node 000 (I1: __ 1) - > layer one routing node 001 (I2: ___). When the third layer routing node is 010, the second bit is inverted, the first time is changed to 000, then the third bit is inverted, and the third bit is changed to 001, namely, when the third layer routing node is routed downwards, the second layer node number is 000, and the first layer node number is 001.
It will be appreciated that the above examples are only examples listed for better understanding of the technical solution of the embodiments of the present application, and are not to be construed as the only limitation of the present embodiments.
After the value of the bit of the first node number is inverted, starting from the highest-layer routing node in the first routing nodes, with the valid bit as the starting position, to obtain the second routing node of the downward route, step 204 is performed.
Step 204: and taking the first routing node and the second routing node as the intermediate routing nodes.
After the first routing node and the second routing node are obtained through the steps, the first routing node and the second routing node can be used as an intermediate routing node together.
The process of selecting a routing node using a routing algorithm that completes a direct upward hop prior to starting a downward route may be described in detail below in conjunction with fig. 13.
As shown in fig. 13, the source routing node is S2, the destination routing node is D1, and the value of the valid bit is 2, then the source routing node may jump directly upward from S2 for 2 times, i.e., from S2 of the first layer to node 2 of the second layer and then to node 2 of the third layer, where the node numbers of node S2, node 2 of the second layer and node 2 of the third layer are the same. Then, the route can be downwards from 2, the third layer route node 010 (I: 11) - > the second layer route node 000 (I1: __) - > the first layer route node 001, so as to determine the intermediate route node between the source terminal node and the target terminal node, and the like.
It will be appreciated that the above examples are only examples listed for better understanding of the technical solution of the embodiments of the present application, and are not to be construed as the only limitation of the present embodiments.
The embodiment of the application adopts the routing algorithm that the direct upward jump is completed before the downward route is started, thereby selecting the only route path between the source terminal node and the target terminal node, transmitting the data from the transmitting end to the receiving end only according to the selected fixed path, and achieving the purpose of data order preservation.
In this example, when the preset routing algorithm may be a routing algorithm that completes the upward routing and then hops directly downward, the implementation process for determining the intermediate routing node may be described in detail below with reference to fig. 8.
Referring to fig. 8, a flowchart of steps of another method for obtaining an intermediate routing node according to an embodiment of the present application is shown. As shown in fig. 8, the intermediate routing node obtaining method may include: step 801, step 802, step 803, and step 804.
Step 801: and determining the valid bit in the exclusive-or node number based on the position of the highest bit of the numerical value 1 in the exclusive-or node number, wherein the numerical value N of the valid bit is a positive integer.
In this embodiment, the preset routing algorithm may be a routing algorithm that finishes upward routing and then directly hops downward.
In this embodiment, when the value of the lowest bit of the node number of the source routing node is 0, the routing algorithm that finishes the upward route first and then hops directly downward may be selected. This implementation may be described in detail below in conjunction with fig. 11.
Referring to fig. 11, a flowchart illustrating steps of another method for determining an intermediate routing node according to an embodiment of the present application is shown. As shown in fig. 11, the intermediate routing node determining method may include: step 1101, step 1102 and step 1103.
Step 1101: and acquiring the value of the least significant bit of the first node number.
In the embodiment of the application, when the preset routing algorithm is selected, the value of the lowest bit of the first node number can be obtained.
Step 1102: and when the value of the lowest bit is 1, determining the preset routing algorithm as a routing algorithm for completing upward routing and then directly jumping downward.
After the value of the least significant bit of the first node number is acquired, it may be determined whether the value is 0.
If the value is 0, the preset routing algorithm can be determined to be a routing algorithm for completing upward routing and then directly jumping downward.
Step 1103: and determining an intermediate routing node between the source routing node and the target routing node based on the routing algorithm which completes upward routing and then directly hops downward and the valid bit in the exclusive or node number.
Furthermore, an intermediate routing node between the source routing node and the destination routing node may be determined based on a routing algorithm that completes the upward routing and then hops directly downward and valid bits in the exclusive or node number.
The upward routing refers to routing nodes with different numbers to a higher layer according to a routing algorithm.
Direct down-hops refer to direct down-hops from the current node to the same-numbered routing node of the lower layer.
After the xor node number is obtained, the valid bit in the xor node number and the value N of the valid bit may be determined based on the position of the highest bit where the value 1 in the xor node number is located. For example, the node number of the routing node where the source terminal node is located is 110, the node number of the routing node D where the destination terminal node is located is 011, the exclusive or node number is 101, the highest bit of the value 1 is the third bit, the valid bit is the third bit, and the value n=3 of the valid bit.
After determining the significant bit in the xor node number and the value N of the significant bit based on the position of the highest bit in the xor node number where the value 1 is located, step 802 is performed.
Step 802: and starting from the least significant bit of the exclusive or node number, inverting the value of the significant bit of the first node number to obtain a third routing node which is routed upwards.
After determining the valid bit in the exclusive-or node number and the value N of the valid bit based on the position of the highest bit in the value 1 in the exclusive-or node number, the value of the bit of the first node number may be inverted from the lowest bit of the valid bit of the exclusive-or node number to obtain the third routing node routed upwards. I.e. the third routing node is obtained by means of an upward first routing. Specifically, the value of the bit of the first node number may be sequentially inverted, so that the node number of each layer after the layer where the first node number is located may be obtained, thereby determining the third routing node. This implementation may be described in detail below in conjunction with fig. 9.
Referring to fig. 9, a flowchart illustrating steps of a third routing node determining method according to an embodiment of the present application is shown. As shown in fig. 9, the third routing node determining method may include: step 901 and step 902.
Step 901: and starting from the lowest bit of the valid bit, sequentially inverting the bit value of the corresponding bit in the first node number to obtain the node number of each layer after the layer where the first node number is located, wherein when the bit value of the valid bit is 0, the direct upward jump is that the current node directly jumps upward to the routing node with the same higher layer number.
In this embodiment, the bit values of the corresponding bits in the first node number may be sequentially inverted from the least significant bit of the exclusive or node number, to obtain the node number of each layer after the layer where the first node number is located. When the bit value of the valid bit is 0, the direct upward jump is performed, and the direct upward jump refers to the direct upward jump from the current node to the routing node with the same layer number.
Step 902: and determining a third routing node for upward routing according to the node number of each layer.
Further, a third routing node for the upward route may be determined according to the node number of each layer. For example, the node number of the routing node where the source terminal node is located is 110, the node number of the routing node D where the destination terminal node is located is 011, the exclusive or node number is 101, the highest bit of the value 1 is the third bit, the valid bit is the third bit, and the value n=3 of the valid bit. Firstly, the route can be upwards routed, the bit corresponding to S is inverted according to the position of '1' from the low position in the I, and the route node of the upwards routed is obtained, and the position of '0' directly jumps upwards; until all "1" s in I become "0". The first layer routing node 110 (I: 101) - > the second layer routing node 111 (I1: 10_) - > the third layer routing node 111 (I2: 1 __) - > the fourth layer routing node 011 (I2: ____), that is, the node number of the first layer routing node is 110 (the node number of the source routing node), the node number of the second layer routing node is 111, the node number of the third layer routing node is 111, the node number of the fourth layer routing node is 110, and at this time, the node corresponding to the node number of the second layer routing node 111, the node number of the third layer routing node 111, and the node number of the fourth layer routing node 110 may be regarded as the third routing node.
It will be appreciated that the above examples are only examples listed for better understanding of the technical solution of the embodiments of the present application, and are not to be construed as the only limitation of the present embodiments.
The embodiment of the application can identify the node number from the source routing node to the routing node of the highest layer by a bit inversion mode so as to identify the unique third routing node.
After determining the third routing node routed upward according to the node number of each layer, step 803 is performed.
Step 803: and starting from the highest-layer routing node of the third routing node, obtaining a fourth routing node through N times of direct downward hops.
After determining the third routing node of the upward routing according to the node number of each layer, the fourth routing node can be obtained by directly jumping downward for N times from the highest layer routing node of the third routing node. This implementation may be described in detail below in conjunction with fig. 10.
Referring to fig. 10, a flowchart illustrating steps of a fourth routing node obtaining method according to an embodiment of the present application is shown. As shown in fig. 10, the fourth routing node obtaining method may include: step 1001 and step 1002.
Step 1001: and starting from the highest-layer routing node of the third routing node, and reaching the target terminal node through N times of direct downward hops.
In this embodiment, after determining the third routing node routed upward according to the node number of each layer, the target terminal node may be reached through N direct downward hops from the highest layer routing node of the third routing node.
Step 1002: taking other routing nodes except the target terminal node in the routing nodes directly jumping downwards as the fourth routing node; the node number of the fourth routing node is the same as the second node number.
Further, other routing nodes than the target terminal node among the routing nodes through which the direct downward hops may be regarded as a fourth routing node, wherein the node number of the fourth routing node is the same as the second node number.
Step 804: and taking the third routing node and the fourth routing node as the intermediate routing nodes.
After the third routing node and the fourth routing node are obtained, the third routing node and the fourth routing node may be used as intermediate routing nodes.
The process of selecting routing nodes using a routing algorithm that completes upward routing followed by direct downward hops may be described in detail below in conjunction with fig. 14.
As shown in fig. 14, the source routing node is S6, the destination routing node is D3, the S6 node is numbered 110, and the routing node D3 where the destination terminal node is located is numbered 011. The exclusive or node number I is 101, the effective bit of I is 3 bits, and the method for determining the routing node. According to the convention, the upward route is finished first, and then the direct downward jump is started. Upward routing: the valid bit in the I is inverted according to the bit corresponding to S from the position of '1' from the low bit, so as to obtain a routing node of upward routing, and the position of '0' directly jumps upward; until all "1" s in I become "0". First layer routing node 110 (I: 101) - > second layer routing node 111 (I1:10_) - > third layer routing node 111 (I2:1 __) - > fourth layer routing node 011 (I2: ____). I.e. 110 is inverted from the lowest order bit, resulting in 111, i.e. the second layer routing node is 111. Then, the position at "0" jumps directly upward (i.e. the second bit of I is 0), i.e. the third layer routing node is 111, and then the third bit is inverted, so that the fourth layer routing node is 011. Then, the direct downward jump is started directly: directly to the routing node numbered D of the first tier.
The embodiment of the application can ensure the uniqueness of the routing nodes between the source terminal node and the target terminal node by adopting the mode of firstly routing upwards and then directly jumping downwards to select the routing nodes.
After determining an intermediate routing node between the source routing node and the destination routing node based on the preset routing algorithm and the valid bit in the exclusive or node number, step 103 is performed.
Step 103: and determining a routing path between the source terminal node and the target terminal node based on the intermediate routing node, the source routing node and the target routing node.
After determining the intermediate routing node between the source routing node and the target routing node based on the preset routing algorithm and the valid bit in the exclusive or node number, the routing path between the source terminal node and the target terminal node may be determined based on the intermediate routing node, the source routing node and the target routing node. In a specific implementation, two terminals may be suspended under each routing node, and the last bit of the routing node number may be used to indicate the identity of the terminal, and the process of validating the final terminal node may be described in detail below in conjunction with fig. 7.
Referring to fig. 7, a flowchart of steps of a routing path determining method according to an embodiment of the present application is shown. As shown in fig. 7, the routing path determining method may include: step 701 and step 702.
Step 701: and acquiring bit information of the last bit of the second node number.
In the embodiment of the application, after the intermediate routing node is obtained, the bit information of the last bit of the number of the second node can be obtained, and the bit information can be used for indicating the identity of the terminal.
Step 702: a routing path between the source terminal node and the target terminal node is determined based on the intermediate routing node, the source routing node, the target routing node, and the bit information.
Furthermore, a routing path between the source terminal node and the target terminal node can be determined according to the intermediate routing node, the source routing node, the target routing node and the bit information.
According to the embodiment of the application, the target terminal node can be accurately identified by combining the bit information of the last bit of the second node number, and output transmission errors are avoided.
The routing node where the source terminal node is located is S, and the routing node where the destination terminal node is located is D, and there is only a unique routing path regardless of whether the algorithm 1 (the routing algorithm that finishes directly upward hopping and then starts downward routing) and the algorithm 2 (the routing algorithm that finishes directly upward routing and then directly downward hopping) are used.
For algorithm 1: the direct upward hops need to be completed first and then the downward routing algorithm started. If algorithm 1 is used for all routing requests, fig. 15 lists the routing paths when algorithm 1 is used for all possible routing requests directly for first level routing node 0 and routing node 1, and it is seen that the probability of use of the uplink is greater than the probability of use of the downlink for links between routing nodes of the same number and different levels.
For algorithm 2: it is necessary to complete the upward route first and then start the routing algorithm of direct downward hops. If algorithm 2 is used for all routing requests, fig. 16 lists the routing paths when algorithm 2 is used for all possible routing requests directly for first level routing node 0 and routing node 1, and it is seen that the probability of using the downlink is greater than the probability of using the uplink for links between routing nodes of the same number and different levels.
To balance the advantages and disadvantages of algorithm 1 and algorithm 2, we use algorithm 1 and algorithm 2 in a mixture, we use binary digits to represent the source and destination end nodes, and know that two end nodes are suspended on each routing node of the first layer, the routing algorithm that is finally used: and judging the lowest bit of the node number of the source terminal node, and if the lowest bit is 0, using an algorithm 1 to route. If 1, then use algorithm 2 to route; this allows for uniform use of all links between two routing nodes, in all directions, as shown in fig. 17.
According to the routing path determining method provided by the embodiment of the application, the first node number of the source routing node where the source terminal node is located and the second node number of the target routing node where the target terminal node is located are subjected to exclusive OR processing to obtain the exclusive OR node number, and the first node number and the second node number are numbers of binary digits. And determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and valid bits in the exclusive or node numbers. A routing path between the source terminal node and the target terminal node is determined based on the intermediate routing node, the source routing node, and the target routing node. According to the embodiment of the application, the only intermediate routing node between the source routing node and the target terminal node is determined by combining the valid bit in the exclusive OR node number and the preset routing algorithm, so that the source routing node and the target terminal node transmit according to the fixed path, the problem that the sequence of the data packet reaching the target terminal node changes, and the data disorder error occurs at the receiving end is avoided, and the purpose of data sequence preservation is achieved.
Referring to fig. 18, a schematic structural diagram of a routing path determining apparatus according to an embodiment of the present application is shown. As shown in fig. 18, the routing path determining apparatus 1800 may include the following modules:
The node number obtaining module 1810 is configured to perform an exclusive-or process on a first node number of a source routing node where a source terminal node is located and a second node number of a target routing node where a target terminal node is located, so as to obtain an exclusive-or node number, where the first node number and the second node number are both numbers of binary digits;
an intermediate routing node determining module 1820, configured to determine an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and a valid bit in the xor node number;
a routing path determination module 1830 is configured to determine a routing path between the source end node and the target end node based on the intermediate routing node, the source routing node, and the target routing node.
Optionally, when the preset routing algorithm is a routing algorithm that completes direct upward jump and then starts downward routing,
the intermediate routing node determining module includes:
the valid bit acquisition unit is used for acquiring valid bits in the exclusive or node numbers and the numerical value K of the valid bits, wherein K is a positive integer;
the first node acquisition unit is used for obtaining a first routing node from the source routing node through K times of direct upward hops; the direct upward jump refers to the direct upward jump from the current node to the routing node with the same number of the higher layer;
A second node obtaining unit, configured to, starting from a highest-layer routing node in the first routing nodes, invert the value of the bit of the first node number with the valid bit as a starting position, and obtain a second routing node routed downward; the downward routing refers to routing nodes which are routed to routing nodes with different numbers at the lower layer according to a routing algorithm;
and the first intermediate node acquisition unit is used for taking the first routing node and the second routing node as the intermediate routing nodes.
Optionally, the valid bit acquiring unit includes:
a position obtaining subunit, configured to obtain a position of a highest bit where the value 1 in the xor node number is located;
and the valid bit determining subunit is used for determining the valid bit according to the position of the highest bit.
Optionally, the first node obtaining unit includes:
a routing node obtaining subunit, configured to start from the source routing node, reach a routing node with the same number as the first node number in the k+1 layer through K direct upward hops;
a first node obtaining subunit, configured to use a routing node that directly hops upward through as the first routing node; the node number of the first routing node is the same as the first node number.
Optionally, the second node obtaining unit includes:
a first node number obtaining subunit, configured to sequentially invert bit values of corresponding bits in the first node number from the starting position to obtain a node number of each layer after the highest layer, and directly skip downwards when the bit value of the valid bit is 0, where the directly skip downwards refers to directly skip downwards from a current node to a routing node with the same number of the lower layer;
and the second node determining subunit is used for determining a second routing node of the downward route according to the node number of each layer.
Optionally, the intermediate routing node determining module includes:
a first bit value acquisition unit configured to acquire a value of a least significant bit of the first node number;
a first routing algorithm determining unit, configured to determine, when the value of the lowest bit is 0, that the preset routing algorithm is a routing algorithm that finishes direct upward jump and then starts downward routing;
and the intermediate routing node determining unit is used for determining an intermediate routing node between the source routing node and the target routing node based on the routing algorithm for finishing direct upward jump and then starting downward routing and the valid bit in the exclusive or node number.
Optionally, the routing path determining module includes:
a bit information obtaining unit, configured to obtain bit information of a last bit of the second node number;
and the routing path determining subunit is used for determining a routing path between the source terminal node and the target terminal node based on the intermediate routing node, the source routing node, the target routing node and the bit information.
Optionally, when the preset routing algorithm is a routing algorithm that finishes upward routing and then directly hops downward,
the intermediate routing node determining module includes:
the valid bit determining unit is used for determining a valid bit in the exclusive-or node number based on the position of the highest bit of the numerical value 1 in the exclusive-or node number, and the numerical value N of the valid bit is a positive integer;
a third node obtaining unit, configured to invert the value of the bit of the first node number from the lowest bit of the valid bit of the exclusive or node number, to obtain a third routing node that routes upward; the upward routing refers to routing nodes with different numbers from a higher layer according to a routing algorithm;
A fourth node obtaining unit, configured to obtain a fourth routing node from the highest layer routing node of the third routing node through N direct downward hops; the direct downward jump refers to the direct downward jump from the current node to the routing node with the same number of the lower layer;
and the second intermediate node acquisition unit is used for taking the third routing node and the fourth routing node as the intermediate routing nodes.
Optionally, the third node obtaining unit includes:
a second node number obtaining subunit, configured to sequentially invert bit values of corresponding bits in the first node number from a lowest bit of the valid bit to obtain a node number of each layer after the layer where the first node number is located, where when the bit value of the valid bit is 0, directly jump upwards, where directly jump upwards refers to directly jumping from a current node to a routing node with the same higher layer number;
and the third node determining subunit is used for determining a third routing node for upward routing according to the node number of each layer.
Optionally, the fourth node obtaining unit includes:
a target node obtaining subunit, configured to start from a highest layer routing node of the third routing node, and reach the target terminal node through N direct downward hops;
A fourth node obtaining subunit, configured to use, as the fourth routing node, other routing nodes, except the target terminal node, among routing nodes that directly hop downward through; the node number of the fourth routing node is the same as the second node number.
Optionally, the intermediate routing node determining module includes:
a second bit value acquisition unit configured to acquire a value of a least significant bit of the first node number;
a second routing algorithm determining unit, configured to determine, when the value of the lowest bit is 1, that the preset routing algorithm is a routing algorithm that finishes upward routing first and then directly hops downward;
and the intermediate node determining unit is used for determining an intermediate routing node between the source routing node and the target routing node based on the routing algorithm which completes upward routing and then directly hops downward and the valid bit in the exclusive or node number.
Optionally, the apparatus further comprises:
a node number value determining module, configured to determine whether values of all bits of the exclusive or node number are all 0;
and the routing flow ending module is used for determining that the source routing node and the target routing node are the same routing node and ending the routing flow in response to the value of all bits of the exclusive or node number is 0.
The route path determining device provided by the embodiment of the application obtains the exclusive or node number by exclusive or processing the first node number of the source route node where the source terminal node is located and the second node number of the target route node where the target terminal node is located, wherein the first node number and the second node number are both numbers of binary digits. And determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and valid bits in the exclusive or node numbers. A routing path between the source terminal node and the target terminal node is determined based on the intermediate routing node, the source routing node, and the target routing node. According to the embodiment of the application, the only intermediate routing node between the source routing node and the target terminal node is determined by combining the valid bit in the exclusive OR node number and the preset routing algorithm, so that the source routing node and the target terminal node transmit according to the fixed path, the problem that the sequence of the data packet reaching the target terminal node changes, and the data disorder error occurs at the receiving end is avoided, and the purpose of data sequence preservation is achieved.
Additionally, the embodiment of the application also provides electronic equipment, which comprises: the routing path determination system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the computer program is executed by the processor to realize the routing path determination method.
Fig. 19 shows a schematic structural diagram of an electronic device 1900 according to an embodiment of the invention. As shown in fig. 19, the electronic device 1900 includes a Central Processing Unit (CPU) 1901 that can perform various appropriate actions and processes according to computer program instructions stored in a Read Only Memory (ROM) 1902 or computer program instructions loaded from a storage unit 1908 into a Random Access Memory (RAM) 1903. In the RAM 1903, various programs and data required for operation of the electronic device 1900 may also be stored. The CPU1901, ROM 1902, and RAM 1903 are connected to each other via a bus 1904. An input/output (I/O) interface 1905 is also connected to bus 1904.
Various components in electronic device 1900 are connected to I/O interface 1905, including: an input unit 1906 such as a keyboard, a mouse, a microphone, and the like; an output unit 1907 such as various types of displays, speakers, and the like; a storage unit 1908 such as a magnetic disk, an optical disk, or the like; and a communication unit 1909 such as a network card, modem, wireless communication transceiver, and the like. The communication unit 1909 allows the electronic device 1900 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks.
The various processes and treatments described above may be performed by the processing unit 1901. For example, the methods of any of the embodiments described above may be implemented as a computer software program tangibly embodied on a computer-readable medium, such as the storage unit 1908. In some embodiments, some or all of the computer programs may be loaded and/or installed onto electronic device 1900 via ROM1902 and/or communication unit 1909. When a computer program is loaded into RAM1903 and executed by CPU1901, one or more actions in the method described above may be performed.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, realizes the processes of the above-mentioned routing path determining method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the description is omitted here. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (15)

1. A method of routing path determination, the method comprising:
performing exclusive OR processing on a first node number of a source routing node where a source terminal node is located and a second node number of a target routing node where a target terminal node is located to obtain an exclusive OR node number, wherein the first node number and the second node number are numbers of binary digits;
determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and a valid bit in the exclusive or node number;
and determining a routing path between the source terminal node and the target terminal node based on the intermediate routing node, the source routing node and the target routing node.
2. The method of claim 1, wherein, when the predetermined routing algorithm is a routing algorithm that completes a direct upward jump and then starts a downward route,
the determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and the valid bit in the exclusive or node number includes:
acquiring a valid bit in the exclusive or node number and a numerical value K of the valid bit, wherein K is a positive integer;
Starting from the source routing node, obtaining a first routing node through K times of direct upward hops; the direct upward jump refers to the direct upward jump from the current node to the routing node with the same number of the higher layer;
starting from the highest-layer routing node in the first routing nodes, taking the valid bit as a starting position, and inverting the value of the bit of the first node number to obtain a second routing node which is routed downwards; the downward routing refers to routing nodes which are routed to routing nodes with different numbers at the lower layer according to a routing algorithm;
and taking the first routing node and the second routing node as the intermediate routing nodes.
3. The method of claim 2, wherein the obtaining the valid bit in the xor node number comprises:
acquiring the position of the highest bit of the numerical value 1 in the exclusive or node number;
and determining the valid bit according to the position of the highest bit.
4. The method of claim 2, wherein starting from the source routing node, the first routing node is obtained through K direct upward hops, comprising:
starting from the source routing node, through K times of direct upward hops, the routing node with the same number as the first node in the K+1 layer is reached;
Taking the route node which directly jumps upwards to pass through as the first route node; the node number of the first routing node is the same as the first node number.
5. The method of claim 2, wherein inverting the value of the bit of the first node number with the valid bit as a starting position, to obtain a second routing node that is routed downward, comprises:
sequentially inverting bit values of corresponding bits in the first node number from the starting position to obtain the node number of each layer after the highest layer, and directly jumping downwards when the bit value of the effective bit is 0, wherein the direct jumping downwards refers to directly jumping downwards from the current node to a routing node with the same number of the lower layer;
and determining a second routing node of the downward route according to the node number of each layer.
6. The method of claim 2, wherein the determining an intermediate routing node between the source routing node and the destination routing node based on a preset routing algorithm and a valid bit in the exclusive or node number comprises:
acquiring the value of the lowest bit of the first node number;
When the value of the lowest bit is 0, determining the preset routing algorithm as a routing algorithm for finishing direct upward jump and then starting downward routing;
and determining an intermediate routing node between the source routing node and the target routing node based on the routing algorithm which completes direct upward jump and then starts downward routing and the valid bit in the exclusive or node number.
7. The method of claim 2, wherein the determining a routing path between the source end node and the target end node based on the intermediate routing node, the source routing node, and the target routing node comprises:
acquiring bit information of the last bit of the second node number;
a routing path between the source terminal node and the target terminal node is determined based on the intermediate routing node, the source routing node, the target routing node, and the bit information.
8. The method of claim 1, wherein, when the predetermined routing algorithm is a routing algorithm that completes upward routing and then hops directly downward,
the determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and the valid bit in the exclusive or node number includes:
Determining a valid bit in the exclusive-or node number based on the position of the highest bit of the numerical value 1 in the exclusive-or node number, wherein the numerical value N of the valid bit is a positive integer;
starting from the least significant bit of the exclusive or node number, inverting the value of the significant bit of the first node number to obtain a third routing node of upward routing; the upward routing refers to routing nodes with different numbers from a higher layer according to a routing algorithm;
starting from the highest-layer routing node of the third routing node, obtaining a fourth routing node through N times of direct downward hops; the direct downward jump refers to the direct downward jump from the current node to the routing node with the same number of the lower layer;
and taking the third routing node and the fourth routing node as the intermediate routing nodes.
9. The method of claim 8, wherein inverting the value of the bit of the first node number starting from the least significant bit of the exclusive or node number, results in a third routing node that routes upward, comprising:
sequentially inverting bit values of corresponding bits in the first node number from the lowest bit of the valid bit to obtain the node number of each layer after the layer where the first node number is located, wherein when the bit value of the valid bit is 0, the direct upward jump is that the current node directly jumps upward to a routing node with the same higher layer number;
And determining a third routing node for upward routing according to the node number of each layer.
10. The method of claim 8, wherein the obtaining a fourth routing node from the highest layer routing node of the third routing node through N direct downward hops comprises:
starting from the highest-layer routing node of the third routing node, directly jumping downwards for N times to reach the target terminal node;
taking other routing nodes except the target terminal node in the routing nodes directly jumping downwards as the fourth routing node; the node number of the fourth routing node is the same as the second node number.
11. The method of claim 8, wherein the determining an intermediate routing node between the source routing node and the destination routing node based on a preset routing algorithm and a valid bit in the exclusive or node number comprises:
acquiring the value of the lowest bit of the first node number;
when the value of the lowest bit is 1, determining the preset routing algorithm as a routing algorithm for completing upward routing and then directly jumping downward;
And determining an intermediate routing node between the source routing node and the target routing node based on the routing algorithm which completes upward routing and then directly hops downward and the valid bit in the exclusive or node number.
12. The method according to claim 1, wherein after performing exclusive-or processing on the first node number of the source routing node where the source terminal node is located and the second node number of the destination routing node where the destination terminal node is located, obtaining an exclusive-or node number, the method further comprises:
determining whether values of all bits of the exclusive or node number are 0;
and determining that the source routing node and the target routing node are the same routing node according to the condition that the value of all bits of the exclusive OR node numbers is 0, and ending the routing flow.
13. A routing path determination apparatus, the apparatus comprising:
the node number acquisition module is used for carrying out exclusive or processing on a first node number of a source route node where a source terminal node is located and a second node number of a target route node where a target terminal node is located to obtain an exclusive or node number, wherein the first node number and the second node number are numbers of binary digits;
The intermediate routing node determining module is used for determining an intermediate routing node between the source routing node and the target routing node based on a preset routing algorithm and the valid bit in the exclusive or node number;
and the routing path determining module is used for determining a routing path between the source terminal node and the target terminal node based on the intermediate routing node, the source routing node and the target routing node.
14. An electronic device, comprising:
memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the routing path determination method according to any of claims 1 to 12.
15. A readable storage medium, characterized in that instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the routing path determination method of any one of claims 1 to 12.
CN202311481739.4A 2023-11-08 2023-11-08 Routing path determining method and device, electronic equipment and storage medium Active CN117240772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311481739.4A CN117240772B (en) 2023-11-08 2023-11-08 Routing path determining method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311481739.4A CN117240772B (en) 2023-11-08 2023-11-08 Routing path determining method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117240772A true CN117240772A (en) 2023-12-15
CN117240772B CN117240772B (en) 2024-03-01

Family

ID=89086350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311481739.4A Active CN117240772B (en) 2023-11-08 2023-11-08 Routing path determining method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117240772B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060104267A1 (en) * 2004-11-12 2006-05-18 Stmicroelectronics S.R.L. Routing procedure and system, corresponding network, such as a network on chip (NOC), and computer program product therefor
WO2008096909A1 (en) * 2007-02-04 2008-08-14 Ki-Hyung Kim Method for routing a path setting in a wireless sensor network and apparatus for performing the same
JP2014116854A (en) * 2012-12-11 2014-06-26 Hideo Tatsuno Network for transferring cell, packet or packet with cell header
CN111385208A (en) * 2018-12-29 2020-07-07 广州市百果园信息技术有限公司 Routing method, routing device, computer equipment and storage medium
CN111526555A (en) * 2020-05-25 2020-08-11 南京邮电大学 Multi-hop routing path selection method based on genetic algorithm
CN115150312A (en) * 2021-03-31 2022-10-04 华为技术有限公司 Routing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060104267A1 (en) * 2004-11-12 2006-05-18 Stmicroelectronics S.R.L. Routing procedure and system, corresponding network, such as a network on chip (NOC), and computer program product therefor
WO2008096909A1 (en) * 2007-02-04 2008-08-14 Ki-Hyung Kim Method for routing a path setting in a wireless sensor network and apparatus for performing the same
JP2014116854A (en) * 2012-12-11 2014-06-26 Hideo Tatsuno Network for transferring cell, packet or packet with cell header
CN111385208A (en) * 2018-12-29 2020-07-07 广州市百果园信息技术有限公司 Routing method, routing device, computer equipment and storage medium
CN111526555A (en) * 2020-05-25 2020-08-11 南京邮电大学 Multi-hop routing path selection method based on genetic algorithm
CN115150312A (en) * 2021-03-31 2022-10-04 华为技术有限公司 Routing method and device

Also Published As

Publication number Publication date
CN117240772B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
US10820330B2 (en) Scheduling information transmitting method and apparatus in D2D communication, and scheduling information receiving method and apparatus in D2D communication
CN110071876B (en) Block chain-based data transmission method and device and electronic equipment
TW201526571A (en) Method, system and device for sending and receiving data
CN113438172B (en) Data transmission method and device based on multi-level node network
CN112202753A (en) Data stream detection method and system based on cloud platform and block chain
JP6509332B2 (en) User pairing processing method, apparatus and base station
CN107682270B (en) Network topology discovery method and device
CN107508712B (en) Network topology discovery method and device
KR20190073408A (en) Uplink signal transmission method, terminal device and network side device
CN117240772B (en) Routing path determining method and device, electronic equipment and storage medium
KR101981164B1 (en) A communication network system and a method of transmitting and receiving a message in thereof
CN105519023A (en) Method, device and system for processing data
CN107278364B (en) Node authentication method and node authentication system
CN111542090B (en) Method and device for accessing polarized timeslot ALOHA for resisting partial data packet deletion
JP7443533B2 (en) Reference signal processing method, device, first communication node and second communication node
CN117354230B (en) Routing path determining method, device, equipment and medium of bidirectional topological network
EP3209057B1 (en) Data transmission method, device and system
CN109412873B (en) Configuration updating method and device, terminal equipment and computer storage medium
CN113825175B (en) Satellite data transmission method, device, equipment and storage medium
US10033625B2 (en) Loop avoidance in repeater networks
CN114448620B (en) Service path selection method of multi-protocol quantum key distribution network and related equipment
CN114070780B (en) Fountain coding-based multi-path transmission method and system
CN113726663B (en) Routing processing method and device
WO2019028619A1 (en) Data scheduling method and device, and computer storage medium
US10193648B2 (en) Mitigating packet interference

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant